<?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="L2" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Kenneth McCown &amp; Erik Katzen</Text-field>
<Text-field style="Text" layout="Normal">Minimum Distance Between a Point and a Line</Text-field>
<Text-field style="Text" layout="Normal">Math 152 - 202</Text-field>
</Input>
</Group>
<Group labelreference="L186" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart;</Text-field>
</Input>
</Group>
<Group labelreference="L6" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">with(Maplets[Tools]): with(Maplets[Elements]): with(plots):# with(plottools):
StartEngine();</Text-field>
</Input>
</Group>
<Group labelreference="L89" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">randomize():</Text-field>
</Input>
</Group>
<Group labelreference="L91" 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="L187" 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="L183" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">pointcoord:=rand(-8..8):</Text-field>
</Input>
</Group>
<Group labelreference="L18" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">num1:=rand(-3..3):</Text-field>
</Input>
</Group>
<Group labelreference="L21" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">num2:=rand(-6..6):</Text-field>
</Input>
</Group>
<Group labelreference="L22" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">num3:=rand(-7..7):</Text-field>
</Input>
</Group>
<Group labelreference="L12" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L158" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">problem:=proc()
global dist2, derDist2, answerX, answerY, finalDist;
local co1, co2, co3, curve1, x1, x2, y1, y2, plotcrv, plotpt, curveplot;
co1:=num1():
co2:=num2():
while co2=0 do
  co2:=num2():
end do;
co3:=num3():
curve1:=co2*x+co3;
x2:=x; y2:=curve1;
answerX:=2,3;
while nops([answerX])&lt;&gt;1 do
  x1:=pointcoord();
  y1:=pointcoord();
  dist2:=(x2-x1)^2+(y2-y1)^2;
  derDist2:=diff(dist2, x);
  answerX:=solve(derDist2=0,x);
