<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="13" minor="0"/>
<Label-Scheme value="2" prefix=""/>
<View-Properties presentation="false"></View-Properties>
<MapleNet-Properties elisiondigitsbefore="100" labelling="true" indentamount="4" elisiontermsthreshold="10000" ansi="false" errorbreak="1" useclientjvm="true" echo="1" imaginaryunit="I" labelwidth="20" plotdriver="openviz" elisiondigitsafter="100" plotoutput="terminal" rtablesize="10" elisiontermsbefore="100" elisiondigitsthreshold="10000" typesetting="standard" plotdevice="inline" verboseproc="1" showassumed="1" errorcursor="false" longdelim="true" plotoptions="" quiet="false" elisiontermsafter="100" screenwidth="79" preplot="" prettyprint="3" displayprecision="-1" warnlevel="3" screenheight="25" latexwidth="6.0" postplot="" prompt="&gt; " ShowLabels="true"/>
<Styles><Font name="_cstyle292" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle293" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle290" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle291" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle301" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle300" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle303" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle302" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle305" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle304" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle307" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle306" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle309" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle308" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle289" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle288" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle287" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle286" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle285" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle284" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle283" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle312" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle311" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input" background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle310" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle256" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle316" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle315" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle314" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle313" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle319" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle318" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle317" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle299" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle298" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle295" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle294" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle297" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle296" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle321" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle320" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle323" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle322" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle270" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle271" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Author" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle329" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Warning" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle328" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input Placeholder" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[200,0,200]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="true"/>
<Font name="_cstyle325" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Code" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle324" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="24" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle327" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle326" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Diagnostic" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[40,120,40]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle269" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Normal" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle264" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle263" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle262" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle261" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle268" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle267" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle266" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle265" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle334" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle333" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle331" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle330" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle280" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle281" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle282" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Input" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Header and Footer" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle336" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle335" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Equation Label" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle273" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dictionary Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[147,0,15]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="_cstyle272" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle275" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle274" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle277" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle276" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="List Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle279" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle278" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 1" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 2" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 3" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle256" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle257" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dash Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="HyperlinkError" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="_cstyle258" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle259" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Page Number" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Bullet Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle260" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Plot" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Line Printed Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Inert Output" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[144,144,144]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Comment" background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,128,128]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="2D Math" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Error" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 1" background="[0,0,0]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 4" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 3" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 2" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="16" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="HyperlinkWarning" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Layout name="Ordered List 1" alignment="left" bullet="numeric" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 2" alignment="left" bullet="alphabetic" firstindent="0" leftmargin="36" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 3" alignment="left" bullet="roman" firstindent="0" leftmargin="72" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 4" alignment="left" bullet="ALPHABETIC" firstindent="0" leftmargin="108" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 5" alignment="left" bullet="ROMAN" firstindent="0" leftmargin="144" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Author" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="8" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Warning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Annotation Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Plot" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Line Printed Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Text Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="newline" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Diagnostic" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Normal" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Output" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.3" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Dash Item" alignment="left" bullet="dash" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle256" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.5" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="HyperlinkError" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Error" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 1" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="4" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Bullet Item" alignment="left" bullet="dot" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 4" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 3" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 2" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="2" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="HyperlinkWarning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="List Item" alignment="left" bullet="indent" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Pencil-style name="Pencil 5" pen-color="[255,0,0]" pen-height="5.0" pen-width="5.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 4" pen-color="[0,0,255]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 3" pen-color="[0,0,0]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 2" pen-color="[0,0,255]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 1" pen-color="[0,0,0]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Highlighter-style name="Highlighter 2" pen-color="[255,204,0]" pen-height="14.0" pen-width="14.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 1" pen-color="[255,153,255]" pen-height="12.0" pen-width="8.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 4" pen-color="[0,255,255]" pen-height="32.0" pen-width="32.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 3" pen-color="[51,255,0]" pen-height="24.0" pen-width="24.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 5" pen-color="[255,255,0]" pen-height="48.0" pen-width="48.0" pen-opacity="0.8"/>
</Styles>
<Footer left-content="" center-content="" right-content="&amp;[Page]" left-image-scale-width="100" center-image-scale-width="100" right-image-scale-width="100" left-image-scale-height="100" center-image-scale-height="100" right-image-scale-height="100" date-format="2" selected-index="0" first-number="1" first-numbered-page="1"/>
<Task-table>
    <Task-category name="&lt;default&gt;">
    </Task-category>
</Task-table>
<Task>
</Task>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="_cstyle324" layout="Heading 1"><Font bold="true">Riemann, Trapezoids, and Simpson</Font></Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"><Font style="_cstyle293">Note: You may notice differences between this Maple worksheet and the equivalent Mathematica notebook. These differences were introduced to preserve the content of these modules and were necessary because of major functional differences between Maple and Mathematica</Font>.
</Text-field>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Introduction</Text-field></Title>
<Text-field style="Normal" layout="Normal">
OBJECTIVE: To visualize the process of using Riemann sums, the trapezoid rule, and Simpson's rule for approximating definite integrals and to understand the error associated with each method.

To evaluate a definite integral, it is often necessary to use a numerical estimate of the integral in place of an exact value. This occurs in three instances: 1) when there is no simple formula for an antiderivative of the integrand; 2) when the antiderivative of the integrand is difficult to determine and/or evaluate; and, 3) when the integrand function is represented by a table of numeric values rather than by a formula. In this module, we investigate several numerical methods for estimating definite integrals.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="_cstyle256" layout="Heading 1"><Font size="18">Technology Guidelines</Font></Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">NOTE:  If you have just finished a worksheet, <Font style="_cstyle257">restart</Font> <Font style="_cstyle294">Maple</Font> before executing a new worksheet.
TO OPEN SECTIONS, 
  Click on the <Font style="_cstyle258">PLUS</Font> sign at the left hand side of the screen <Font style="_cstyle262">or</Font> select <Font style="_cstyle260">Expand All Sections</Font> from the <Font style="_cstyle261">View</Font> drop down menu.</Text-field>
<Text-field style="Normal" layout="Normal">TO STOP AN EXECUTION
  Click on <Font style="_cstyle259">STOP</Font> button from the toolbar.</Text-field>
<Text-field style="Normal" layout="Normal">ORDER OF EXECUTION
  Execute commands in the order given. Do not skip any <Font style="_cstyle295">Maple </Font>Input lines within a given worksheet</Text-field>
<Text-field style="Normal" layout="Normal">  Alternatively, you can execute the entire worksheet by selecting the <Font style="_cstyle263">Execute Worksheet </Font>command from the <Font style="_cstyle264">Edit</Font> drop down menu.</Text-field>
<Text-field style="Normal" layout="Normal">SAVING WORKSHEETS.</Text-field>
<Text-field style="Normal" layout="Normal">  You can save anytime to any directory you choose, and it is wise to save often. 
EXPERIENCING MAJOR PROBLEMS
 Save if appropriate, and then shut down <Font style="_cstyle296">Maple</Font> and start it up again.</Text-field>
<Text-field style="Normal" layout="Normal"> </Text-field>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Part I: Riemann Sums and Errors</Text-field></Title>
<Text-field style="Normal" layout="Normal">The most direct method for estimating a definite integral is to replace it with a Riemann sum. That is, we estimate the integral as follows: <Equation executable="false" style="_cstyle297" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2KEYrLUYjNiotSShtc3Vic3VwR0YkNictSSNtb0dGJDYuUSYmaW50O0YnLyUnaXRhbGljR1EmZmFsc2VGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRicvJSZmZW5jZUdGPC8lKnNlcGFyYXRvckdGPC8lKXN0cmV0Y2h5R0Y8LyUqc3ltbWV0cmljR0Y8LyUobGFyZ2VvcEdGPC8lLm1vdmFibGVsaW1pdHNHRjwvJSdhY2NlbnRHRjwvJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZQLUYsNiRRImFGJy9GPlEnaXRhbGljRictRiw2JFEiYkYnRlYvJTFzdXBlcnNjcmlwdHNoaWZ0R1EiMkYnLyUvc3Vic2NyaXB0c2hpZnRHUSIwRidGKy1GIzYmLUYsNiRRImZGJ0ZWLUY3Ni1RMCZ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ORlEtRiw2JFEiaEYnRlZGVkYrRlZGK0ZWRitGVg==</Equation>, where the interval <Font style="_cstyle298">[a, b]</Font> is divided into <Font style="_cstyle299">n</Font> subintervals, each of length <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ji1GLDYlUSJoRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUkjbW9HRiQ2LVEiPUYnL0Y4USdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGQi8lKXN0cmV0Y2h5R0ZCLyUqc3ltbWV0cmljR0ZCLyUobGFyZ2VvcEdGQi8lLm1vdmFibGVsaW1pdHNHRkIvJSdhY2NlbnRHRkIvJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZRLUkmbWZyYWNHRiQ2KC1GIzYmRistRiM2Ji1GLDYlUSJiRidGNEY3LUY7Ni1RKCZtaW51cztGJ0Y+RkBGQ0ZFRkdGSUZLRk0vRlBRLDAuMjIyMjIyMmVtRicvRlNGXG8tRiw2JVEiYUYnRjRGN0Y+RitGPi1GIzYkLUYsNiVRIm5GJ0Y0RjdGPi8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGW3AvJSliZXZlbGxlZEdGQkY+RitGPg==">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ji1GLDYlUSJoRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUkjbW9HRiQ2LVEiPUYnL0Y4USdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGQi8lKXN0cmV0Y2h5R0ZCLyUqc3ltbWV0cmljR0ZCLyUobGFyZ2VvcEdGQi8lLm1vdmFibGVsaW1pdHNHRkIvJSdhY2NlbnRHRkIvJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZRLUkmbWZyYWNHRiQ2KC1GIzYmRistRiM2Ji1GLDYlUSJiRidGNEY3LUY7Ni1RKCZtaW51cztGJ0Y+RkBGQ0ZFRkdGSUZLRk0vRlBRLDAuMjIyMjIyMmVtRicvRlNGXG8tRiw2JVEiYUYnRjRGN0Y+RitGPi1GIzYkLUYsNiVRIm5GJ0Y0RjdGPi8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGW3AvJSliZXZlbGxlZEdGQkY+RitGPg==</Equation> , and where <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUklbXN1YkdGJDYlLUkjbWlHRiQ2JVEiY0YnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1GIzYkLUYvNiVRImlGJ0YyRjUvRjZRJ25vcm1hbEYnLyUvc3Vic2NyaXB0c2hpZnRHUSIwRidGPQ==">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUklbXN1YkdGJDYlLUkjbWlHRiQ2JVEiY0YnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1GIzYkLUYvNiVRImlGJ0YyRjUvRjZRJ25vcm1hbEYnLyUvc3Vic2NyaXB0c2hpZnRHUSIwRidGPQ==</Equation> is any value of <Font style="_cstyle331">x</Font> taken from the <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUklbXN1cEdGJDYlLUkjbWlHRiQ2JVEiaUYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1GLzYlUSN0aEYnRjJGNS8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRicvRjZRJ25vcm1hbEYn">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUklbXN1cEdGJDYlLUkjbWlHRiQ2JVEiaUYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1GLzYlUSN0aEYnRjJGNS8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRicvRjZRJ25vcm1hbEYn</Equation> subinterval. To assess the error in the approximation, we will perform a numerical experiment wherein we use a Riemann sum to estimate an integral for which we know the exact value. (You should keep in mind, however, that numerical integration is primarily used for estimating integrals in situations where we can't determine a decimal or fraction representation for the exact value of the integral.) Our first goal is to determine what factors affect the error when we use left- or right-hand Riemann sums to estimate the exact value of an integral.

The integral we choose for our experiment is <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2J0YrLUYjNiotSShtc3Vic3VwR0YkNictSSNtb0dGJDYtUSYmaW50O0YnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGPy8lKXN0cmV0Y2h5R0Y/LyUqc3ltbWV0cmljR0Y/LyUobGFyZ2VvcEdGPy8lLm1vdmFibGVsaW1pdHNHRj8vJSdhY2NlbnRHRj8vJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0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HRj8vJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZOLUkjbW5HRiQ2JFEiMEYnRjotSSZtZnJhY0dGJDYoLUYjNiQtRiw2JVElJnBpO0YnLyUnaXRhbGljR0Y/RjpGOi1GIzYkLUZSNiRRIjJGJ0Y6RjovJS5saW5ldGhpY2tuZXNzR1EiMUYnLyUrZGVub21hbGlnbkdRJ2NlbnRlckYnLyUpbnVtYWxpZ25HRmNvLyUpYmV2ZWxsZWRHRj8vJTFzdXBlcnNjcmlwdHNoaWZ0R0Zdby8lL3N1YnNjcmlwdHNoaWZ0R0ZURistRiM2Ji1GLDYlUSRjb3NGJ0ZnbkY6LUY3Ni1RMCZBcHBseUZ1bmN0aW9uO0YnRjpGPUZARkJGREZGRkhGSkZMRk8tSShtZmVuY2VkR0YkNiQtRiM2JC1GLDYlUSJ4RicvRmhuUSV0cnVlRicvRjtRJ2l0YWxpY0YnRjpGOkY6RistSSdtc3BhY2VHRiQ2Ji8lJ2hlaWdodEdRJjAuMGV4RicvJSZ3aWR0aEdRJjAuM2VtRicvJSZkZXB0aEdGZXEvJSpsaW5lYnJlYWtHUSVhdXRvRictRjc2LVEwJkRpZmZlcmVudGlhbEQ7RidGOkY9RkBGQkZERkZGSEZKRkxGT0ZpcEY6LUY3Ni1RIj1GJ0Y6Rj1GQEZCRkRGRkZIRkovRk1RLDAuMjc3Nzc3OGVtRicvRlBGZXItRlI2JEZgb0Y6RjpGK0Y6</Equation>. First, we look at a graphical depiction of the situation. For this, the <Font style="_cstyle265">riemannsum( )</Font> command is created using the <Font style="_cstyle267">leftbox( ) </Font>and <Font style="_cstyle268">rightbox( )</Font> commands from the <Font style="_cstyle266">student</Font> package. The command is <Font style="_cstyle269">riemannsum(f, xrange, n, box, incdec)</Font>. The arguments are the function,<Font style="_cstyle270"> f</Font>, the independent variable, <Font style="_cstyle271">x</Font>, the range of the integral <Font style="_cstyle272">xrange</Font>, the number of rectangles, <Font style="_cstyle273">n</Font>, the &quot;right&quot; or &quot;left&quot; sum indicator, <Font style="_cstyle333">box</Font>, and an &quot;increasing/decreasing&quot; indicator, <Font style="_cstyle334">incdec</Font>. If the integrand function increases over the interval of the integral, then the argument for <Font style="_cstyle335">incdec</Font> is the word &quot;increasing,&quot; and if it decreases then the argument is the word &quot;decreasing.&quot; The error is taken as the Riemann estimate minus the exact value of the integral.

The special command <Font style="_cstyle274">riemannsum( )</Font> is only available in this module and is not a built-in <Font style="_cstyle300">Maple</Font> command. Here's how it works.
</Text-field>
<Group labelreference="L2">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart;
with(student):
with(plots):</Text-field>
</Input>
</Group>
<Group labelreference="L3">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">riemannsum:=proc(f, xrange, n, box, incdec)
   local a, p1, p2;
   a:=array(1..2):
   if box=right then
      a[1]:=rightbox(f, xrange, n, color=black, title=`Cos(x)`,tickmarks=[4,4]):
      p1:=rightbox(f, xrange, n, color=black, title=`error`,tickmarks=[4,4]):
      p2:=plot(f, xrange, filled=true, tickmarks=[4,4]):
      if incdec=increasing then a[2]:=display(p2,p1) else a[2]:=display(p1,p2) fi:
      display(a);
   else
      if box=left then
      a[1]:=leftbox(f, xrange, n, color=black, title=`Cos(x)`,tickmarks=[4,4]):
      p1:=leftbox(f, xrange, n, color=black, title=`error`,tickmarks=[4,4]):
      p2:=plot(f, xrange, filled=true,tickmarks=[4,4]):
      if incdec=increasing then a[2]:=display(p1,p2) else a[2]:=display(p2,p1) fi:
      display(a);
      fi:
   fi:
end:

</Text-field>
</Input>
</Group>
<Group labelreference="L4">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">riemannsum(cos(x), x=0..Pi/2, 5, right,decreasing);
riemannsum(cos(x), x=0..Pi/2, 5, left,decreasing);</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L5">
<Input>
<Text-field style="Normal" layout="Normal">
The area of each small triangular-shaped region on the error graph is the local error associated with each rectangle in the Riemann sum. The sum of the areas of these triangular-shaped regions is the global or total error in the estimate of the integral. 

In general, the areas of the rectangles can be positive, negative, or 0.  Because these areas are signed, we will refer to them hereafter as &quot;signed areas.&quot;
</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">You Try It: Visualizing the Errors</Text-field></Title>
<Text-field style="Normal" layout="Normal">
Use the <Font style="_cstyle275">riemansumm( )</Font> command in the preceding section (copied below) to respond to the items that follow.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L6">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">n:=5:
f:=x-&gt;cos(x):
a:=0:
b:=Pi/2:
incdec:=decreasing:
riemannsum(f(x), x=a..b, n, right,incdec);
riemannsum(f(x), x=a..b, n, left,incdec);</Text-field>
</Input>
</Group>
<Group labelreference="L7">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L8">
<Input>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">a)  Increase the number of rectangles in the preceding input cell, and describe qualitatively what happens to the error in the estimate of the integral each time you double the number of rectangles.

b)  What effect does the slope of the function have on the error?

