{VERSION 6 0 "IBM INTEL NT" "6.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{CSTYLE "" -1 256 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }
{CSTYLE "" -1 257 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1
259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 0 1 0 0
0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 1 18 0 0 0 0 0 0 0 0 0
0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0
0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading
1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }
1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1
-1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2
0 1 }}
{SECT 0 {PARA 256 "" 0 "" {TEXT 256 35 "Calculus Exploration 11: Arc L
ength" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "
" {TEXT 257 439 "The following is the Maple code for the Arc Length Ma
plet and the Approximate Integration Maplet. Note that arc length (cur
ve length) problems often give rise to integrals with difficult (or no
nexistent) primitive antiderivatives expressible in terms of elementar
y functions. This means that we will be developing new techniques of \+
integration in order to find some of the new antiderivatives that aris
e from various arc length problems. " }{TEXT -1 0 "" }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 262 583 "In this exploration, \+
you should use the Arc Length Maplet below to explore the arc length o
f various curves that you are familiar with. In doing this, you will s
ee new antiderivatives displayed that you are not familiar with. So, c
urrently, you won't be able to find these yourself. However, in these \+
cases you can use the Approximate Integration Maplet to estimate the a
rc length integral and compare it to that given by the Arc Length Mapl
et. The point of this exploration is to motivate the new techniques fo
r finding antiderivatives that we will be developing in the weeks ahea
d." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT
-1 10 "Arc Length" }}{EXCHG {PARA 0 "" 0 "" {TEXT 261 36 "Click in red
area and press [Enter]." }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT
1 0 9654 "# Arc Length Maplet\n# Copyright 2002 Waterloo Maple Inc.\n#
\n# The Arc Length maplet computes and graphically displays the arc l
ength\n# of a function f(x) over an interval [a, b].\n# The arc length
of the curve y = f(x) from x = a to x = b is given by \n# Int(sqrt(
1+Diff(f(x),x)^2),x = a .. b);. \n# \n# \n# The user enters the functi
on f(x) and the range [a, b]. The maplet\n# displays the arc length o
f f(x) over [a, b], and plots the graphs of\n# f(x), g(x) = sqrt(1+dif
f(f(x),x)^2), and\n# Int(g(t),t = a .. b);\n# \n# To run this maple
t, click the Execute (!!!) button in the context bar.\n# \nrestart;\nA
rcLengthMaplet := module()\n\n########################################
####################\n\nexport iniMathML, addMathML, checkBoxes, \n \+
getArcLength, runArcLengthMaplet:\nlocal helpStr, defStr:\n\n#####
#######################################################\n\n###########
#################################################\n\nhelpStr := \n\"Th
e Arc Length maplet computes and graphically displays the arc length o
f a function f(x) over an interval [a, b].\n\nEnter the function f(x) \+
and the range [a,b]. Click the 'Plot' button. The arc length of f(x) o
ver [a, b] is displayed, and the graphs of f(x), g(x) = sqrt(1+diff(f(
x),x)^2) and Int( g(t), t = a..b) are plotted.\":\n\n#################
###########################################\n\n#######################
#####################################\n\ndefStr := \n\"\":\n\n###########
#################################################\n\n#################
###########################################\n\n# pre: iniEqn :: algebr
aic expression\n# post: returns the Presentation MathML of iniEqn\nini
MathML := proc(iniEqn)\n local mathhead, mathtail, iniStr:\n mathh
ead := \"\":\n ini
Str := substring(MathML:-ExportPresentation(iniEqn),50..-8):\n cat(
mathhead,iniStr,mathtail):\nend proc : # end iniMathML\n\n############
################################################\n\n##################
##########################################\n\n# pre: mathMLStr :: stri
ng, in form of Presentation MathML\n# addEqn :: algebraic express
ion \naddMathML := proc(mathMLStr,addEqn)\n local startStr, inter_tag
, addStr, mltail:\n startStr := substring(mathMLStr,1..-15):\n i
nter_tag := \"
=\":\n addStr := sub
string(MathML:-ExportPresentation(addEqn),50..-8):\n mltail := \"
mrow>\":\n cat(startStr,inter_tag,addStr,mltail):\nend proc \+
: # end addMathML\n\n#################################################
###########\n\ngetArcLength := proc(boo1, boo2, boo3)\n\n local temp,
temp2, str, view, value:\n\n use Maplets:-Tools, Student:-Calculus1,
StringTools in\n\n str:=Trim(Get('TF_fun')):\n if str=\"\" then
\n Set('ML'=\"\"):\n return plots[textplot]([1,1,\"Input a \+
valid function\"]):\n end if:\n\n temp:=Trim(Get('TF_a')):\n \+
temp2:=Trim(Get('TF_b')):\n if temp=\"\" or temp2=\"\" then \n \+
Set('ML'=\"\"):\n return plots[textplot]([1,1,\"Input end points
/domain\"]):\n end if: \n str:=cat(str, \", \", temp, \"..\", te
mp2):\n\n temp := iniMathML( ArcLength(parse(str), output=integral)
):\n value := ArcLength(parse(str)):\n temp := addMathML( addMa
thML(temp,value), Re(evalf(value)) ): \n Set('ML' = temp): \n\n \+
if not boo1 then str := cat(str, \", showfunction=false\") end if:\n \+
if not boo2 then str := cat(str, \", showintegral=false\") end if:\n
if not boo3 then str := cat(str, \", showintegrand=false\") end if
:\n if not(boo1 or boo2 or boo3) then \n return plots[textplot
]([1,1,\"Select function, integral, or integrand\"]):\n end if: \n
\n view := [\"DEFAULT\",\"DEFAULT\"]:\n\n temp:=Trim(Get('x1')):
\n temp2:=Trim(Get('x2')):\n if temp<>\"\" and temp2<>\"\" then
\n view[1]:=cat(temp, \"..\", temp2):\n end if: \n\n temp:=
Trim(Get('y1')):\n temp2:=Trim(Get('y2')):\n if temp<>\"\" and t
emp2<>\"\" then\n view[2]:=cat(temp, \"..\", temp2):\n end if:
\n\n temp:=cat(\", view=[\", view[1], \", \", view[2], \"]\"):\n \+
str := cat(str, temp):\n\n ArcLength(parse(str), output=plot, fun
ctionoptions=[thickness=3]):\n\n end use:\n\nend proc:\n\n###########
#################################################\n\n#################
###########################################\n\nrunArcLengthMaplet := p
roc()\n\nlocal maplet, b, s, c, dc, lc:\n\nb := 'border'=true:\ns := '
inset'=0, 'spacing'=0:\nc := 'background'=\"#DDFFFF\":\ndc := 'backgro
und'=\"#CCFFFF\":\nlc := 'background'=\"#EEFFFF\": \n\nuse Maplets:-El
ements in\n\n#########################################################
###\n\nmaplet := Maplet(\n 'onstartup'=RunWindow('mainWin'),\n\n#####
#######################################################\n\n Font['F1'
]('family'=\"Default\", 'bold'='true', 'italic'='true'),\n Font['F2']
('family'=\"Default\", 'bold'='true', 'size'=14),\n\n#################
###########################################\n\n MenuBar['MB'](\n M
enu(\"File\",\n MenuItem(\"Plot\", 'onclick'=Evaluate('P'='getArc
Length(CB1,CB2,CB3)')), \n MenuSeparator(),\n MenuItem(\"Clo
se\", 'onclick'=Shutdown())\n ), # end Menu/File\n Menu(\"Help\"
, \n MenuItem(\"Arc Length Definition\", 'onclick'=RunWindow('def
Win')),\n MenuSeparator(),\n MenuItem(\"Using this Maplet\",
'onclick'=RunWindow('helpWin'))\n ) # end menu/Help\n ), # end Me
nuBar \n\n############################################################
\n\n Window['mainWin']('resizable'='false', \n 'title'=\"Calculus \+
1 - Arc Length\",\n 'menubar'='MB', \n \n BoxRow(s, c, \n \+
\n BoxColumn(s, c, b, 'caption'=\"Plot Window\", \n Pl
otter['P'](lc)\n ), # end BoxColumn\n\n BoxColumn(s,
c, \n\n BoxRow(s,c,b,'caption'=\"Enter a function and the en
d points of the curve\", \n Label(\"Function \", 'font'='F
2', c), \n TextField['TF_fun']('width'=10, lc, 'value'=1-x^
2, \n 'tooltip'=\"enter a function\"),\n Labe
l(\" a \", 'font'='F2', c), \n Label(\" = \", 'font'='F1', \+
c), \n TextField['TF_a']('value'=-1, 'width'=2, lc),\n \+
Label(\" b \", 'font'='F2', c), \n Label(\" = \", 'f
ont'='F1', c), \n TextField['TF_b']('value'=1, 'width'=2, l
c)\n ), # end BoxRow \n\n BoxRow(s, c, b, 'caption'=
\"Arc Length\",\n MathMLViewer['ML']('height'=240, 'width
'=320, lc)\n ), # end BoxRow for MathMLViewer\n\n Bo
xRow(s, c, \n \n BoxColumn(s, c, b, 'caption'=\"Display Opt
ions\", \n \n BoxRow(s, c, b, 'border'='fals
e',\n CheckBox['CB1'](true, c, 'caption'=\"Show function
\"), # end CheckBox\n CheckBox['CB2'](true, c, 'caption'=
\"Show integral\"), # end CheckBox\n CheckBox['CB3'](true
, c, 'caption'=\"Show integrand\") # end CheckBox \n \+
), # end BoxRow\n\n BoxRow(s, c,\n Labe
l(\"x\", 'font'='F2', c), \n Label(\" = \", 'font'='F1'
, c),\n TextField['x1'](2, lc), \n Label
(\" .. \", 'font'='F2', c),\n TextField['x2'](2, lc),\n
Label(\" y\", 'font'='F2', c), \n Label
(\" = \", 'font'='F1', c),\n TextField['y1'](2, lc),\n \+
Label(\" .. \", 'font'='F2', c),\n TextF
ield['y2'](2, lc) \n ) # end BoxRow\n \+
\n ), # end BoxColumn of Options\n\n\n BoxColu
mn('inset'=0, 'spacing'=4, c, 'halign'=right, 'valign'=center, \n \+
Button['B_plot'](\" Plot \", dc, 'onclick' = Evaluate( \n \+
'P' = 'getArcLength(CB1,CB2,CB3)' ) \n ), \+
# end Button\n Button(\"Close\", dc, Shutdown()) \n \+
) # end BoxColumn for Buttons\n\n) ) # end BoxRow f
or Buttons and Options\n) ), # end Window\n\n##################
##########################################\n\n Window['defWin']( 'res
izable'='false',\n 'title'=\"Arc Length Definition\", \n BoxColu
mn(b, 'inset'=0, 'spacing'=4, c, \n BoxRow(s, c,\n MathMLV
iewer['ML_def']('height'=200, 'width'=320, 'value'=defStr, lc)\n \+
), # end BoxRow\n BoxRow(s, c,\n Button(\"Close\", dc, Clo
seWindow('defWin'))\n ) # end BoxRow\n ) # end BoxColumn\n ),
# end defWin\n\n####################################################
########\n\n Window['helpWin']( 'resizable'='false',\n 'title'=\"U
sing the Arc Length Maplet\",\n BoxColumn(b, c, 'inset'=0, 'spacing
'=4,\n BoxRow(s, c, \n TextBox('height'=7, 'width'=36, c, \+
'font'='F2',\n 'editable'='false', 'value'=helpStr, 'foregrou
nd'=\"#333399\"\n ) # end TextBox\n ), # end BoxRow\n \+
BoxRow(s, c, \n Button(\"Close\", dc, CloseWindow('helpWin') )
\n ) # end BoxRow\n ) # end BoxColumn\n ), # end helpWin\n\n
############################################################\n\n Acti
on['A']()\n\n#########################################################
###\n\n): # end Maplet\n\n############################################
################\n\nMaplets:-Display(maplet):\n\nend use: # end use\ne
nd proc: # end proc\n\n###############################################
#############\n\nend module: # end module\nArcLengthMaplet:-runArcLeng
thMaplet();" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT
1 {PARA 3 "" 0 "" {TEXT -1 23 "Approximate Integration" }}{EXCHG
{PARA 0 "" 0 "" {TEXT 259 36 "Click in red area and press [Enter]." }
{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35264 "# Approximate In
tegration Maplet\n# Copyright 2002 Waterloo Maple Inc.\n# \n# The Appr
oximate Integration maplet computes, plots, and animates approximated \+
definite integrals of a given function f(x) over a given interval [a, \+
b] using any of the following methods.\n# Riemann sums using left, rig
ht, upper, lower, midpoint, or random points\n# Trapezoidal rule\n# Si
mpson's rule or Simpson's 3/8 rule\n# Bode's rule\n# Newton-Cotes' for
mula \n# \n# It also provides a comparison of the above approximations
for a given function, range, and number of partitions. \n# \n# The u
ser enters a function, and the upper and lower limits (a and b) of the
definite integral to approximate. \n# \n# The user selects a method \+
for approximation and sets the number of partitions by moving the slid
er.\n# \n# When the user clicks the Plot button, the definite integral
of the input function from a to b is approximated and displayed in th
e plotter window. \n# \n# An animation showing how the approximation \+
improves as the number of partitions increases can be generated by set
ting various options and then clicking the Animate button. \n# \n# Th
e user can control how an interval is subdivided. The halve option ind
icates that the interval is to be subdivided into two equal subinterva
ls. The random option indicates that the interval is to be randomly s
ubdivided. \n# \n# The user can control which intervals are to be sub
partitioned with each iteration. The all option indicates that every \+
interval is subpartitioned. The width option indicates that the interv
al with greatest width is subpartitioned. If there is more than one in
terval with largest width, the leftmost is subpartitioned. The area op
tion indicates that the interval with greatest area is subpartitioned.
If there is more than one interval with largest area, the leftmost is
subpartitioned. \n# \n# When the user clicks the Compare button, a co
mparison of the values computed by all methods is displayed.\n# \n# To
run this maplet, click the Execute (!!!) button in the context bar.\n
# \nrestart; \nApproxIntegralMaplet := module()\n\n\n###############
#############################################\n\nexport getApproxInteg
ral, runApproxIntegralMaplet, \n getPlotOptions, getAnimationOpt
ions, getMethod, \n getMainExpr, getPartitionExpr, getSavedStr, \+
getupStr, getlowStr, getleftStr, getmidStr, getrightStr, gettrapStr, g
etsimpStr, getsimp38Str, getbodeStr, getorder5Str, getorder6Str, getor
der7Str, getorder8Str:\nlocal helpStr, savedStr, upStr, lowStr, leftSt
r, midStr , rightStr, trapStr, simpStr, simp38Str, bodeStr, order5Str,
order6Str,order7Str,order8Str:\n\n###################################
#########################\n\n#########################################
###################\n\nhelpStr := \n\"The Approximate Integration mapl
et computes, plots, and animates approximated definite integrals of a \+
given function f(x) over a given interval [a, b] using any of the foll
owing methods.\n\267\011Riemann sums using left, right, upper, lower, \+
midpoint, or random points\n\267\011Trapezoidal rule\n\267\011Simpson'
s rule or Simpson's 3/8 rule\n\267\011Bode's rule\n. Newton-Cotes' for
mula \n\nIt also provides a comparison of the above approximations fo
r a given function, range, and number of partitions. \n\nEnter a func
tion, and the upper and lower limits (a and b) of the definite integra
l to approximate. \nSelect a method for approximation and set the num
ber of partitions by moving the slider.\n\nClick the 'Plot' button. T
he definite integral of the function from a to b is approximated and d
isplayed in the plotter window. \n\nTo display an animation of how th
e approximation improves as the number of partitions increases, set va
rious options and click the 'Animate' button. \n\nTo control how an i
nterval is subdivided, select 'halve' or 'random'. The 'halve' option \+
indicates that the interval is to be subdivided into two equal subinte
rvals. The 'random' option indicates that the interval is to be random
ly subdivided. \n\nTo control which intervals are to be subpartitione
d with each iteration, select 'all', 'width', or 'area'. The 'all' op
tion indicates that every interval is subpartitioned. The 'width' opti
on indicates that the interval with greatest width is subpartitioned. \+
If there is more than one interval with largest width, the leftmost is
subpartitioned. The 'area' option indicates that the interval with gr
eatest area is subpartitioned. If there is more than one interval with
largest area, the leftmost is subpartitioned. \n\nTo compare the valu
es computed by all methods, click the 'Compare' button.\n \n\":\n\n##
##########################################################\n\n########
####################################################\n\ngetSavedStr:= \+
proc()\n savedStr;\nend:\n\ngetupStr:=proc()\n upStr;\nend:\n \ngetlow
Str:=proc()\n lowStr;\nend:\n\ngetleftStr:=proc()\n leftStr;\nend:\n\n
getmidStr:=proc()\n midStr;\nend:\n\ngetrightStr:=proc()\n rightStr;\n
end:\n\ngettrapStr:=proc()\n trapStr;\nend:\n\ngetsimpStr:=proc()\n si
mpStr;\nend:\n\ngetsimp38Str:=proc()\n simp38Str;\nend:\n\ngetbodeStr:
=proc()\n bodeStr;\nend:\n\ngetorder5Str:=proc()\n order5Str;\nend:\n
\ngetorder6Str:=proc()\n order6Str;\nend:\n\ngetorder7Str:=proc()\n or
der7Str;\nend:\n\ngetorder8Str:=proc()\n order8Str;\nend:\n\n#########
###################################################\ngetMainExpr := pr
oc(P_fun, P_a, P_b)\n\n local temp, temp2, str, view:\n \n use Mapl
ets:-Tools, StringTools in\n\n temp:=Trim(P_fun):\n if temp=\"\"
then \n error \"No function or algebraic expression entered\":\n
end if:\n str := temp:\n \n temp:=Trim(P_a):\n \n if
temp=\"\" then \n error \"No lower limit entered: a = ?\":\n \+
end if:\n \n temp2:=Trim(P_b):\n \n if temp2=\"\" then
\n error \"No upper limit entered: b = ?\":\n end if:\n st
r := cat(str, \", \", temp, \"..\", temp2):\n \n return str:\n\n \+
end use:\n\nend proc: # end getMainExpr\n\n###########################
#################################\n\n#################################
###########################\n\ngetPartitionExpr := proc(P_partition,P_
fun, P_a, P_b)\n local str, numPartition:\n use Maplets:-Tools, Stri
ngTools in\n numPartition:=parse(P_partition): \n return cat(ge
tMainExpr(P_fun, P_a, P_b), \", \", \"partition=\", numPartition ):\n \+
end use:\nend proc: # end getPartitionExpr\n\n#######################
#####################################\n\n#############################
###############################\n\ngetPlotOptions := proc(isOutline, i
sShowArea, isShowFunction, isShowPoints,P_x1, P_x2, P_y1, P_y2,P_parti
tion,P_fun, P_a, P_b)\n\n local temp, temp2, str, view:\n \n use Ma
plets:-Tools, StringTools in\n\n str := getPartitionExpr(P_partitio
n,P_fun, P_a, P_b):\n\n if isOutline=true then\n str := cat(st
r, \", outline=true\"):\n end if:\n\n if isShowArea=false then\n
str := cat(str, \", showarea=false\"):\n end if:\n\n if is
ShowFunction=false then\n str := cat(str, \", showfunction=false
\"):\n end if:\n\n if isShowPoints=false then\n str := cat(
str, \", showpoints=false\"):\n end if: \n\n view := [\"DEFAULT
\",\"DEFAULT\"]:\n\n temp:=Trim(P_x1):\n temp2:=Trim(P_x2):\n \+
if temp<>\"\" and temp2<>\"\" then\n temp:=cat(temp, \"..\", tem
p2):\n view[1]:=temp:\n end if: \n\n temp:=Trim(P_y1):\n \+
temp2:=Trim(P_y2):\n if temp<>\"\" and temp2<>\"\" then\n tem
p:=cat(temp, \"..\", temp2):\n view[2]:=temp:\n end if: \n\n \+
if not (view[1]=\"DEFAULT\" and view[2]=\"DEFAULT\") then \n t
emp:=cat(\", view=[\", view[1], \", \", view[2], \"]\"):\n str :=
cat(str, temp):\n end if:\n \n return str:\n\n end use:\n\n
end proc: # end getPlotOptions\n\n####################################
########################\n\n##########################################
##################\n\ngetAnimationOptions := proc(P_iterations, isRand
omly, isWidth,isArea)\n\n local temp, list, i, str:\n \n use Maplet
s:-Tools, StringTools in\n\n temp:=Trim(P_iterations):\n if temp
<>\"\" then \n list := [cat(\"iterations=\",temp)]:\n end if: \+
\n\n if isRandomly=true then\n list := [op(list), \"refinement
=random\"]:\n end if:\n\n if isWidth=true then\n list := [o
p(list), \"subpartition=width\"]:\n elif isArea=true then\n li
st := [op(list), \"subpartition=area\"]:\n end if:\n\n if nops(l
ist)=0 then \n return NULL:\n else \n str := \"\":\n \+
for i from 1 to nops(list) do\n str := cat(str, \", \", list[i
]):\n end do:\n return str:\n end if: \n\n end use:\n\ne
nd proc: # end getAnimationOptions\n\n################################
############################\n\n######################################
######################\n\ngetMethod := proc(way, isLeft, isRight, isUp
, isLow, isRandom, isTrap, isSimp, isSimp38, isBode, isNewton,P_order)
\n \n local method:\n \n use Maplets:-Tools in \n\n if isLeft =
true then\n method := \"left\":\n\n elif isRight = true then \+
\n method := \"right\":\n\n elif isUp = true then \n meth
od := \"upper\":\n\n elif isLow = true then \n method := \"low
er\":\n\n elif isRandom = true then \n method := \"random\":\n
\n elif isTrap = true then \n method := \"trapezoid\":\n\n \+
elif isSimp = true then \n method := \"simpson\":\n\n elif isS
imp38 = true then \n method := \"simpson[3/8]\":\n\n elif isBo
de = true then \n method := \"bode\":\n\n elif isNewton = true
then \n method := StringTools:-Trim(P_order):\n if method=
\"\" then\n error \"Enter the order of Newton-Cotes' method\":
\n end if:\n method := cat(\"newtoncotes[\", method, \"]\"):
\n\n else \n return NULL:\n\n end if:\n \n return cat(\"
, method=\", method):\n \n end use: \n\nend proc: # end ApproxIntegr
al\n\n############################################################\n\n
############################################################\n \ngetAp
proxIntegral := proc(way,P_fun, P_a, P_b,isLeft, isRight, isUp, isLow,
isRandom, isTrap, isSimp, isSimp38, isBode, isNewton,P_order,isOutlin
e, isShowArea, isShowFunction, isShowPoints,P_x1, P_x2, P_y1, P_y2,P_i
terations, isRandomly, isWidth,isArea,P_partition)\n \n local str, t
emp,method:\n \n use Student:-Calculus1, Maplets:-Tools, StringTools
in \n \n method:= parse(way):\n if method=plot then\n str :=
getPlotOptions(isOutline, isShowArea, isShowFunction, isShowPoints,P_
x1, P_x2,\n P_y1,P_y2,P_partition,P_fun, P_
a, P_b):\n str := cat(str, \n getMethod(way, isLe
ft, isRight, isUp, isLow, isRandom, isTrap, isSimp,\n \+
isSimp38, isBode, isNewton,P_order)\n \+
): \n savedStr:=evalf(ApproximateInt(parse(str))): \n Ap
proximateInt(parse(str), title=\" \",output=plot):\n\n elif method=
animation then\n str := getPlotOptions(isOutline, isShowArea, isS
howFunction, isShowPoints,P_x1, P_x2,\n P_y
1, P_y2,P_partition,P_fun, P_a, P_b):\n str := cat\n (
str, \n getMethod(way, isLeft, isRight, isUp, isLow, isRan
dom, isTrap, isSimp, isSimp38,\n isBode, isNewto
n,P_order), \n getAnimationOptions(P_iterations, isRandoml
y, isWidth,isArea)\n ): \n \n savedStr:=Approxim
ateInt(parse(str)): \n ApproximateInt(parse(str),title=\" \", out
put=animation):\n \n elif method=list then\n str := getPartit
ionExpr(P_partition,P_fun, P_a, P_b):\n temp:= cat(str,\",method=
upper\"):\n upStr := evalf(ApproximateInt(parse(temp)), 22): \n \+
temp:= cat(str,\",method=lower\"):\n lowStr := evalf(Approxi
mateInt(parse(temp)), 22): \n temp:= cat(str,\",method=left\"):
\n leftStr := evalf(ApproximateInt(parse(temp)), 22): \n tem
p:= cat(str,\",method=midpoint\"):\n midStr := evalf(ApproximateI
nt(parse(temp)), 22): \n temp:= cat(str,\",method=right\"):\n \+
rightStr:= evalf(ApproximateInt(parse(temp)), 22): \n temp:= \+
cat(str,\",method=trapezoid\"):\n trapStr := evalf(ApproximateInt
(parse(temp)), 22): \n temp:= cat(str,\",method=simpson\"):\n \+
simpStr:= evalf(ApproximateInt(parse(temp)), 22): \n temp:= c
at(str,\",method=simpson[3/8]\"):\n simp38Str := evalf(Approximat
eInt(parse(temp)), 22): \n temp:= cat(str,\",method=bode\"):\n \+
bodeStr := evalf(ApproximateInt(parse(temp)), 22): \n temp:=
cat(str,\",method=newtoncotes[5]\"):\n order5Str:= evalf(Approxi
mateInt(parse(temp)), 22): \n temp:= cat(str,\",method=newto
ncotes[6]\"):\n order6Str := evalf(ApproximateInt(parse(temp)), 2
2): \n temp:= cat(str,\",method=newtoncotes[7]\"):\n or
der7Str := evalf(ApproximateInt(parse(temp)), 22): \n temp:=
cat(str,\",method=newtoncotes[8]\"):\n order8Str := evalf(Approx
imateInt(parse(temp)), 22):\n \n\n else \n ApproximateInt
(parse(str)): \n\n end if:\n \n end use: \n\nend proc: # end getA
pproxIntegral\n\n#####################################################
#######\n\n\n#########################################################
###\n\n# pre: null\n# post: run Inverse Function Maplet\nrunApproxInte
gralMaplet := proc()\n\nlocal maplet:\nuse Maplets:-Elements, MathML i
n\n\n############################################################\n\nm
aplet := Maplet(\n 'onstartup'=RunWindow('mainWin'),\n\n#############
###############################################\n\n Font['F1']('famil
y'=\"Default\", 'bold'='true', 'italic'='true'),\n Font['F2']('family
'=\"Default\", 'bold'='true', 'size'=14),\n\n#########################
###################################\n\n MenuBar['MB'](\n Menu(\"Fi
le\",\n MenuItem(\"Plot\", 'onclick'='A_plot'), \n MenuItem(
\"Animate\", 'onclick'='A_animate'), \n MenuSeparator(),\n M
enuItem(\"Close\", 'onclick'=Shutdown())\n ), # end Menu/File\n \+
Menu(\"Compare\", \n MenuItem(\"Compare Methods\", 'onclick'=A_co
mpare)\n ), # end menu/Compare\n Menu(\"Help\", \n MenuItem
(\"Using this Maplet\", 'onclick'=RunWindow('helpWin'))\n ) # end m
enu/Help\n ), # end MenuBar \n\n#####################################
#######################\n\n Window['mainWin']('resizable'='false', \n
'title'=\"Calculus 1 - Approximate Integration\",\n 'menubar'='
MB', 'defaultbutton'='B_plot', \n \n BoxColumn('inset'=0, 'spa
cing'=0, 'background'=\"#DDFFFF\",\n\n BoxRow('inset'=0, 'spacing
'=2, 'background'=\"#DDFFFF\", \n\n BoxRow('inset'=0, 'spacing'
=0, 'background'=\"#DDFFFF\", \n 'border'='true', 'caption'=
\"Enter a function and interval\", \n Label(\"Function \", '
font'='F2', 'background'=\"#DDFFFF\"), \n TextField['TF_fun']
('width'=20, 'background'=\"#EEFFFF\", \n 'tooltip'=\"Enter
any valid function or algebraic expression\",\n 'value'=si
n(x)),\n Label(\" a \", 'font'='F2', 'background'=\"#DDFFFF\"
), \n Label(\" = \", 'font'='F1', 'background'=\"#DDFFFF\"), \+
\n TextField['TF_a']('value'=0, 'width'=2, 'background'=\"#EE
FFFF\", \n 'tooltip'=\"Enter the lower limit of approximate
d integral\"),\n Label(\" b \", 'font'='F2', 'background'=\"#
DDFFFF\"), \n Label(\" = \", 'font'='F1', 'background'=\"#DDF
FFF\"), \n TextField['TF_b']('value'=\"Pi\", 'width'=2, 'back
ground'=\"#EEFFFF\", \n 'tooltip'=\"Enter the upper limit o
f approximated integral\")\n ) # end BoxRow \n\n ), # e
nd BoxRow \n\n BoxRow('inset'=0, 'spacing'=0, 'background'=\"#D
DFFFF\",\n \n BoxColumn('inset'=0, 'spacing'=0, 'background'=\"
#DDFFFF\", \n\n BoxRow('inset'=0, 'spacing'=0, 'background'=
\"#DDFFFF\", \n 'border'='true', 'caption'=\"Plot Window
\", \n Plotter['P']('background'=\"#EEFFFF\", 'cyclic'=tr
ue, \n 'continuous'=true, 'delay'=300)\n ), # \+
end BoxRow\n\n BoxColumn('inset'=0, 'spacing'=5, 'background'
=\"#DDFFFF\",\n 'border'='true', 'caption'=\"Display Option
s\",\n \n BoxRow('inset'=0, 'spacing'=6, 'backgro
und'=\"#DDFFFF\",\n CheckBox[CB_showarea]('value'=true, '
background'=\"#DDFFFF\", \n 'caption'=\"Show the value \+
of the area\" \n ), # end CheckBox\n Chec
kBox[CB_showfunction]('value'=true, 'background'=\"#DDFFFF\", \n \+
'caption'=\"Show function\" \n ) # end Check
Box\n ), # BoxRow \n\n BoxRow('inset'=0, 'spacin
g'=4, 'background'=\"#DDFFFF\",\n CheckBox[CB_outline]('v
alue'=false, 'background'=\"#DDFFFF\", \n 'caption'=\"O
utline the boxes as a whole\" \n ), # end CheckBox\n \+
CheckBox[CB_showpoints]('value'=true, 'background'=\"#DDFF
FF\", \n 'caption'=\"Show points\" \n )
# end CheckBox\n ), # BoxRow\n\n BoxRow('inset'
=0, 'spacing'=0, 'background'=\"#DDFFFF\", \n Label(\"
x\", 'font'='F2', 'background'=\"#DDFFFF\"), \n Label(\" \+
= \", 'font'='F1', 'background'=\"#DDFFFF\"),\n TextField
['x1'](2, 'background'=\"#EEFFFF\",'value'=\" \"), \n Lab
el(\" .. \", 'font'='F2', 'background'=\"#DDFFFF\"),\n Te
xtField['x2'](2, 'background'=\"#EEFFFF\",'value'=\" \"),\n \+
Label(\" y\", 'font'='F2', 'background'=\"#DDFFFF\"), \n \+
Label(\" = \", 'font'='F1', 'background'=\"#DDFFFF\"),\n \+
TextField['y1'](2, 'background'=\"#EEFFFF\",'value'=\" \"),\n \+
Label(\" .. \", 'font'='F2', 'background'=\"#DDFFFF\"),\n \+
TextField['y2'](2, 'background'=\"#EEFFFF\",'value'=\" \") \n
) # end BoxRow \n ) # end BoxColumn\n\n
), # end BoxColumn\n\n BoxColumn('inset'=0, 'spacing'=0, \+
'background'=\"#DDFFFF\",\n\n BoxColumn('inset'=0, 'spacing'=
0, 'background'=\"#DDFFFF\", \n 'border'='true', 'caption'=
\"Riemann Sums\", \n BoxRow('inset'=0, 'spacing'=0, 'back
ground'=\"#DDFFFF\", \n RadioButton['RB_up']('caption'=
\"upper\", 'group'='BG_methods', \n 'background'=\"#D
DFFFF\",\n 'tooltip'=\"Upper Riemann sum\"),\n \+
RadioButton['RB_low']('caption'=\"lower\", 'group'='BG_method
s', \n 'background'=\"#DDFFFF\",\n '
tooltip'=\"Lower Riemann sum\"),\n RadioButton['RB_rand
om']('caption'=\"random\", 'group'='BG_methods', \n '
background'=\"#DDFFFF\",\n 'tooltip'=\"Random selecti
on of point\")\n ), # end BoxRow\n \n Bo
xRow('inset'=0, 'spacing'=0, 'background'=\"#DDFFFF\", \n \+
RadioButton['RB_left']('caption'=\"left\", 'group'='BG_methods', \n
'background'=\"#DDFFFF\",\n 'toolti
p'=\"Left Riemann sum\"),\n RadioButton['RB_mid']('capt
ion'=\"midpoint\", 'group'='BG_methods', \n 'backgrou
nd'=\"#DDFFFF\",\n 'tooltip'=\"Midpoint Riemann sum\"
, 'value'=true),\n RadioButton['RB_right']('caption'=\"
right\", 'group'='BG_methods', \n 'background'=\"#DDF
FFF\",\n 'tooltip'=\"Right Riemann sum\")\n \+
) # end BoxRow\n ), # end BoxColumn\n\n BoxColu
mn('inset'=0, 'spacing'=0, 'background'=\"#DDFFFF\", \n 'bo
rder'='true', 'caption'=\"Newton-Cotes' Formulae\",\n BoxRo
w('inset'=0, 'spacing'=0, 'background'=\"#DDFFFF\", \n Ra
dioButton['RB_trap']('group'='BG_methods',\n 'caption'=
\"Trapezoidal Rule\", \n 'background'=
\"#DDFFFF\"),\n RadioButton['RB_simp']('group'='BG_method
s',\n 'caption'=\"Simpson's Rule\", \n
'background'=\"#DDFFFF\")\n ), # end BoxRow
\n \n BoxRow('inset'=0, 'spacing'=0, 'background'=\"#DDF
FFF\", \n RadioButton['RB_simp38']('group'='BG_methods',
\n 'caption'=\"Simpson's 3/8 Rule\", \+
\n 'background'=\"#DDFFFF\"),\n RadioButto
n['RB_bode']('group'='BG_methods',\n 'caption'=\"Bode's
Rule\", \n 'background'=\"#DDFFFF\")
\n ), # end BoxRow \n \n BoxRow('inset'=0, '
spacing'=0, 'background'=\"#DDFFFF\", \n RadioButton['RB_
newton']('group'='BG_methods',\n 'caption'=\"Newton-Cot
es' Formula\", \n 'background'=\"#DDFF
FF\"),\n Label(\"with order = \", 'background'=\"#DDFFFF
\"), \n TextField['TF_order'](2, 'value'=5, \n \+
'background'=\"#EEFFFF\")\n ) # end BoxRow\n \+
), # end BoxColumn\n\n BoxColumn('inset'=0, 'spacing'=0, 'bac
kground'=\"#DDFFFF\", \n 'border'='true', 'caption'=\"Numbe
r of Partition\",\n Slider['SL_partition']('lower'=1, 'uppe
r'=46,\n 'background'=\"#DDFFFF\", 'foreground'=\"#CCFFFF
\", \n 'majorticks'=9, 'minorticks'=1, 'value'=10, \n \+
'tooltip'=\"Initial number of equally spaced subintervals\" \+
\n ) # end Slider\n ), # end BoxColumn\n\n \+
BoxRow('inset'=0, 'spacing'=0, 'background'=\"#DDFFFF\", \n \+
'border'='true', 'caption'=\"Approximated Area\", \n La
bel(\"Area\", 'font'='F2', 'background'=\"#DDFFFF\"), \n La
bel(\" = \", 'font'='F1', 'background'=\"#DDFFFF\"), \n Tex
tField['TF_area']('width'=18, 'background'=\"#EEFFFF\", \n \+
'editable'=false, 'tooltip'=\"Approximated integral sum\",'value'=\"
\"),\n TextField['way_plot']('value'=\"plot\",'visible'='f
alse'), \n TextField['way_animate']('value'=\"an
imation\",'visible'='false'),\n TextField['way_list']('valu
e'=\"list\",'visible'='false') \n ), # end BoxRow
\n\n BoxColumn('inset'=0, 'spacing'=0, 'background'=\"#DDFFFF
\", \n 'border'='true', 'caption'=\"Animation Options\",\n \+
BoxRow('inset'=0, 'spacing'=4, 'background'=\"#DDFFFF\", \n
Button[B_play](\"Play\", 'background'=\"#EEFFFF\", 'enab
led'=false, \n SetOption(P('play')=true)),\n \+
Button[B_stop](\"Stop\", 'background'=\"#EEFFFF\", 'enabled'=false
, \n SetOption(P('`stop`')=true)),\n Butto
n[B_pause](\"Pause\", 'background'=\"#EEFFFF\", 'enabled'=false, \n \+
SetOption(P('pause')=true))\n ), # end Box
Row\n BoxRow('inset'=0, 'spacing'=4, 'background'=\"#DDFFFF
\", \n Button[B_backward](\"Backward\", 'background'=\"#E
EFFFF\", 'enabled'=false, \+
SetOption(P('frame_backwards')=true), 'tooltip'=\"Previous f
rame\", 'visible'='false'),\n Button[B_forward](\"Forward
\", 'background'=\"#EEFFFF\", 'enabled'=false, \n SetO
ption(P('frame_forward')=true), 'tooltip'=\"Next frame\", 'visible'='f
alse') \n ), # end BoxRow\n \n BoxRow('inset'=
0, 'spacing'=0, 'background'=\"#DDFFFF\",\n Label(\"Numbe
r of Frames: \", 'background'=\"#DDFFFF\"),\n TextField['
TF_iterations']('value'=4, 'width'=3, \n 'background'=
\"#EEFFFF\"), \n Label(\" \"), \n Check
Box[CB_repeat]('value'=true, 'background'=\"#DDFFFF\", \n \+
'caption'=\"Repeat animation\", 'enabled'=false, \n \+
'onchange'=SetOption(target=P, `option`='continuous', Argument(CB_re
peat) )\n ) # end CheckBox \n ), # end BoxRow
\n \n BoxRow('inset'=0, 'spacing'=0, 'background'=\"#DDFFF
F\",\n Label(\"Subdivide Interval: \", 'background'=\"#DD
FFFF\"),\n RadioButton['RB_halve']('group'='BG_refinement
',\n 'caption'=\"halve\", 'value'=true, \+
\n 'background'=\"#DDFFFF\",\n 'toolt
ip'=\"Halve each interval\" ),\n RadioButton['RB_randomly
']('group'='BG_refinement',\n 'caption'=\"random\", \+
\n 'background'=\"#DDFFFF\",\n \+
'tooltip'=\"Randomly divide each interval\" )\n ), # e
nd BoxRow\n \n BoxRow('inset'=0, 'spacing'=0, 'background'=
\"#DDFFFF\",\n Label(\"Subpartition: \", 'background'=\"#
DDFFFF\"),\n RadioButton['RB_all']('group'='BG_subpartiti
on',\n 'caption'=\"all \", 'value'=true, \+
\n 'background'=\"#DDFFFF\",\n 'tool
tip'=\"Divide all partitions\" ),\n RadioButton['RB_width
']('group'='BG_subpartition',\n 'caption'=\"width\", \+
\n 'background'=\"#DDFFFF\",\n \+
'tooltip'=\"Divide partition with the longest width\" ),\n \+
RadioButton['RB_area']('group'='BG_subpartition',\n \+
'caption'=\"area\", \n 'backgro
und'=\"#DDFFFF\",\n 'tooltip'=\"Divide partition with t
he largest area\" )\n ) # end BoxRow\n ), # end Bo
xColumn \n\n BoxRow('inset'=0, 'spacing'=1, 'background'=\"#D
DFFFF\", \n Button['B_plot'](\"Plot\", 'background'=\"#EEFF
FF\", \n 'onclick'='A_plot'),\n Button(\"Anima
te\", 'background'=\"#EEFFFF\", \n 'onclick'='A_animate')
,\n Button(\"Compare\", 'background'=\"#EEFFFF\", 'onclick'
='A_compare',\n 'tooltip'=\"Compare values of each method
\"),\n Button(\"Close\", 'onclick'=Shutdown(), 'background'
=\"#EEFFFF\")\n ) # end BoxRow\n\n ) # end Column\n \+
\n ) # end BoxRow\n \n ) # end BoxColumn\n\n ), # end Wi
ndow\n\n############################################################\n
\n Window['helpWin']( 'resizable'='false',\n 'title'=\"Using the A
pproximate Integration Maplet\",\n BoxColumn('border'='true', 'inse
t'=0, 'spacing'=10,\n 'background'=\"#CCFFFF\",\n BoxCell(\n
TextBox('height'=20, 'width'=36,\n 'background'=\"#EE
FFFF\", 'foreground'=\"#333399\", \n 'editable'='false', 'fon
t'='F2', \n 'value'=helpStr\n ) # end TextBox\n )
, # end BoxCell\n BoxRow('inset'=0, 'spacing'=0, 'background'=\"#
CCFFFF\",\n Button(\"Close\", \n CloseWindow('helpWin
'), \n 'background'=\"#DDFFFF\")\n ) # end BoxRow\n )
# end BoxColumn\n ), # end helpWin\n\n#############################
###############################\n\n Window['compWin']( 'resizable'='f
alse',\n 'title'=\" Comparison of Approximated Values\",\n BoxCo
lumn('inset'=0, 'spacing'=10, 'background'=\"#DDFFFF\",\n \n \+
GridLayout('background'=\"#DDFFFF\", 'inset'=0,\n 'border'=tru
e, 'caption'=\"Riemann Sums\", \n GridRow('halign'=left, \n \+
GridCell(Label(\"Method \", 'font'='F2')),\n GridCel
l(Label(\"Approximated Integral Value\", 'font'='F2'))\n ), # G
ridRow\n GridRow('halign'=left, \n GridCell(\" \+
Upper Sum \", 'halign'=left),\n GridCel
l(TextField['TF_up']('background'=\"#DDFFFF\", 'value'=\" \"))\n \+
), # GridRow\n GridRow('halign'=left, \n GridCell(
\" Lower Sum \"),\n GridCell(Tex
tField['TF_low']('background'=\"#DDFFFF\", 'value'=\" \"))\n ),
# GridRow\n GridRow('halign'=left, \n GridCell(\" \+
Left Sum \"),\n GridCell(TextF
ield['TF_left']('background'=\"#DDFFFF\", 'value'=\" \"))\n ), \+
# GridRow\n GridRow('halign'=left, \n GridCell(\" \+
Midpoint \"),\n GridCell(TextFie
ld['TF_mid']('background'=\"#DDFFFF\", 'value'=\" \"))\n ), # G
ridRow\n GridRow('halign'=left, \n GridCell(\" \+
Right Sum \"),\n GridCell(TextField['
TF_right']('background'=\"#DDFFFF\", 'value'=\" \"))\n ) # Grid
Row\n ), # end GridLayout\n\n GridLayout('background'=\"#DD
FFFF\", 'inset'=0,\n 'border'=true, 'caption'=\"Newton-Cotes' F
ormulae\", \n GridRow('halign'=left, \n GridCell(Labe
l(\"Order\", 'font'='F2')), \n GridCell(Label(\"Method \+
\", 'font'='F2')), \n GridCell(Label(\"Approximated Integral \+
Value\", 'font'='F2')) \n ), # GridRow\n GridRow('halign
'=left, \n GridCell(\"1\"), \n GridCell(\"Trapezoida
l Rule \"),\n GridCell(TextField['TF_trap']('background'
=\"#DDFFFF\", 'value'=\" \"))\n ), # GridRow\n GridRow(
'halign'=left, \n GridCell(\"2\"), \n GridCell(\"Sim
pson's Rule \"),\n GridCell(TextField['TF_simp']('back
ground'=\"#DDFFFF\", 'value'=\" \"))\n ), # GridRow\n G
ridRow('halign'=left, \n GridCell(\"3\"), \n GridCel
l(\"Simpson's 3/8 Rule \"),\n GridCell(TextField['TF_simp38']
('background'=\"#DDFFFF\", 'value'=\" \"))\n ), # GridRow\n \+
GridRow('halign'=left, \n GridCell(\"4\"), \n G
ridCell(\"Bode's Rule \"),\n GridCell(TextField[
'TF_bode']('background'=\"#DDFFFF\", 'value'=\" \"))\n ), # Gri
dRow\n GridRow('halign'=left, \n GridCell(\"5\"), \n\n
GridCell(\"\"),\n GridCell(TextField['TF_order5']('
background'=\"#DDFFFF\", 'value'=\" \"))\n ), # GridRow\n \+
GridRow('halign'=left, \n GridCell(\"6\"), \n Grid
Cell(\"\"),\n GridCell(TextField['TF_order6']('background'=\"
#DDFFFF\", 'value'=\" \"))\n ), # GridRow\n GridRow('hal
ign'=left, \n GridCell(\"7\"), \n GridCell(\"\"),\n \+
GridCell(TextField['TF_order7']('background'=\"#DDFFFF\", 'va
lue'=\" \"))\n ), # GridRow\n GridRow('halign'=left, \n \+
GridCell(\"8\"), \n GridCell(\"\"),\n GridC
ell(TextField['TF_order8']('background'=\"#DDFFFF\", 'value'=\" \"))\n
) # GridRow\n ), # end GridLayout\n \n BoxRow
('inset'=0, 'spacing'=0, 'background'=\"#DDFFFF\",\n Button(\"C
lose\", \n CloseWindow('compWin'), \n 'background'
=\"#DDFFFF\", 'foreground'=\"#333399\")\n ) # end BoxRow\n\n )
# end BoxColumn\n ), # end sumWin\n\n##############################
##############################\n\n ButtonGroup['BG_methods'](),\n Bu
ttonGroup['BG_refinement'](),\n ButtonGroup['BG_subpartition'](),\n\n
############################################################\n\n Acti
on['A_compare']\n ( \n Evaluate\n ( 'waitforresult'='false','
function'='getApproxIntegral',\n Argument('way_list'),\n \+
Argument('TF_fun',quotedtext='true'),\n Argument('TF_a',quoted
text='true'),\n Argument('TF_b',quotedtext='true'),\n Ar
gument(RB_left),\n Argument(RB_right),\n Argument(RB_up)
,\n Argument(RB_low),\n Argument(RB_random),\n Ar
gument(RB_trap),\n Argument(RB_simp),\n Argument(RB_simp
38),\n Argument(RB_bode),\n Argument(RB_newton),\n \+
Argument('TF_order',quotedtext='true'),\n Argument(CB_outline
),\n Argument(CB_showarea),\n Argument(CB_showfunction),
\n Argument(CB_showpoints),\n Argument('x1',quotedtext='
true'),\n Argument('x2',quotedtext='true'),\n Argument('
y1',quotedtext='true'),\n Argument('y2',quotedtext='true'),\n \+
Argument('TF_iterations',quotedtext='true'),\n Argument(R
B_randomly),\n Argument(RB_width),\n Argument(RB_area),
\n Argument('SL_partition',quotedtext='true')\n ), \n Eva
luate\n ('waitforresult'='false','target'='TF_up','function'='getup
Str'\n ),\n Evaluate\n ('waitforresult'='false','target'='TF_
low','function'='getlowStr'\n ), \n Evaluate\n ('waitforresul
t'='false','target'='TF_left','function'='getleftStr'\n ), \n Ev
aluate\n ('waitforresult'='false','target'='TF_mid','function'=' ge
tmidStr'\n ), \n Evaluate\n ('waitforresult'='false','target'
='TF_right','function'='getrightStr'\n ), \n Evaluate\n ('wai
tforresult'='false','target'='TF_trap','function'='gettrapStr'\n ),
\n Evaluate\n ('waitforresult'='false','target'='TF_simp','func
tion'=' getsimpStr'\n ), \n Evaluate\n ('waitforresult'='fals
e','target'='TF_simp38','function'='getsimp38Str'\n ), \n Evalua
te\n ('waitforresult'='false','target'='TF_bode','function'=' getbo
deStr'\n ), \n Evaluate\n ('waitforresult'='false','target'='
TF_order5','function'='getorder5Str'\n ), \n Evaluate\n ('wai
tforresult'='false','target'='TF_order6','function'='getorder6Str'\n \+
), \n Evaluate\n ('waitforresult'='false','target'='TF_order7'
,'function'='getorder7Str'\n ), \n Evaluate\n ('waitforresult
'='false','target'='TF_order8','function'='getorder8Str'\n ), \n \+
RunWindow('compWin') \n ), # end A_comp\n\n\nAction['A_plot']\n ( \+
Evaluate\n ( 'waitforresult'='false','target'='P','function'='ge
tApproxIntegral',\n Argument('way_plot',quotedtext='true'),\n \+
Argument('TF_fun',quotedtext='true'),\n Argument('TF_a',q
uotedtext='true'),\n Argument('TF_b',quotedtext='true'),\n \+
Argument(RB_left),\n Argument(RB_right),\n Argument(R
B_up),\n Argument(RB_low),\n Argument(RB_random),\n \+
Argument(RB_trap),\n Argument(RB_simp),\n Argument(RB
_simp38),\n Argument(RB_bode),\n Argument(RB_newton),\n \+
Argument('TF_order',quotedtext='true'),\n Argument(CB_ou
tline),\n Argument(CB_showarea),\n Argument(CB_showfunct
ion),\n Argument(CB_showpoints),\n Argument('x1',quotedt
ext='true'),\n Argument('x2',quotedtext='true'),\n Argum
ent('y1',quotedtext='true'),\n Argument('y2',quotedtext='true')
,\n Argument('TF_iterations',quotedtext='true'),\n Argum
ent(RB_randomly),\n Argument(RB_width),\n Argument(RB_ar
ea),\n Argument('SL_partition',quotedtext='true')\n ),\n\n
Evaluate\n ('waitforresult'='false','target'='TF_area', 'func
tion'='getSavedStr'\n ),\n SetOption( 'B_play'('enabled')='fal
se'),\n SetOption( 'B_stop'('enabled')='false'),\n SetOption( \+
'B_pause'('enabled')='false'),\n SetOption( 'B_backward'('enabled'
)='false'),\n SetOption( 'B_forward'('enabled')='false'),\n Se
tOption( 'CB_repeat'('enabled')='false') \n ),\n \n Action
['A_animate']\n ( Evaluate\n ( 'waitforresult'='false','target'
='P','function'='getApproxIntegral',\n Argument('way_animate'),
\n Argument('TF_fun',quotedtext='true'),\n Argument('TF_
a',quotedtext='true'),\n Argument('TF_b',quotedtext='true'),\n \+
Argument(RB_left),\n Argument(RB_right),\n Argume
nt(RB_up),\n Argument(RB_low),\n Argument(RB_random),\n \+
Argument(RB_trap),\n Argument(RB_simp),\n Argumen
t(RB_simp38),\n Argument(RB_bode),\n Argument(RB_newton)
,\n Argument('TF_order',quotedtext='true'),\n Argument(C
B_outline),\n Argument(CB_showarea),\n Argument(CB_showf
unction),\n Argument(CB_showpoints),\n Argument('x1',quo
tedtext='true'),\n Argument('x2',quotedtext='true'),\n A
rgument('y1',quotedtext='true'),\n Argument('y2',quotedtext='tr
ue'),\n Argument('TF_iterations',quotedtext='true'),\n A
rgument(RB_randomly),\n Argument(RB_width),\n Argument(R
B_area),\n Argument('SL_partition',quotedtext='true')\n ),
\n SetOption( 'B_play'('enabled')='true'),\n SetOption( 'B_s
top'('enabled')='true'),\n SetOption( 'B_pause'('enabled')='true'
),\n SetOption( 'B_backward'('enabled')='true'),\n SetOption
( 'B_forward'('enabled')='true'),\n SetOption( 'CB_repeat'('enabl
ed')='true') \n ),\n\n Action['A']()\n\n###################
#########################################\n\n): # end Maplet\n\n######
######################################################\n\nMaplets:-Dis
play(maplet):\n\nend use: # end use\nend proc: # end proc\n\n#########
###################################################\n\nend module: # e
nd module\nApproxIntegralMaplet:-runApproxIntegralMaplet();" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "6 0 0" 10 }
{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }