<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="12" minor="1"/>
<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="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="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="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="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="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="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="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="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="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="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="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="Normal" 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="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="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="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="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="Maple Input" background="[255,255,255]" 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="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="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="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="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="Heading 1" background="[255,255,255]" bold="true" executable="false" family="Serif" 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="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="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="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="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="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"/>
<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="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="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="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="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="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="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="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="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="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="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="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="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>
<Task-table>
    <Task-category name="&lt;default&gt;">
    </Task-category>
</Task-table>
<Task>
</Task>
<Group labelreference="L42" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Analisa Packham &amp; Jeffrey Meyers</Text-field>
<Text-field style="Text" layout="Normal">Maxima and Minima on a Finite Interval</Text-field>
</Input>
</Group>
<Group labelreference="L1" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart;</Text-field>
</Input>
</Group>
<Group labelreference="L2" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">with(Maplets[Tools]): with(Maplets[Elements]): with(plots):
StartEngine();</Text-field>
</Input>
</Group>
<Group labelreference="L19" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">randomize():</Text-field>
</Input>
</Group>
<Group labelreference="L46" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">lightorange:=&quot;#FFB300&quot;:
lightcyan:=&quot;#DDFFFF&quot;:</Text-field>
</Input>
</Group>
<Group labelreference="L47" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">ColorFooter:=lightcyan:
FontFooter:=Font(&quot;helvetica&quot;,10):</Text-field>
</Input>
</Group>
<Group labelreference="L48" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">rand4:=rand(1..4):
rand5:=rand(1..5):
rand8:=rand(4..8):
rand9:=rand(-9..9):
rand55:=rand(-5..5):</Text-field>
</Input>
</Group>
<Group labelreference="L21" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">new:=proc()
global c1, c2, f, fp, minimum, maximum;
local a, c, b, d, xmin, ymin, xmax, ymax, x1;
a:=rand4();
c1:=rand9();
c2:=rand9();
c:=rand9();
fp:=sort(expand(a*(x-c1)*(x-c2)));
f:=sort(int(fp,x)+c);
b:=rand55();
d:=b+rand8();
#print(b,c1,c2,d);
#print(eval(f, x=b), eval(f, x=c1), eval(f, x=c2), eval(f, x=d));
while nops({eval(f, x=b), eval(f, x=c1), eval(f, x=c2), eval(f, x=d)})
      &lt; nops({b, c1, c2, d}) do
  b:=rand55();
  d:=b+rand8();
#  print(b,c1,c2,d);
#  print(eval(f, x=b), eval(f, x=c1), eval(f, x=c2), eval(f, x=d));
end do;
xmin:=b; ymin:=eval(f, x=b);
xmax:=b; ymax:=eval(f, x=b);
for x1 in ({c1,c2,d} minus {b}) do
  if x1&lt;b or x1&gt;d then next end if;
  if eval(f, x=x1)&lt;ymin then
    xmin:=x1; ymin:=eval(f, x=x1);
  end if;
  if eval(f, x=x1)&gt;ymax then
    xmax:=x1; ymax:=eval(f, x=x1);
  end if;