c)  The function <Equation executable="false" style="_cstyle301" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYnLUkjbWlHRiQ2I1EhRictRiM2Jy1GLDYmUSRjb3NGJy8lJWJvbGRHUSZmYWxzZUYnLyUnaXRhbGljR0Y2LyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy1JI21vR0YkNi1RMCZBcHBseUZ1bmN0aW9uO0YnRjkvJSZmZW5jZUdGNi8lKnNlcGFyYXRvckdGNi8lKXN0cmV0Y2h5R0Y2LyUqc3ltbWV0cmljR0Y2LyUobGFyZ2VvcEdGNi8lLm1vdmFibGVsaW1pdHNHRjYvJSdhY2NlbnRHRjYvJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZQLUkobWZlbmNlZEdGJDYlLUYjNiUtRiw2JlEieEYnRjQvRjhRJXRydWVGJy9GOlEnaXRhbGljRicvRjpRJWJvbGRGJy8lK2ZvbnR3ZWlnaHRHRmpuRjRGOUZpbkZbb0YrRmluRltv">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYnLUkjbWlHRiQ2I1EhRictRiM2Jy1GLDYmUSRjb3NGJy8lJWJvbGRHUSZmYWxzZUYnLyUnaXRhbGljR0Y2LyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy1JI21vR0YkNi1RMCZBcHBseUZ1bmN0aW9uO0YnRjkvJSZmZW5jZUdGNi8lKnNlcGFyYXRvckdGNi8lKXN0cmV0Y2h5R0Y2LyUqc3ltbWV0cmljR0Y2LyUobGFyZ2VvcEdGNi8lLm1vdmFibGVsaW1pdHNHRjYvJSdhY2NlbnRHRjYvJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZQLUkobWZlbmNlZEdGJDYlLUYjNiUtRiw2JlEieEYnRjQvRjhRJXRydWVGJy9GOlEnaXRhbGljRicvRjpRJWJvbGRGJy8lK2ZvbnR3ZWlnaHRHRmpuRjRGOUZpbkZbb0YrRmluRltv</Equation><Font style="_cstyle302"> </Font>decreases on the interval from 0 to <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkmbWZyYWNHRiQ2KC1GIzYkLUkjbWlHRiQ2JVElJnBpO0YnLyUnaXRhbGljR1EmZmFsc2VGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRidGNy1GIzYkLUkjbW5HRiQ2JFEiMkYnRjdGNy8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGRS8lKWJldmVsbGVkR0Y2Rjc=">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkmbWZyYWNHRiQ2KC1GIzYkLUkjbWlHRiQ2JVElJnBpO0YnLyUnaXRhbGljR1EmZmFsc2VGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRidGNy1GIzYkLUkjbW5HRiQ2JFEiMkYnRjdGNy8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGRS8lKWJldmVsbGVkR0Y2Rjc=</Equation>, and its first derivative is negative. In this case, the right-hand Riemann sum underestimates the integral (i.e., the error is negative), and the left-hand sum overestimates the integral (i.e., the error is positive). Describe what happens to the error when we use left- and right-hand Riemann sums to estimate <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ki1JKG1zdWJzdXBHRiQ2Jy1JI21vR0YkNi1RJiZpbnQ7RicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0Y9LyUpc3RyZXRjaHlHRj0vJSpzeW1tZXRyaWNHRj0vJShsYXJnZW9wR0Y9LyUubW92YWJsZWxpbWl0c0dGPS8lJ2FjY2VudEdGPS8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRkwtSSNtbkdGJDYkUSIwRidGOC1JJm1mcmFjR0YkNigtRiM2JC1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8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGYW8vJSliZXZlbGxlZEdGPS8lMXN1cGVyc2NyaXB0c2hpZnRHRltvLyUvc3Vic2NyaXB0c2hpZnRHRlJGKy1GIzYmLUYsNiVRJHNpbkYnRmVuRjgtRjU2LVEwJkFwcGx5RnVuY3Rpb247RidGOEY7Rj5GQEZCRkRGRkZIRkpGTS1JKG1mZW5jZWRHRiQ2JC1GIzYkLUYsNiVRInhGJy9GZm5RJXRydWVGJy9GOVEnaXRhbGljRidGOEY4RjhGKy1JJ21zcGFjZUdGJDYmLyUnaGVpZ2h0R1EmMC4wZXhGJy8lJndpZHRoR1EmMC4zZW1GJy8lJmRlcHRoR0ZjcS8lKmxpbmVicmVha0dRJWF1dG9GJy1GNTYtUTAmRGlmZmVyZW50aWFsRDtGJ0Y4RjtGPkZARkJGREZGRkhGSkZNRmdwRjhGK0Y4</Equation>.

d)  While the error for each rectangle (i.e., the local error) on the left-hand sum appears to be nearly equal in magnitude to the local error for each corresponding rectangle on the right-hand sum, they aren't exactly the same because the graph of the function curves. Where does the difference in the local errors appear to be largest, and how is the difference in the local errors related to the second derivative of the function? (To see this effect more dramatically, try using two and/or three rectangles in the <Font style="_cstyle276">riemannsum( )</Font> command.)

e)  Based on your observations in part (d), specify two different ways in which you could use Riemann sums to improve the estimate of the integral by reducing the errors. The trick is to look for ways to estimate the integrals so that the local errors nearly cancel. For your improved methods, which feature of the integrand function would you expect to have the most significant effect on the error?

f)  Try the <Font style="_cstyle277">riemannsum( ) </Font>command on a function that we can't integrate exactly. Two examples are <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2KS1JKG1zdWJzdXBHRiQ2Jy1JI21vR0YkNi1RJiZpbnQ7RicvJSxtYXRodmFya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UtRiw2JVEieEYnLyUnaXRhbGljR1EldHJ1ZUYnL0Y5USdpdGFsaWNGJy1GUDYkRlhGOC9GV0ZSRjhGK0Y4RmNwRistSSdtc3BhY2VHRiQ2Ji8lJ2hlaWdodEdRJjAuMGV4RicvJSZ3aWR0aEdRJjAuM2VtRicvJSZkZXB0aEdGaXAvJSpsaW5lYnJlYWtHUSVhdXRvRictRjU2LVEwJkRpZmZlcmVudGlhbEQ7RidGOEY7Rj5GQEZCRkRGRkZIRkpGTUZpb0Y4RitGOA==</Equation>.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Part II: Analyzing the Errors</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">Now that we have made some qualitative observations about Riemann estimates of an integral and the associated errors, we are ready to be more quantitative in our analysis. For this we use the following commands from the <Font style="_cstyle280">student </Font>package, <Font style="_cstyle278">leftsum(f, range, n) </Font>and <Font style="_cstyle279">rightsum(f, range, n), </Font>to calculate left-hand and right-hand Riemann sums. The arguments are <Font style="_cstyle281">f</Font>, the integrand function, <Font style="_cstyle282">range, </Font>the range of the function to be integrated<Font style="_cstyle284"> </Font>and <Font style="_cstyle283">n</Font>, the number of subintervals.

We use these commands, together with the fact that the exact value of the integral <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ki1JKG1zdWJzdXBHRiQ2Jy1JI21vR0YkNi1RJiZpbnQ7RicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0Y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92YWJsZWxpbWl0c0dGPS8lJ2FjY2VudEdGPS8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRkwtSSNtbkdGJDYkUSIwRidGOC1JJm1mcmFjR0YkNigtRiM2JC1GLDYlUSUmcGk7RicvJSdpdGFsaWNHRj1GOEY4LUYjNiQtRlA2JFEiMkYnRjhGOC8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGYW8vJSliZXZlbGxlZEdGPS8lMXN1cGVyc2NyaXB0c2hpZnRHRltvLyUvc3Vic2NyaXB0c2hpZnRHRlJGKy1GIzYmLUYsNiVRJGNvc0YnRmVuRjgtRjU2LVEwJkFwcGx5RnVuY3Rpb247RidGOEY7Rj5GQEZCRkRGRkZIRkpGTS1JKG1mZW5jZWRHRiQ2JC1GIzYkLUYsNiVRInhGJy9GZm5RJXRydWVGJy9GOVEnaXRhbGljRidGOEY4RjhGKy1JJ21zcGFjZUdGJDYmLyUnaGVpZ2h0R1EmMC4wZXhGJy8lJndpZHRoR1EmMC4zZW1GJy8lJmRlcHRoR0ZjcS8lKmxpbmVicmVha0dRJWF1dG9GJy1GNTYtUTAmRGlmZmVyZW50aWFsRDtGJ0Y4RjtGPkZARkJGREZGRkhGSkZNRmdwRjhGK0Y4</Equation> is 1, to build a table of values that includes the step size <Font style="_cstyle285">h</Font>, the numerical estimates of the integral, <Font style="_cstyle286">RleftI</Font> and <Font style="_cstyle287">RrightI</Font>, and the errors in the estimates, <Font style="_cstyle303">Eleft = RelftI-1 and Eright = RrightI-1</Font>. We start with two rectangles and double the number of rectangles ten times.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L9">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">f:=cos(x):
a:=0:
b:=Pi/2.:
exactvalue:=int(f, x=a..b):
print(`The exact value of the integral`, exactvalue);
</Text-field>
</Input>
</Group>
<Group labelreference="L10">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">matrix([[n, h, left_est, right_est, left_error, right_error], 
  seq( [2^i, Pi/2/2^i, evalf(leftsum(f, x=a..b, 2^i)), evalf(rightsum(f, x=a..b,2^i)),   evalf(leftsum(f, x=a..b, 2^i))-exactvalue, evalf(rightsum(f, x=a..b, 2^i))-exactvalue], i=1..11 )]);