end do;
answerY:=eval(curve1,x=answerX);
finalDist:=sqrt(eval(dist2,x=answerX));
Set(TFcurv=curve1);
Set(TFpt=[x1,y1]);
plotcrv:=plot(curve1,x=-10..10, y=-10..10);
plotpt:=plot([[x1,y1]], style=point, symbol=circle, symbolsize=16, color=blue);
curveplot:=display([plotcrv,plotpt], axes=normal, tickmarks=[5,5], scaling=constrained);
Set(CurvePlot=curveplot);
Set(TFd2=&quot;&quot;);
Set(TFderiv=&quot;&quot;);
Set(TFx=&quot;&quot;);
Set(TFy=&quot;&quot;);
Set(TFd=&quot;&quot;);
Set(reply=&quot;&quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L170" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L173" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">hint1:=proc()
Set(reply=&quot;Add the square of the difference between the x-coordinates with the square of the difference between the y-coordinates.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L165" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check1:=proc()
global dist2;
local user_d2;
if Get(TFd2)=&quot;&quot; then
  Set(reply=&quot;No answer given.&quot;);
  return;
end if;
user_d2:=Get(TFd2::anything):
if simplify(dist2 - user_d2)=0 then
  Set(reply=&quot;You're right!&quot;):
else
  Set(reply=&quot;Nope, try again.&quot;):
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L156" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show1:=proc()
Set(TFd2=dist2):
Set(reply=&quot;Way to just surrender there.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L154" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L157" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">hint2:=proc()
Set(reply=&quot;Take the derivative of D^2 using the chain rule.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L172" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check2:=proc()
global derDist2;
local user_deriv;
if Get(TFderiv)=&quot;&quot; then
  Set(reply=&quot;No answer given.&quot;);
  return;
end if;
user_deriv:=Get(TFderiv::anything):
if simplify(derDist2 - user_deriv)=0 then
  Set(reply=&quot;Way to go!&quot;):
else
  Set(reply=&quot;That's not even close.&quot;):
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L174" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show2:=proc()
Set(TFderiv=derDist2):
Set(reply=&quot;You did try to do it at least once, right?.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L166" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L167" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">hint3:=proc()
Set(reply=&quot;Find the x-coordinate that allows the derivative formula to be equal to zero.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L155" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check3:=proc()
global answerX;
local user_x;
if Get(TFx)=&quot;&quot;then
  Set(reply=&quot;No answer given.&quot;);
  return;
end if;
user_x:=Get(TFx::anything):
if simplify(answerX - user_x=0) then
  Set(reply=&quot;You got it!&quot;):
else
  Set(reply=&quot;In espanol: No.&quot;):
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L163" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show3:=proc()
Set(TFx=answerX):
Set(reply=&quot;C'mon, it's not that hard.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L161" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L164" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">hint4:=proc()
Set(reply=&quot;Plug the x-coordinate into the equation of the line.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L168" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check4:=proc()
global answerY;
local user_y;
if Get(TFy)=&quot;&quot; then
  Set(reply=&quot;No answer given.&quot;);
  return;
end if;
user_y:=Get(TFy::anything):
if simplify(answerY - user_y=0) then
  Set(reply=&quot;You're a freakin' genius!&quot;):
else
  Set(reply=&quot;It could be that your life really does have a purpose...even if that purpose is just to serve as a warning to others.&quot;):
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L160" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show4:=proc()
Set(TFy=answerY):
Set(reply=&quot;Try it on your own next time.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L159" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L162" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">hint5:=proc()
Set(reply=&quot;Plug the values of x and y into the original distance formula, y=sqrt((x2-x1)^2+(y2-y1)^2).&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L169" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" 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">check5:=proc()
global finalDist;
local user_d;
if Get(TFd)=&quot;&quot; then
  Set (reply=&quot;No answer given.&quot;);
  return;
end if;
user_d:=Get(TFd::anything):
if simplify(finalDist - user_d=0) then
  Set (reply=&quot;You're the next Einstein!&quot;):
else
  Set (reply=&quot;Just look at it this way...we can't all be rocket scientists when we grow up.&quot;):
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L171" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show5:=proc()
Set(TFd=simplify(finalDist)):
Set(reply=&quot;Don't give up so fast.&quot;):
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L153" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L149" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">DistCurve:=Maplet(onstartup=RunWindow(MAIN),
Font[helv10](&quot;helvetica&quot;,10),
Window[MAIN](title=&quot;Minimum Distance Between a Point and a Line&quot;,
[ [ Button(&quot;New Problem&quot;, Evaluate(function=problem), background=magenta),
    HorizontalGlue(),
    Button(&quot;Quit&quot;, Shutdown(), background=pink)
  ],
  [ border=true,
    &quot;Find the point on the line y =&quot;,
    TextField[TFcurv](width=16, editable=false, background=white),
    &quot;that is closest to the point&quot;,
    TextField[TFpt](width=6, editable=false, background=white),
    &quot;and solve for that minimum distance.&quot;
  ],
  [ halign=none, inset=0, spacing=0,
    [ halign=none, inset=0, spacing=0,
      [ border=true,
        caption=&quot;Enter the square of the Distance Formula:&quot;, 
        &quot;D^2 =&quot;,
        TextField[TFd2](width=17, background=turquoise),
        HorizontalGlue(),
        Button(&quot;Hint&quot;, Evaluate(function=&quot;hint1&quot;), background=yellow),
        Button(&quot;Check&quot;, Evaluate(function=&quot;check1&quot;), background=green),
        Button(&quot;Show&quot;, Evaluate(function=&quot;show1&quot;), background=lightorange)
      ],
      [ border=true,
        caption=&quot;Enter the derivative of the formula:&quot;,
        &quot;d/dx D^2 =&quot;,
        TextField[TFderiv](width=17, background=turquoise),
        HorizontalGlue(),
        Button(&quot;Hint&quot;, Evaluate(function=&quot;hint2&quot;), background=yellow),
        Button(&quot;Check&quot;, Evaluate(function=&quot;check2&quot;), background=green),
        Button(&quot;Show&quot;, Evaluate(function=&quot;show2&quot;), background=lightorange)
      ],
      [ border=true,
        caption=&quot;Find the x-coordinate which gives minimum distance:&quot;, 
        &quot;x =&quot;,
        TextField[TFx](width=8, background=turquoise),
        HorizontalGlue(),
        Button(&quot;Hint&quot;, Evaluate(function=&quot;hint3&quot;), background=yellow),
        Button(&quot;Check&quot;, Evaluate(function=&quot;check3&quot;), background=green),
        Button(&quot;Show&quot;, Evaluate(function=&quot;show3&quot;), background=lightorange)
      ],
      [ border=true,
        caption=&quot;Find the y-coordinate which gives minimum distance:&quot;,
        &quot;y =&quot;,
        TextField[TFy](width=8, background=turquoise),
        HorizontalGlue(),
        Button(&quot;Hint&quot;, Evaluate(function=&quot;hint4&quot;), background=yellow),
        Button(&quot;Check&quot;, Evaluate(function=&quot;check4&quot;), background=green),
        Button(&quot;Show&quot;, Evaluate(function=&quot;show4&quot;), background=lightorange)
      ],
      [ border=true,
        caption=&quot;Find the distance between the origin and this point along the curve:&quot;, 
        &quot;D =&quot;,
        TextField[TFd](width=10, background=turquoise),
        HorizontalGlue(),
        Button(&quot;Hint&quot;, Evaluate(function=&quot;hint5&quot;), background=yellow),
        Button(&quot;Check&quot;, Evaluate(function=&quot;check5&quot;), background=green),
        Button(&quot;Show&quot;, Evaluate(function=&quot;show5&quot;), background=lightorange)
      ]
    ],
    [ border=true,
      caption=&quot;Plot&quot;,
      Plotter[CurvePlot](width=200, height=200)
    ]
  ],
  [ halign=none,
    TextField[reply](width=65, editable=false, background=white)
  ],
  [ halign=none, background=ColorFooter,
    Label(&quot;Programmers: Kenneth McCown &amp; Erik Katzen&quot;, font=FontFooter),
    HorizontalGlue(),
    Label(&quot;Copyright: P. Yasskin 2008&quot;, font=FontFooter)
  ]
]
)
):</Text-field>
</Input>
</Group>
<Group labelreference="L150" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" 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">Maplets[Display]( DistCurve );</Text-field>
</Input>
</Group>
<Group labelreference="L184" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Worksheet>