end do;
minimum:=[xmin,ymin];
maximum:=[xmax,ymax];
#print(minimum,maximum);
Set(showf = MathML[Export](f));
Set(interval = [b,d]);
Set(reply=&quot;&quot;);
Set(deriv=&quot;&quot;);
Set(critpoint=&quot; [   ,   ] &quot;);
Set(testcritpoint=&quot;&quot;);
Set(critpointvalue=&quot;&quot;);
Set(max=&quot; [   ,   ] &quot;);
Set(min=&quot; [   ,   ] &quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L22" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_derivative:=proc()
global fp;
local userfp;
userfp:=Get(deriv::anything):
if simplify(fp-userfp)=0
   then Set(reply=&quot;Correct derivative!&quot;)
   else Set(reply=&quot;You're almost there. Keep trying.&quot;)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L28" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_derivative:=proc()
global fp;
Set(deriv=fp);
Set(reply=&quot;Try one by yourself next time.&quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L27" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_critpoint:=proc()
global c1, c2;
local usercritpts,correctcritpts;
usercritpts:=Get(critpoint::[realcons,realcons]):
if (evalf[4](c1-usercritpts[1])=0. and
    evalf[4](c2-usercritpts[2])=0.)
or (evalf[4](c2-usercritpts[1])=0. and
    evalf[4](c1-usercritpts[2])=0.)
  then Set(reply=&quot;Great Job!&quot;)
  else Set(reply=&quot;Incorrect.&quot;)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L26" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_critpoint:=proc()
global c1, c2;
Set(critpoint=sort([c1,c2]));
Set(reply=&quot;Try one by yourself next time.&quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L25" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">eval_critpoint:=proc()
global f;
local fa, usercritpt;
usercritpt:=Get(testcritpoint::realcons):
fa:=eval(f,x=usercritpt);
Set(critpointvalue=evalf[4](fa));
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L23" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_min:=proc()
global minimum;
local usermin;
usermin:=Get(min::[realcons,realcons]):
if (evalf[4](minimum[1]-usermin[1])=0. and
    evalf[4](minimum[2]-usermin[2])=0.)
  then Set(reply=&quot;Oh snap! You got it right!&quot;)
  else Set(reply=&quot;You're almost there. Try again.&quot;)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L31" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_min:=proc()
global minimum;
Set(min=evalf[4](minimum));
Set(reply=&quot;Try one by yourself next time.&quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L33" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_max:=proc()
global maximum;
local usermax;
usermax:=Get(max::[realcons,realcons]):
if (evalf[4](maximum[1]-usermax[1])=0. and
    evalf[4](maximum[2]-usermax[2])=0.)
  then Set(reply=&quot;You're doing awesome! Try another function.&quot;)
  else Set(reply=&quot;Not quite. Try again.&quot;)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L34" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_max:=proc()
global maximum;
Set(max=evalf[4](value(maximum)));
Set(reply=&quot;Try one by yourself next time.&quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L45" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L44" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">MaxMinFinInter:=Maplet(onstartup=RunWindow(MAIN),
Window[MAIN](title=&quot;Maxima and Minima on a Finite Interval&quot;,
defaultbutton=BEval,
[ halign=none,
  [ Button(&quot;New Function&quot;, Evaluate(function = &quot;new&quot;), background=magenta),
    HorizontalGlue(),
    Button(&quot;Close&quot;, Shutdown(), background=pink)
  ],
  BoxColumn( border=true,
    [ halign=none,
      &quot;Find the critical points of the function:  f(x) =&quot;,
      MathMLViewer[showf](width=200, height=50),
      HorizontalGlue()
    ],
    [ halign=none,
      &quot;and determine the maximum and minimum on the interval:&quot;,
      TextField[interval](&quot;&quot;, width=20),
      HorizontalGlue()
    ]
  ),
  [ halign=none,
    &quot;f '(x)= &quot;,
    TextField[deriv](&quot;&quot;, width=30),
    HorizontalGlue(),
    Button(&quot;Check&quot;, Evaluate(function=&quot;check_derivative&quot;), background=green),
    Button(&quot;Show Answer&quot;, Evaluate(function=&quot;show_derivative&quot;), background=lightorange)
  ],
  [ halign=none,
    &quot;List the Critical Points: &quot;,
    TextField[critpoint](&quot; [   ,   ] &quot;, width=20),
    HorizontalGlue(),
    Button(&quot;Check&quot;, Evaluate(function= &quot;check_critpoint&quot;), background=green),
    Button(&quot;Show Answer&quot;, Evaluate(function=&quot;show_critpoint&quot;), background=lightorange)
  ],
  [ halign=none,
    border=true,
    caption=&quot;Find the function value at each critical point and endpoint:&quot;,
    &quot;Type x and click Evaluate.&quot;,
    HorizontalGlue(),
    &quot;f(&quot;,
    TextField[testcritpoint](&quot;&quot;, width=4),
    &quot;) =&quot;,
    TextField[critpointvalue](&quot;&quot;, width=10),
    Button[BEval](&quot;Evaluate&quot;, Evaluate(function=&quot;eval_critpoint&quot;), background=lightorange),
    HorizontalGlue()
  ],
  [ halign=none,
    &quot;Minimum:   [x, f(x)] =&quot;,
    TextField[min](&quot; [   ,   ] &quot;), 
    HorizontalGlue(),
    Button(&quot;Check&quot;, Evaluate(function=&quot;check_min&quot;), background=green),
    Button(&quot;Show Answer&quot;, Evaluate (function=&quot;show_min&quot;), background=lightorange)
  ],
  [ halign=none,
    &quot;Maximum:  [x, f(x)] =&quot;,
    TextField[max](&quot; [   ,   ] &quot;), 
    HorizontalGlue(), 
    Button(&quot;Check&quot;, Evaluate(function=&quot;check_max&quot;), background=green), 
    Button(&quot;Show Answer&quot;, Evaluate(function=&quot;show_max&quot;), background=lightorange)
  ],
  [ TextField[reply](width=50,editable=false)  
  ],
  [ halign=none, background=ColorFooter,
    Label(&quot;Programmers: Analisa Packham &amp; Jeffrey Meyers&quot;, font=FontFooter),
    HorizontalGlue(),
    Label(&quot;Copyright: P. Yasskin 2008&quot;, font=FontFooter)
  ]
]
)
):</Text-field>
</Input>
</Group>
<Group labelreference="L14" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Maplets[Display](MaxMinFinInter);</Text-field>
</Input>
</Group>
<Group labelreference="L40" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Worksheet>