</Text-field>
</Input>
</Group>
<Group labelreference="L11">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L12">
<Input>
<Text-field style="Normal" layout="Normal">
The data in the table should confirm your qualitative observations from the &quot;You Try It: Visualizing the Errors&quot; above, but now we can be more specific. We make the following quantitative observations.

1)  As the number of rectangles increases, the error decreases, and, in fact, each time we double the number of rectangles or cut <Font style="_cstyle304">h</Font> in half, we cut the error roughly in half. A numerical estimate that exhibits this characteristic is said to have an error of order<Font style="_cstyle305"> h</Font>, and we designate this as <Font style="_cstyle306">O</Font>(<Font style="_cstyle326">h</Font>). 

2)  The left-hand sum overestimates the integral, whereas the right-hand some underestimates it, and, for the same number of rectangles, the errors are roughly equal in magnitude.

3)  When the number of rectangles is small, the difference between the errors for the left- and right-hand estimates is larger, showing the effect of the second derivative and the concavity of the graph on the difference in errors.

The one effect that is not evident from the numeric data is that the local error is larger when the magnitude of the first derivative, that is, the magnitude of the slope of the graph, is larger. We explore this effect further in Part III below.
</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">You Try It: On Another Function</Text-field></Title>
<Text-field style="_pstyle256" layout="_pstyle256">Perform a numerical experiment like the one in Part II on the integral <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLU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JKG1zdWJzdXBHRiQ2Jy1JI21vR0YkNi1RJiZpbnQ7RicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0Y9LyUpc3RyZXRjaHlHRj0vJSpzeW1tZXRyaWNHRj0vJShsYXJnZW9wR0Y9LyUubW92YWJsZWxpbWl0c0dGPS8lJ2FjY2VudEdGPS8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRkwtSSNtbkdGJDYkUSIwRidGOC1JJm1mcmFjR0YkNigtRiM2JC1GLDYlUSUmcGk7RicvJSdpdGFsaWNHRj1GOEY4LUYjNiQtRlA2JFEiMkYnRjhGOC8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGYW8vJSliZXZlbGxlZEdGPS8lMXN1cGVyc2NyaXB0c2hpZnRHRltvLyUvc3Vic2NyaXB0c2hpZnRHRlJGKy1GIzYkLUklbXN1cEdGJDYlLUYjNiYtRiw2JVEkc2luRidGZW5GOC1GNTYtUTAmQXBwbHlGdW5jdGlvbjtGJ0Y4RjtGPkZARkJGREZGRkhGSkZNLUkobWZlbmNlZEdGJDYkLUYjNiQtRiw2JVEieEYnL0ZmblEldHJ1ZUYnL0Y5USdpdGFsaWNGJ0Y4RjhGOEZpbi9GZ29GUkY4RistSSdtc3BhY2VHRiQ2Ji8lJ2hlaWdodEdRJjAuMGV4RicvJSZ3aWR0aEdRJjAuM2VtRicvJSZkZXB0aEdGaXEvJSpsaW5lYnJlYWtHUSVhdXRvRictRjU2LVEwJkRpZmZlcmVudGlhbEQ7RidGOEY7Rj5GQEZCRkRGRkZIRkpGTUZccUY4RitGOA==</Equation>, and then answer the questions that follow. To help, we include the commands to generate the table of values like the one in Part II.
</Text-field>
<Group labelreference="L13">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">f:=sin(x)^2:
a:=0:
b:=Pi/2.:
exactvalue:=int(f, x=a..b):
print(`The exact value of the integral`,exactvalue);
</Text-field>
</Input>
</Group>
<Group labelreference="L14">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">matrix([[n, h, left_est, right_est, left_err, right_err], 
  seq( [2^i, Pi/2/2^i,   evalf(leftsum(f, x=a..b, 2^i)), evalf(rightsum(f, x=a..b,2^i)),   evalf(leftsum(f, x=a..b,   2^i))-exactvalue, evalf(rightsum(f, x=a..b, 2^i))-exactvalue], i=1..11 )]);
</Text-field>
</Input>
</Group>
<Group labelreference="L15">
<Input>
<Text-field style="Normal" layout="Normal">
1.  What happens to the error each time the number of rectangles is doubled? What is the order of the errors for each Riemann sum estimate of the integral?

2.  Does the left-hand Riemann sum overestimate or underestimate the integral? What about the right-hand Riemann sum?

3. What effect does the second derivative of the integrand have on the difference of the errors for the left and right Riemann sums?</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Part III: The Effect of <Font bold="true" style="_cstyle336" size="18">f '</Font> on the Error</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">To quantify the effect of the slope on the error, we investigate straight-line functions,  <Equation executable="false" style="_cstyle307" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2KEYrLUYjNiYtRiw2JFEiZkYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JI21vR0YkNi1RMCZBcHBseUZ1bmN0aW9uO0YnL0Y3USdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGQS8lKXN0cmV0Y2h5R0ZBLy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field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L16">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">riemannsum:=proc(f, xrange, n, box)
 local a, p1, p2: 
 a:=array(1..2):
  if box=right then
    a[1]:=rightbox(f, xrange, n, color=black, title=`m*x`):
    p1:=rightbox(f, xrange, n, color=black, title=`error above the curve`):
    p2:=plot(f, xrange, filled=true):
    a[2]:=display(p2,p1):
    display(a);
  else
    a[1]:=leftbox(f, xrange, n, color=black, title=`m*x`): 
    p1:=leftbox(f, xrange, n, color=black, title=`error below the curve`):
    p2:=plot(f, xrange, filled=true):
    a[2]:=display(p1,p2):
    display(a); 
  fi:
end:
</Text-field>
</Input>
</Group>
<Group labelreference="L17">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">n:=5:
m:=2:
riemannsum(m*x, x=0..5, n, right);
riemannsum(m*x, x=0..5, n, left);</Text-field>
</Input>
</Group>
<Group labelreference="L18">
<Input>
<Text-field style="Normal" layout="Normal">
Now we set up a table of numeric values, but in this case we keep the number of rectangles fixed at 100 and change <Font style="_cstyle325">m</Font>, the slope of the straight-line graph, starting with <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ji1GLDYlUSJtRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUkjbW9HRiQ2LVEiPUYnL0Y4USdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGQi8lKXN0cmV0Y2h5R0ZCLyUqc3ltbWV0cmljR0ZCLyUobGFyZ2VvcEdGQi8lLm1vdmFibGVsaW1pdHNHRkIvJSdhY2NlbnRHRkIvJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZRLUkjbW5HRiQ2JFElMC4wMUYnRj5GPkYrRj4=">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ji1GLDYlUSJtRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUkjbW9HRiQ2LVEiPUYnL0Y4USdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGQi8lKXN0cmV0Y2h5R0ZCLyUqc3ltbWV0cmljR0ZCLyUobGFyZ2VvcEdGQi8lLm1vdmFibGVsaW1pdHNHRkIvJSdhY2NlbnRHRkIvJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZRLUkjbW5HRiQ2JFElMC4wMUYnRj5GPkYrRj4=</Equation> and doubling ten times. The exact values of the integrals are <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkmbWZyYWNHRiQ2KC1GIzYmLUkjbW5HRiQ2JFEjMjVGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRictSSNtb0dGJDYtUTEmSW52aXNpYmxlVGltZXM7RidGNC8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGPS8lKXN0cmV0Y2h5R0Y9LyUqc3ltbWV0cmljR0Y9LyUobGFyZ2VvcEdGPS8lLm1vdmFibGVsaW1pdHNHRj0vJSdhY2NlbnRHRj0vJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZMLUkjbWlHRiQ2JVEibUYnLyUnaXRhbGljR1EldHJ1ZUYnL0Y1USdpdGFsaWNGJ0Y0LUYjNiQtRjE2JFEiMkYnRjRGNC8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGXG8vJSliZXZlbGxlZEdGPUY0">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkmbWZyYWNHRiQ2KC1GIzYmLUkjbW5HRiQ2JFEjMjVGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRictSSNtb0dGJDYtUTEmSW52aXNpYmxlVGltZXM7RidGNC8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGPS8lKXN0cmV0Y2h5R0Y9LyUqc3ltbWV0cmljR0Y9LyUobGFyZ2VvcEdGPS8lLm1vdmFibGVsaW1pdHNHRj0vJSdhY2NlbnRHRj0vJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZMLUkjbWlHRiQ2JVEibUYnLyUnaXRhbGljR1EldHJ1ZUYnL0Y1USdpdGFsaWNGJ0Y0LUYjNiQtRjE2JFEiMkYnRjRGNC8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGXG8vJSliZXZlbGxlZEdGPUY0</Equation>.
</Text-field>
</Input>
</Group>
<Group labelreference="L19">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('m,n,f,x'):
m:=0.1*2^i:
f:=m*x:
a:=0:
b:=5:</Text-field>
</Input>
</Group>
<Group labelreference="L20">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">exactvalue:=int(f,x=a..b):
print(`The exact value of the integral is`, exactvalue);
matrix([[slope, exact, left_est, right_est, left_err, right_err], 
  seq( [m(i), exactvalue(i), evalf(leftsum(f, x=a..b, 100)), evalf(rightsum(f, x=a..b,100)),   evalf(leftsum(f, x=a..b, 100))-exactvalue, evalf(rightsum(f, x=a..b, 100))-exactvalue], i=0..10 )]);
</Text-field>
</Input>
</Group>
<Group labelreference="L21">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L22">
<Input>
<Text-field style="Normal" layout="Normal">
What happens to the error each time you double the slope of the line? 

Note that for nonlinear functions, the effect of the slope on the error is local in that it varies from point to point on the graph. But if we double all of the slopes, we would also double the error in using a left- or right-hand Riemann sum to estimate the integral.

Note also that the differences in the magnitudes of the errors are all 0. This supports the observation that the difference in the errors is dependent upon the second derivative or the concavity of the graph. One method for improving our numerical estimate of the integral is to add the left- and right-hand estimates and then divide the result by two. The idea that motivates this is that the errors for the two estimates will nearly cancel each other out when we add the left- and right-hand sums together. For linear functions, the second derivative is 0, and the graph has no concavity; therefore, this improvement will give the exact value of the integral.
</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">You Try It: The Effect of <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEiZkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy9GM1Enbm9ybWFsRic=">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEiZkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy9GM1Enbm9ybWFsRic=</Equation> <Font bold="true" style="_cstyle329" size="18">&quot;</Font> on the Error Difference</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">Design a numerical experiment like the one in Part III to demonstrate the effect of the value of the second derivative on the difference between the errors in the estimate of the integral that are obtained using right- and left-hand Riemann sums. To do this, select a simple function that has a constant second derivative, is easy to integrate, and allows you to change the value of the second derivative. Generate a table of numerical values that shows the values of the second derivative and the difference in the errors for the left and right Riemann sums. Take 1 as the starting value of the second derivative, and double its value ten times. Try functions that are concave down as well as ones that are concave up, and summarize the results of your investigation. (We have put the solution for this problem in the next input section with the code hidden. Try to do it on your own, and then look at our solution.) </Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Solution</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L23">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('m,n,f,x'):
m:=2^i:
f:=1/2*m*x^2:
a:=0:
b:=5:exactvalue:=int(f,x=a..b):
print(`The exact value of the integral is`, exactvalue);
matrix([[`f''(x)`, exact, left_est, right_est, left_err, right_err], seq( [m(i), evalf(exactvalue(i)), evalf(leftsum(f, x=a..b, 100)), evalf(rightsum(f, x=a..b,100)), evalf(leftsum(f, x=a..b, 100))-exactvalue, evalf(rightsum(f, x=a..b, 100))-exactvalue], i=0..10 )]);
</Text-field>
</Input>
</Group>
</Section>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Part IV: Trapezoids and Midpoint Riemann Sums</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">In this part, we investigate two ways to improve the efficiency of numerical estimates of definite integrals.
</Text-field>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Trapezoids</Text-field></Title>
<Text-field style="Normal" layout="Normal">
We achieve the first improvement by adding together the left and right Riemann sum estimates of the integral and dividing by two. The motivation for this approach is that the errors in the left and right sums should nearly cancel each other out. In the next section, we form the new function <Font style="_cstyle288">trapezoid( )</Font> that does this. 
</Text-field>
<Group labelreference="L24">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">trapezoid:=proc(f, a, b, n):
  (evalf(leftsum(f, x=a..b, n)+rightsum(f, x=a..b, n)))/2:
end:</Text-field>
</Input>
</Group>
<Group labelreference="L25">
<Input>
<Text-field style="Normal" layout="Normal">
The trapezoid method gets its name from the signed area of a trapezoid in each subinterval that results from adding the signed areas of the left and right rectangles in each subinterval and dividing by 2. That is, <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ji1JJm1mcmFjR0YkNigtRiM2JkYrLUYjNihGKy1GIzYnRistRiM2Ji1GLDYlUSJmRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUkjbW9HRiQ2LVEwJkFwcGx5RnVuY3Rpb247RicvRkNRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0ZNLyUpc3RyZXRjaHlHRk0vJSpzeW1tZXRyaWNHRk0vJShsYXJnZW9wR0ZNLyUubW92YWJsZWxpbWl0c0dGTS8lJ2FjY2VudEdGTS8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRmZuLUkobWZlbmNlZEdGJDYkLUYjNiQtSSVtc3ViR0YkNiUtRiw2JVEiY0YnRj9GQi1GIzYkLUYsNiVRJWxlZnRGJ0Y/RkJGSS8lL3N1YnNjcmlwdHNoaWZ0R1EiMEYnRklGSUZJLUZGNi1RMSZJbnZpc2libGVUaW1lcztGJ0ZJRktGTkZQRlJGVEZWRlhGWkZ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2FjY2VudEdGPy8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRk4tSShtZmVuY2VkR0YkNiUtRiM2JC1JJW1zdWJHRiQ2JS1GLDYkUSJjRidGNC1GIzYkLUYsNiRRJnJpZ2h0RidGNEY0LyUvc3Vic2NyaXB0c2hpZnRHUSIwRidGNC8lJ2l0YWxpY0dGP0Y7RjRGK0Y0">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ji1GLDYkUSJmRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUkjbW9HRiQ2LVEwJkFwcGx5RnVuY3Rpb247RicvRjVRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0Y/LyUpc3RyZXRjaHlHRj8vJSpzeW1tZXRyaWNHRj8vJShsYXJnZW9wR0Y/LyUubW92YWJsZWxpbWl0c0dGPy8lJ2FjY2VudEdGPy8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRk4tSShtZmVuY2VkR0YkNiUtRiM2JC1JJW1zdWJHRiQ2JS1GLDYkUSJjRidGNC1GIzYkLUYsNiRRJnJpZ2h0RidGNEY0LyUvc3Vic2NyaXB0c2hpZnRHUSIwRidGNC8lJ2l0YWxpY0dGP0Y7RjRGK0Y0</Equation> is the length of the other parallel side, and <Font style="_cstyle310">h</Font> is the distance between the two sides.

Now we use <Font style="_cstyle289">trapezoid( )</Font> to estimate <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ki1JKG1zdWJzdXBHRiQ2Jy1JI21vR0YkNi1RJiZpbnQ7RicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWx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Rj0vJShsYXJnZW9wR0Y9LyUubW92YWJsZWxpbWl0c0dGPS8lJ2FjY2VudEdGPS8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRkwtSSNtbkdGJDYkUSIwRidGOC1JJm1mcmFjR0YkNigtRiM2JC1GLDYlUSUmcGk7RicvJSdpdGFsaWNHRj1GOEY4LUYjNiQtRlA2JFEiMkYnRjhGOC8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGYW8vJSliZXZlbGxlZEdGPS8lMXN1cGVyc2NyaXB0c2hpZnRHRltvLyUvc3Vic2NyaXB0c2hpZnRHRlJGKy1GIzYmLUYsNiVRJGNvc0YnRmVuRjgtRjU2LVEwJkFwcGx5RnVuY3Rpb247RidGOEY7Rj5GQEZCRkRGRkZIRkpGTS1JKG1mZW5jZWRHRiQ2JC1GIzYkLUYsNiVRInhGJy9GZm5RJXRydWVGJy9GOVEnaXRhbGljRidGOEY4RjhGKy1JJ21zcGFjZUdGJDYmLyUnaGVpZ2h0R1EmMC4wZXhGJy8lJndpZHRoR1EmMC4zZW1GJy8lJmRlcHRoR0ZjcS8lKmxpbmVicmVha0dRJWF1dG9GJy1GNTYtUTAmRGlmZmVyZW50aWFsRDtGJ0Y4RjtGPkZARkJGREZGRkhGSkZNRmdwRjhGK0Y4</Equation> with ten subintervals and compare the result with the left- and right-hand Riemann sums. First, we calculate the exact value of the integral.
</Text-field>
</Input>
</Group>
<Group labelreference="L26">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('f, a, b, n, exactvalue'):
f:=cos(x):
a:=0:
b:=Pi/2:
exactvalue:=int(f,x=a..b):
print(`The exact value of the integral is `,exactvalue);
</Text-field>
</Input>
</Group>
<Group labelreference="L27">
<Input>
<Text-field style="Normal" layout="Normal">
Now we calculate the estimates of the integral .
</Text-field>
</Input>
</Group>
<Group labelreference="L28">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">trapezoid(f, a, b, 10);
evalf(leftsum(f, x=a..b, 10));
evalf(rightsum(f, x=a..b, 10));</Text-field>
</Input>
</Group>
<Group labelreference="L29">
<Input>
<Text-field style="Normal" layout="Normal">
And we compute the errors.
</Text-field>
</Input>
</Group>
<Group labelreference="L30">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">trapezoid(f, a, b, 10)-exactvalue;
evalf(leftsum(f, x=a..b, 10))-exactvalue;
evalf(rightsum(f, x=a..b, 10))-exactvalue;</Text-field>
</Input>
</Group>
<Group labelreference="L31">
<Input>
<Text-field style="Normal" layout="Normal">
For the same number of subintervals, we get a much more precise estimate of the integral from the trapezoid method.
</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Midpoint Riemann Sums</Text-field></Title>
<Text-field style="Normal" layout="Normal">
The second improvement we consider is to use the midpoint of each subinterval in a Riemann sum. The effect of doing this is to nearly cancel the error on either side of each midpoint in each subinterval. If the function we integrate is increasing over a subinterval, then the midpoint rectangle will overestimate the actual area on the left side of the midpoint and will underestimate, by nearly the same amount, the actual area on the right side of the midpoint. Again we expect that these errors will nearly cancel each other out. Here is the <Font style="_cstyle290">riemSumMid( )</Font> command.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L32">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">riemSumMid:=proc(f,a,b,n):
evalf(sum('subs(x=(a+(i-1/2)*(b-a)/n),f)*(b-a)/n', i=1..n)):
end:</Text-field>
</Input>
</Group>
<Group labelreference="L33">
<Input>
<Text-field style="Normal" layout="Normal">
Let's try it on our old friend and compare the result with left and right Riemann sums and with the trapezoid estimate. First, we calculate the exact value of the integral.
</Text-field>
</Input>
</Group>
<Group labelreference="L34">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('f, a, b, n, exactvalue'):
f:=cos(x):
a:=0:
b:=Pi/2:
exactvalue:=evalf(int(f,x=a..b)):
print(`The exact value of the integral is `,exactvalue);
</Text-field>
</Input>
</Group>
<Group labelreference="L35">
<Input>
<Text-field style="Normal" layout="Normal">
Now we calculate the estimates of the integral.
</Text-field>
</Input>
</Group>
<Group labelreference="L36">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">riemSumMid(cos(x), 0, Pi/2, 10);
trapezoid(f, a, b, 10);
evalf(leftsum(f, x=a..b, 10));
evalf(rightsum(f, x=a..b, 10));
</Text-field>
</Input>
</Group>
<Group labelreference="L37">
<Input>
<Text-field style="Normal" layout="Normal">
Again, we compute the errors.
</Text-field>
</Input>
</Group>
<Group labelreference="L38">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">riemSumMid(cos(x), 0, Pi/2, 10)-exactvalue;
trapezoid(f, a, b, 10)-exactvalue;
evalf(leftsum(f, x=a..b, 10))-exactvalue;
evalf(rightsum(f, x=a..b, 10))-exactvalue;</Text-field>
</Input>
</Group>
<Group labelreference="L39">
<Input>
<Text-field style="Normal" layout="Normal">
For the same number of intervals, we get a much more precise estimate of the integral using the midpoint rule; it is even more precise than the estimate given by the trapezoid rule. What relationship does the error for the midpoint estimate seem to have with that for the trapezoid estimate?
</Text-field>
</Input>
</Group>
</Section>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">You Try It: On Some Other Functions</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">Compare the Riemann left, Riemann right, trapezoid, and midpoint estimates of some integrals that you pick. How does the error for the midpoint rule compare with the error for the trapezoid rule with the same number of subdivisions? Also, try increasing the number of subintervals. What happens to the errors when you double the number of subintervals?</Text-field>
<Text-field style="Normal" layout="Normal">
Here are some integrals that you might want to try:
</Text-field>
<Text-field style="Normal" layout="Normal"><Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ki1JKG1zdWJzdXBHRiQ2Jy1JI21vR0YkNi1RJiZpbnQ7RicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0Y9LyUpc3RyZXRjaHlHRj0vJSpzeW1tZXRyaWNHRj0vJShsYXJnZW9wR0Y9LyUubW92YWJsZWxpbWl0c0dGPS8lJ2FjY2VudEdGPS8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRkwtSSNtbkdGJDYkUSIwRidGOC1JJm1mcmFjR0YkNigtRiM2JC1GLDYlUSUmcGk7RicvJSdpdGFsaWNHRj1GOEY4LUYjNiQtRlA2JFEiMkYnRjhGOC8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGYW8vJSliZXZlbGxlZEdGPS8lMXN1cGVyc2NyaXB0c2hpZnRHRltvLyUvc3Vic2NyaXB0c2hpZnRHRlJGKy1GIzYmLUYsNiVRJHNpbkYnRmVuRjgtRjU2LVEwJkFwcGx5RnVuY3Rpb247RidGOEY7Rj5GQEZCRkRGRkZIRkpGTS1JKG1mZW5jZWRHRiQ2JC1GIzYkLUYsNiVRInhGJy9GZm5RJXRydWVGJy9GOVEnaXRhbGljRidGOEY4RjhGKy1JJ21zcGFjZUdGJDYmLyUnaGVpZ2h0R1EmMC4wZXhGJy8lJndpZHRoR1EmMC4zZW1GJy8lJmRlcHRoR0ZjcS8lKmxpbmVicmVha0dRJWF1dG9GJy1GNTYtUTAmRGlmZmVyZW50aWFsRDtGJ0Y4RjtG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RktRLDAuMjIyMjIyMmVtRicvRk5GXm8tRiw2JVEieEYnLyUnaXRhbGljR1EldHJ1ZUYnL0Y5USdpdGFsaWNGJ0Y4RistSSdtc3BhY2VHRiQ2Ji8lJ2hlaWdodEdRJjAuMGV4RicvJSZ3aWR0aEdRJjAuM2VtRicvJSZkZXB0aEdGXXAvJSpsaW5lYnJlYWtHUSVhdXRvRictRjU2LVEwJkRpZmZlcmVudGlhbEQ7RidGOEY7Rj5GQEZCRkRGRkZIRkpGTUZgb0Y4RitGOA==</Equation></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">To help you out, we provide some commands in the two cells that follow. </Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L40">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('f, a, b, n, exactvalue'):
f:=cos(x):
a:=0:
b:=Pi/2:
exactvalue:=evalf(int(f,x=a..b)):
n:=10:
print(`The exact value of the integral is `, exactvalue);
print(`The midpoint estimate is`, evalf(riemSumMid(f, a, b, n)));
print(`The trapezoid estimate is`, trapezoid(f, a, b, n));
print(`The left Riemann estimate is`, evalf(leftsum(f, x=a..b,n)));
print(`The right Riemann estimate is`, evalf(rightsum(f, x=a..b,n)));

</Text-field>
</Input>
</Group>
<Group labelreference="L41">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">print(`The midpoint error is`, riemSumMid(f, a, b, n)-exactvalue);
print(`The trapezoid error is`, trapezoid(f, a, b, n)-exactvalue);
print(`The left Riemann error is`, evalf(leftsum(f, x=a..b,n))-exactvalue);
print(`The right Riemann estimate is`, evalf(rightsum(f, x=a..b,n))-exactvalue);
</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Part V: Experiment with Trapezoids and Midpoints</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">In this part, we do some numerical experiments to determine what factors affect the errors when we use trapezoids and midpoint Riemann sums to estimate a definite integral. </Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">The Effect of the Step Size on the Error</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">First, we would like to determine the effect of the step size <Font style="_cstyle311">h </Font>on the error. We build a table similar to the one in Part II.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L42">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('f, a, b, n,i,j, exactvalue'):
f:=cos(x):
a:=0:
b:=Pi/2:
exactvalue:=int(f,x=a..b):
print(`The exact value of the integral is `, exactvalue);
matrix([[n, h, trap_est, mid_est, trap_err, mid_err], 
  seq( [2^j, Pi/2/2^j, trapezoid(f, a, b, 2^j), riemSumMid(f, a, b, 2^j), 
  trapezoid(f, a, b, 2^j)-exactvalue, riemSumMid(f, a, b, 2^j)-exactvalue], 
j=1..11 )]);
</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">The Effect of <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEiZkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy9GM1Enbm9ybWFsRic=">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEiZkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy9GM1Enbm9ybWFsRic=</Equation> <Font bold="true" style="_cstyle330" size="18">&quot;</Font> on the Error</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">Based on the observations made in Parts II, III, and IV, we conjecture that the error for these methods depend on the magnitude of the second derivative of the integrand function. We test our conjecture by comparing the error in estimating the area under the quadratic functions of the form <Equation executable="false" style="_cstyle312" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2J0YrLUYjNiYtRiw2JFEiZkYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JI21vR0YkNi1RMCZBcHBseUZ1bmN0aW9uO0YnL0Y3USdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGQS8lKXN0cmV0Y2h5R0ZBLyUqc3ltbWV0cmljR0ZBLyUobGFyZ2VvcEdGQS8lLm1vdmFibGVsaW1pdHNHRkEvJSdhY2NlbnRHRkEvJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZQLUkobWZlbmNlZEdGJDYlLUYjNiQtRiw2JFEieEYnRjZGNi8lJ2l0YWxpY0dGQUY9RjYtRjo2LlEiPUYnRmVuRj1GP0ZCRkRGRkZIRkpGTC9GT1EsMC4yNzc3Nzc4ZW1GJy9GUkZbby1JJm1mcmFjR0YkNigtRiM2Jy1GLDYkUSJhRidGNi1GOjYtUTEmSW52aXNpYmxlVGltZXM7RidGPUY/RkJGREZGRkhGSkZMRk5GUS1GIzYkLUklbXN1cEdGJDYlRlgtSSNtbkdG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yle313">x</Font> = 0 and <Font style="_cstyle314">x</Font> = 5 for various values of <Font style="_cstyle315">a</Font>. The exact values of the integrals are <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2J0YrLUYjNiktSShtc3Vic3VwR0YkNictSSNtb0dGJDYtUSYmaW50O0YnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGPy8lKXN0cmV0Y2h5R0Y/LyUqc3ltbWV0cmljR0Y/LyUobGFyZ2VvcEdGPy8lLm1vdmFibGVsaW1pdHNHRj8vJSdhY2NlbnRHRj8vJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZOLUkjbW5HRiQ2JFEiMEYnRjotRlI2JFEiNUYnRjovJTFzdXBlcnNjcmlwdHNoaWZ0R1EiMkYnLyUvc3Vic2NyaXB0c2hpZnRHRlQtSSZtZnJhY0dGJDYoLUYjNictRiw2JVEiYUYnLyUnaXRhbGljR1EldHJ1ZUYnL0Y7USdpdGFsaWNGJy1GNzYtUTEmSW52aXNpYmxlVGltZXM7RidGOkY9RkBGQkZERkZGSEZKRkxGTy1GIzYkLUklbXN1cEdGJDYlLUYsNiVRInhGJ0Zfb0Ziby1GUjYkRlpGOi9GWUZURjpGK0Y6LUYjNiRGX3BGOi8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGaXAvJSliZXZlbGxlZEdGP0YrLUknbXNwYWNlR0YkNiYvJSdoZWlnaHRHUSYwLjBleEYnLyUmd2lkdGhHUSYwLjNlbUYnLyUmZGVwdGhHRmNxLyUqbGluZWJyZWFrR1ElYXV0b0YnLUY3Ni1RMCZEaWZmZXJlbnRpYWxEO0YnRjpGPUZARkJGREZGRkhGSkZMR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luZWJyZWFrR1ElYXV0b0YnLUY3Ni1RMCZEaWZmZXJlbnRpYWxEO0YnRjpGPUZARkJGREZGRkhGSkZMRk9GXHBGOi1GNzYtUSI9RidGOkY9RkBGQkZERkZGSEZKL0ZNUSwwLjI3Nzc3NzhlbUYnL0ZQRmNyLUZobjYoLUYjNiYtRlI2JFEkMTI1RidGOkZkb0Zcb0Y6LUYjNiQtRlI2JFEiNkYnRjpGOkZkcEZncEZqcEZccUY6RitGOg==</Equation> , and the second derivative of <Font style="_cstyle316">f</Font>(<Font style="_cstyle328">x</Font>) is equal to <Font style="_cstyle317">a</Font>. We set up a table in which <Font style="_cstyle318">a</Font> starts at 0.1 and doubles ten times. The number of subintervals is kept constant at 100. </Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L43">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('ac,n,i,j,f,x'):
ac:=0.1*2^j:
f:=1/2*ac*x^2:
a:=0:
b:=5:
exactvalue:=int(f,x=a..b):
Digits:=(7);
print(`The exact value of the integral is`, exactvalue);
matrix([[f_2(x), exact, trap_est, mid_est, trap_err, mid_err], 
  seq( [ac(j), evalf(exactvalue(j)), trapezoid(f,a,b, 100), riemSumMid(f, a,b,100),     trapezoid(f, a,b, 100)-exactvalue, riemSumMid(f,a,b,100)-exactvalue], 
j=0..10 )]);
</Text-field>
</Input>
</Group>
<Group labelreference="L44">
<Input>
<Text-field style="Normal" layout="Normal">
In &quot;You Try It&quot; below, we ask you to summarize the results of these experiments.
</Text-field>
</Input>
</Group>
</Section>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">You Try It: Summarize the Experiment's Results</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">Summarize the results of the numerical experiments in Part V. In your summary, address the following items.

a)  How is the error for each method related to the number of subintervals <Font style="_cstyle320">n</Font> and the interval width <Font style="_cstyle319">h</Font>? What is the order of the error for each method? (Note: If cutting the interval width in half reduces the error by a factor of <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUklbXN1cEdGJDYlLUkobWZlbmNlZEdGJDYkLUkmbWZyYWNHRiQ2KC1GIzYkLUkjbW5HRiQ2JFEiMUYnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJ0Y6LUYjNiQtRjc2JFEiMkYnRjpGOi8lLmxpbmV0aGlja25lc3NHRjkvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGRi8lKWJldmVsbGVkR1EmZmFsc2VGJ0Y6LUkjbWlHRiQ2JVEibkYnLyUnaXRhbGljR1EldHJ1ZUYnL0Y7USdpdGFsaWNGJy8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRidGOg==">LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUklbXN1cEdGJDYlLUkobWZlbmNlZEdGJDYkLUkmbWZyYWNHRiQ2KC1GIzYkLUkjbW5HRiQ2JFEiMUYnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJ0Y6LUYjNiQtRjc2JFEiMkYnRjpGOi8lLmxpbmV0aGlja25lc3NHRjkvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGRi8lKWJldmVsbGVkR1EmZmFsc2VGJ0Y6LUkjbWlHRiQ2JVEibkYnLyUnaXRhbGljR1EldHJ1ZUYnL0Y7USdpdGFsaWNGJy8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRidGOg==</Equation>, then the error is of order <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5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FR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ji1GLDYlUSJPRicvJSdpdGFsaWNHUSZmYWxzZUYnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy1JI21vR0YkNi1RMCZBcHBseUZ1bmN0aW9uO0YnRjcvJSZmZW5jZUdGNi8lKnNlcGFyYXRvckdGNi8lKXN0cmV0Y2h5R0Y2LyUqc3ltbWV0cmljR0Y2LyUobGFyZ2VvcEdGNi8lLm1vdmFibGVsaW1pdHNHRjYvJSdhY2NlbnRHRjYvJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZOLUkobWZlbmNlZEdGJDYlLUYjNiQtSSVtc3VwR0YkNiUtRiw2JFEiaEYnL0Y4USdpdGFsaWNGJy1GLDYkUSJuRidGZm4vJTFzdXBlcnNjcmlwdHNoaWZ0R1EiMEYnRmZuRjRGN0ZmbkYrRmZu</Equation>.)

b)  How is the error for the trapezoid method related to the error for the midpoint Riemann sum?

c)  How is the error related to the second derivative of the integrand function? (To answer this completely, repeat the second experiment in Part V for negative values of <Font style="_cstyle322">a</Font>.) 

d)  Are your conclusions consistent with the trapezoid error formula that is found in the text?

e)  From the pattern of errors for the trapezoid method and the midpoint Riemann sum method, specify how you might combine these two estimates of the integral so that the errors will nearly cancel each other. Compare your idea for combining the estimates with those of other students.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Part VI: Simpson's Method</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">Noting that the magnitude of the error for the trapezoid method is approximately two times the magnitude of the error for a midpoint Riemann sum with the same number of subintervals, we can make yet another improvement in the efficiency of our numerical estimations of the integrals. If we add two midpoint estimates and one trapezoid estimate and divide the result by three, the errors for the two methods should nearly cancel. The result of this combination is called Simpson's method.

To illustrate this, consider the following estimates of the integral <Equation executable="false" style="2D Comment" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ki1JKG1zdWJzdXBHRiQ2Jy1JI21vR0YkNi1RJiZpbnQ7RicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0Y9LyUpc3RyZXRjaHlHRj0vJSpzeW1tZXRyaWNHRj0vJShsYXJnZW9wR0Y9LyUubW92YWJsZWxpbWl0c0dGPS8lJ2FjY2VudEdGPS8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHRkwtSSNtbkdGJDYkUSIwRidGOC1JJm1mcmFjR0YkNigtRiM2JC1GLDYlUSUmcGk7RicvJSdpdGFsaWNHRj1GOEY4LUYjNiQtRlA2JFEiMkYnRjhGOC8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGYW8vJSliZXZlbGxlZEdGPS8lMXN1cGVyc2NyaXB0c2hpZnRHRltvLyUvc3Vic2NyaXB0c2hpZnRHRlJGKy1GIzYmLUYsNiVRJGNvc0YnRmVuRjgtRjU2LVEwJkFwcGx5RnVuY3Rpb247RidGOEY7Rj5GQEZCRkRGRkZIRkpGTS1JKG1mZW5jZWRHRiQ2JC1GIzYkLUYsNiVRInhGJy9GZm5RJXRydWVGJy9GOVEnaXRhbGljRidGOEY4RjhGKy1JJ21zcGFjZUdGJDYmLyUnaGVpZ2h0R1EmMC4wZXhGJy8lJndpZHRoR1EmMC4zZW1GJy8lJmRlcHRoR0ZjcS8lKmxpbmVicmVha0dRJWF1dG9GJy1GNTYtUTAmRGlmZmVyZW50aWFsRDtGJ0Y4RjtGP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ine them as indicated above and calculate the error for the new estimate.</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Group labelreference="L45">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('f, a, b, n, i,j, exactvalue'):
f:=cos(x):
a:=0:
b:=Pi/2:
n:=10:
exactvalue:=evalf(int(f,x=a..b)):

trap:=trapezoid(f,a,b,n):
mid:=riemSumMid(f,a,b,n):

simps:=(trap+2*mid)/3:

print(`The exact value of the integral is `, exactvalue);
print(`The trapezoid estimate is`, trap);
print(`The trapezoid error is`, trap-exactvalue);
print(`The midpoint estimate is`, mid);
print(`The midpoint error is`, mid-exactvalue);
print(`The Simpson estimate is`, simps);
print(`The error for Simpson's estimate is`, simps-exactvalue);
</Text-field>
</Input>
</Group>
<Group labelreference="L46">
<Input>
<Text-field style="Normal" layout="Normal">
Since Simpson's method requires three function evaluations in each subinterval, one at each end point for the trapezoid plus one at the mid point, we count the number of subintervals differently. If we take the dividing points for the subintervals to be all of the places where the integrand function is evaluated, then there are actually twice as many subintervals for Simpson's method than there would be for the trapezoid method or the midpoint Riemann sum. One consequence of this is that we need an even number of subintervals for Simpson's method to work. 

We use <Font style="_cstyle323">Maple's</Font> built-in <Font style="_cstyle291">simpson( )</Font> function to estimate the definite integral. 
</Text-field>
<Text-field style="Normal" layout="Normal">Let's use it to estimate <Equation executable="false" style="_cstyle327" input-equation="" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ki1JKG1zdWJzdXBHRiQ2Jy1JI21vR0YkNi5RJiZpbnQ7RicvJSdpdGFsaWNHUSZmYWxzZUYnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy8lJmZlbmNlR0Y6LyUqc2VwYXJhdG9yR0Y6LyUpc3RyZXRjaHlHRjovJSpzeW1tZXRyaWNHRjovJShsYXJnZW9wR0Y6LyUubW92YWJsZWxpbWl0c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Sdyc3BhY2VHRk4tSSNtbkdGJDYlUSIwRidGOEY7LUkmbWZyYWNHRiQ2KC1GIzYkLUYsNiVRJSZwaTtGJ0Y4RjsvRjxRJ2l0YWxpY0YnLUYjNiQtRlI2JVEiMkYnRjhGO0Znbi8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGY28vJSliZXZlbGxlZEdGOi8lMXN1cGVyc2NyaXB0c2hpZnRHRl1vLyUvc3Vic2NyaXB0c2hpZnRHRlRGKy1GIzYmLUYsNiVRJGNvc0YnRjhGOy1GNTYtUTAmQXBwbHlGdW5jdGlvbjtGJ0Y7Rj5GQEZCRkRGRkZIRkpGTEZPLUkobWZlbmNlZEdGJDYlLUYjNiQtRiw2JFEieEYnRmduRmduRjhGO0ZnbkYrLUknbXNwYWNlR0YkNiYvJSdoZWlnaHRHUSYwLjBleEYnLyUmd2lkdGhHUSYwLjNlbUYnLyUmZGVwdGhHRmFxLyUqbGluZWJyZWFrR1ElYXV0b0YnLUY1Ni5RMCZEaWZmZXJlbnRpYWxEO0YnRjhGO0Y+RkBGQkZERkZGSEZKRkxGT0ZpcEZnbkYrRmdu</Equation> and then calculate the errors, comparing the results with those obtained using trapezoids and midpoint Riemann sums.
</Text-field>
</Input>
</Group>
<Group labelreference="L47">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('f, a, b, n, i,j, exactvalue'):
f:=cos(x):
a:=0:
b:=Pi/2:
n:=6:
exactvalue:=evalf(int(f,x=a..b)):
print(`The exact value of the integral is `, exactvalue);
print(`The Simpson estimate of the integral is`, evalf(simpson(f,x=a..b,n)));
print(`The trapezoid estimate of the integral is`, trap);
print(`The midpoint estimate is`, riemSumMid(f,a,b,n));

</Text-field>
</Input>
</Group>
<Group labelreference="L48">
<Input>
<Text-field style="Normal" layout="Normal">
Now we compare the errors.
</Text-field>
</Input>
</Group>
<Group labelreference="L49">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">print(`The error in the Simpson estimate is`, evalf(simpson(f,x=a..b,n))-exactvalue);
print(`The error in the trapezoid estimate is`, trapezoid(f,a,b,n)-exactvalue);
print(`The error in the midpoint is`, riemSumMid(f,a,b,n)-exactvalue);
</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1"> You Try It: Experiment with Simpson</Text-field></Title>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal">Perform some numerical experiments like those in the preceding parts to show that the order of the error for Simpson's method is fourth. Also show that the local error is proportional to the fourth derivative of the integrand function. (We have put the solutions for this problem in the next two sections. Try to do it on your own, and then look at our solutions.)</Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Solution 1</Text-field></Title>
<Group labelreference="L50">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('f, a, b, n, i,j, exactvalue'):
f:=cos(x):
a:=0:
b:=Pi/2:
exactvalue:=evalf(int(f,x=a..b)):
Digits:=(20):
print(`The exact value of the integral is `, exactvalue);
matrix([[n, h, Simpson_estimate, Simpson_error], 
  seq( [2^j, Pi/2/2^j, evalf(simpson(f,x=a..b, 2^j)),     evalf(simpson(f,x=a..b,2^j))-exactvalue], 
j=1..11 )]);
</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="true" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Solution 2</Text-field></Title>
<Group labelreference="L51">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">unassign('f, a, b, n, i,j, exactvalue'):
m:=0.1*2^j:
f:=m/24*x^4:
a:=0:
b:=5:
exactvalue:=int(f,x=a..b):
Digits:=(12):
print(`The exact value of the integral is `, exactvalue);
matrix([[f_4, h, exact, Simpson_estimate, Simpson_error], 
  seq( [m, Pi/2/2^j, exactvalue, evalf(simpson(f,x=a..b, 100)),     evalf(simpson(f,x=a..b,100)-exactvalue)], 
j=0..10 )]);
</Text-field>
</Input>
</Group>
<Group labelreference="L52">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Section>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field style="Normal" layout="Normal"></Text-field>
</Section>
</Section>
<Text-field style="Normal" layout="Normal"></Text-field>
<Text-field superscript="false" placeholder="false" executable="false" selection-placeholder="false" italic="false" size="12" bold="false" subscript="false" family="Times New Roman" opaque="false" underline="false" background="[255,255,255]" readonly="false" foreground="[0,0,0]" alignment="left" firstindent="0" spacebelow="0" leftmargin="0" linespacing="0.0" initial="0" linebreak="space" rightmargin="0" bulletsuffix="" spaceabove="0" bullet="none" pagebreak-before="false"></Text-field>
<Text-field superscript="false" placeholder="false" executable="false" selection-placeholder="false" italic="false" size="12" bold="false" subscript="false" family="Times New Roman" opaque="false" underline="false" background="[255,255,255]" readonly="false" foreground="[0,0,0]" alignment="left" firstindent="0" spacebelow="0" leftmargin="0" linespacing="0.0" initial="0" linebreak="space" rightmargin="0" bulletsuffix="" spaceabove="0" bullet="none" pagebreak-before="false"></Text-field>
<Text-field superscript="false" placeholder="false" executable="false" selection-placeholder="false" italic="false" size="12" bold="false" subscript="false" family="Times New Roman" opaque="false" underline="false" background="[255,255,255]" readonly="false" foreground="[0,0,0]" alignment="left" firstindent="0" spacebelow="0" leftmargin="0" linespacing="0.0" initial="0" linebreak="space" rightmargin="0" bulletsuffix="" spaceabove="0" bullet="none" pagebreak-before="false"></Text-field>
<Text-field superscript="false" placeholder="false" executable="false" selection-placeholder="false" italic="false" size="12" bold="false" subscript="false" family="Times New Roman" opaque="false" underline="false" background="[255,255,255]" readonly="false" foreground="[0,0,0]" alignment="left" firstindent="0" spacebelow="0" leftmargin="0" linespacing="0.0" initial="0" linebreak="space" rightmargin="0" bulletsuffix="" spaceabove="0" bullet="none" pagebreak-before="false"></Text-field>
<Text-field superscript="false" placeholder="false" executable="false" selection-placeholder="false" italic="false" size="12" bold="false" subscript="false" family="Times New Roman" opaque="false" underline="false" background="[255,255,255]" readonly="false" foreground="[0,0,0]" alignment="left" firstindent="0" spacebelow="0" leftmargin="0" linespacing="0.0" initial="0" linebreak="space" rightmargin="0" bulletsuffix="" spaceabove="0" bullet="none" pagebreak-before="false"></Text-field>
</Worksheet>