[LON-CAPA-users] square roots in formula response

Justin Gray lon-capa-users@mail.lon-capa.org
Mon, 3 Sep 2007 17:53:39 -0800

------=_Part_20634_15091250.1188870819906
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Peter,

Are you sure that Maxima does not simplify expressions when comparing them?
I was under the impression that Maxima tries to simplify the difference of
two equivalent expressions and verify that it is zero. Consider the
following problem.

<problem>
<startouttext />
Simplify: <p></p>

<m display =3D jsmath>$\Large{\frac{x^3 - 3x^2 + 3x - 9}{x^4 - 81}} =3D$</=
m>
<endouttext />

<formularesponse answer=3D"(x^2 + 3)/((x + 3)(x^2 + 9))">
</formularesponse>
</problem>

This appears to accept the LHS as a correct answer.

Thanks,
Justin

On 9/3/07, Justin Gray <jgray@math.sfu.ca> wrote:
>
> Many thanks, Peter. This is exactly what I was looking for.
>
> Justin
>
> On 9/3/07, Peter Riegler <p.riegler@fh-wolfenbuettel.de > wrote:
> >
> > Hi Justin,
> >
> > does "elegant" include two seperate input fields, for demoninator and
> > numerator? Or did you come up with two input fields because otherwise
> > the lhs (i.e. non-rationalized) would be accepted if using sampling?
> > If so, I would suggest something like
> > <formularesponse answer=3D"(m - 4)*(sqrt(m) + 4)/(m-16)">
> >
> > (I would prefer the students enter sqrt(m) rather than sqrtm).
> >
> > What the above does is to ask maxima
> > is( STUDENTSRESPONSE =3D (m - 4)*(sqrt(m) + 4)/(m-16));
> >
> > The important point here is that a student's reponse
> > (m-4)/(sqrt(m)-4)
> > would return false. The reason is, maxima does not simplify before
> > comparison.
> >
> > Hope this will help.
> >
> > Peter
> >
> > Justin Gray wrote:
> >
> > > Does anyone know a more elegant way to write the problem below?
> > >
> > > Thanks,
> > > Justin
> > >
> > > <problem>
> > > <startouttext />Rationalize the denominator and
> > simplify:<p></p><br></br>
> > > Use sqrtm for <m display =3D jsmath>$\sqrt{m}</m>.<p></p> > > > <table> > > > > > > <tr> > > > <td><m display=3D"jsMath">\, \, \, \,$m - 4$</m></td> <td></td> > > > <td><endouttext /> > > > <formularesponse samples=3D"m,sqrtm@-3,-3:3,3#5" answer=3D"(m - 4)(sq= rtm + > > > > > 4)" id=3D"11"> > > > > > > <textline readonly=3D"no" size=3D"20" /> > > > > > > </formularesponse><startouttext /></td> > > > </tr> > > > <tr> > > > <td><hr width=3D"60"></hr></td> <td><m display=3D"jsMath">$\mbox{=
} =3D
> > > \mbox{ }$</m></td> <td><hr width=3D"140"></hr></td> > > > </tr> > > > <tr> > > > <td><m display=3D"jsMath">$\sqrt{m} - 4$</m></td> <td></td> > > > <td><endouttext /> > > > <formularesponse samples=3D"m@-3:3#5" answer=3D"m - 16" id=3D"12"> > > > > > > <textline readonly=3D"no" size=3D"20" /> > > > > > > </formularesponse><startouttext /></td> > > > </tr> > > > </table><p></p><endouttext /> > > > </problem> > > > > > > > > > -- > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > Justin Gray Tel. > > > 778-782-4237 > > > Dept. of Mathematics Fax. > > 778-782-4947 > > > Simon Fraser University > > > 8888 University Drive > > > Burnaby, B.C. V5A 1S6 > > > Canada > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > -- > > Peter Riegler > > Fachhochschule Braunschweig/Wolfenb=FCttel > > Salzdahlumer Str. 46/48, 38302 Wolfenb=FCttel > > Tel. +49 5331 939 6314, Fax. +49 5331 939 6002 > > email: p.riegler@fh-wolfenbuettel.de > > http://public.rz.fh-wolfenbuettel.de/~riegler<http://public.rz.fh-wolfe= nbuettel.de/%7Eriegler> > > _______________________________________________ > > LON-CAPA-users mailing list > > LON-CAPA-users@mail.lon-capa.org > > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users > > > > > > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Justin Gray Tel. > 778-782-4237 > Dept. of Mathematics Fax. 778-782-4947 > Simon Fraser University > 8888 University Drive > Burnaby, B.C. V5A 1S6 > Canada > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > --=20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Justin Gray Tel. 778-782-4237 Dept. of Mathematics Fax. 778-782-4947 Simon Fraser University 8888 University Drive Burnaby, B.C. V5A 1S6 Canada ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ------=_Part_20634_15091250.1188870819906 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Peter,<br><br>Are you sure that Maxima does not simplify expressions whe= n comparing them? I was under the impression that Maxima tries to simplify = the difference of two equivalent expressions and verify that it is zero. Co= nsider the following problem. <br><br>&lt;problem&gt;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;startouttext /&gt= ;<br>Simplify: &lt;p&gt;&lt;/p&gt;<br><br>&lt;m display =3D jsmath&gt;$\Lar=
ge{\frac{x^3 - 3x^2 + 3x - 9}{x^4 - 81}} =3D $&lt;/m&gt;<br>&nbsp;&nbsp;&nb= sp; &lt;endouttext /&gt;<br><br>&nbsp;&nbsp;&nbsp; &lt;formularesponse answ= er=3D&quot;(x^2 + 3)/((x + 3)(x^2 + 9))&quot;&gt; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;textline readonly=3D&quo= t;no&quot; size=3D&quot;40&quot; /&gt;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&n= bsp; &lt;/formularesponse&gt;<br>&lt;/problem&gt;<br><br>This appears to ac= cept the LHS as a correct answer.<br><br>Thanks,<br>Justin<br><br> <div><span class=3D"gmail_quote">On 9/3/07, <b class=3D"gmail_sendername">J= ustin Gray</b> &lt;<a href=3D"mailto:jgray@math.sfu.ca">jgray@math.sfu.ca</= a>&gt; wrote:</span><blockquote class=3D"gmail_quote" style=3D"border-left:= 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex= ;"> Many thanks, Peter. This is exactly what I was looking for.<br><span class= =3D"sg"><br>Justin</span><div><span class=3D"q" id=3D"q_114cd9381ef54c6d_2"= ><br><br><div><span class=3D"gmail_quote">On 9/3/07, <b class=3D"gmail_send= ername"> Peter Riegler</b> &lt;<a href=3D"mailto:p.riegler@fh-wolfenbuettel.de" targ= et=3D"_blank" onclick=3D"return top.js.OpenExtLink(window,event,this)">p.ri= egler@fh-wolfenbuettel.de </a>&gt; wrote:</span><blockquote class=3D"gmail_quote" style=3D"border-lef= t: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1= ex;">Hi Justin,<br><br>does &quot;elegant&quot; include two seperate input = fields, for demoninator and <br>numerator? Or did you come up with two input fields because otherwise<b= r>the lhs (i.e. non-rationalized) would be accepted if using sampling?<br>I= f so, I would suggest something like<br>&lt;formularesponse answer=3D&quot;= (m - 4)*(sqrt(m) + 4)/(m-16)&quot;&gt; <br><br>(I would prefer the students enter sqrt(m) rather than sqrtm).<br><= br>What the above does is to ask maxima<br>is( STUDENTSRESPONSE =3D (m - 4)= *(sqrt(m) + 4)/(m-16));<br><br>The important point here is that a student&#= 39;s reponse <br>(m-4)/(sqrt(m)-4)<br>would return false. The reason is, maxima does not= simplify before<br>comparison.<br><br>Hope this will help.<br><br>Peter<br= ><br>Justin Gray wrote:<br><br>&gt; Does anyone know a more elegant way to = write the problem below? <br>&gt;<br>&gt; Thanks,<br>&gt; Justin<br>&gt;<br>&gt; &lt;problem&gt;<br>= &gt; &lt;startouttext /&gt;Rationalize the denominator and simplify:&lt;p&g= t;&lt;/p&gt;&lt;br&gt;&lt;/br&gt;<br>&gt; Use sqrtm for &lt;m display =3D j= smath&gt;$\sqrt{m}&lt;/m&gt;.&lt;p&gt;&lt;/p&gt;
<br>&gt; &lt;table&gt;<br>&gt;<br>&gt; &lt;tr&gt;<br>&gt;&nbsp;&nbsp;&nbsp;=
&nbsp; &lt;td&gt;&lt;m display=3D&quot;jsMath&quot;&gt;\, \, \, \, $m - 4$&=
lt;/m&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt;<br>&gt; &lt;td&gt;&lt;endouttext=
/&gt;<br>&gt; &lt;formularesponse samples=3D&quot;m,sqrtm@-3,-3:3,3#5&quot=
<br>&gt; 4)&quot; id=3D&quot;11&quot;&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;=
r>&gt;<br>&gt; &lt;/formularesponse&gt;&lt;startouttext /&gt;&lt;/td&gt;<br=
>&gt; &lt;/tr&gt;<br>
&gt; &lt;tr&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;hr width=3D&quot;60&quot;&gt=
;&lt;/hr&gt;&lt;/td&gt; &lt;td&gt;&lt;m display=3D&quot;jsMath&quot;&gt;$\m= box{ } =3D<br>&gt; \mbox{ }$&lt;/m&gt;&lt;/td&gt; &lt;td&gt;&lt;hr width=3D=
&quot;140&quot;&gt;&lt;/hr&gt;&lt;/td&gt;
<br>&gt; &lt;/tr&gt;<br>&gt; &lt;tr&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt=
;td&gt;&lt;m display=3D&quot;jsMath&quot;&gt;$\sqrt{m} - 4$&lt;/m&gt;&lt;/t=
d&gt; &lt;td&gt;&lt;/td&gt;<br>&gt; &lt;td&gt;&lt;endouttext /&gt;<br>&gt; =
ot; id=3D&quot;12&quot;&gt;
uot; size=3D&quot;20&quot; /&gt;<br>&gt;<br>&gt; &lt;/formularesponse&gt;&l=
t;startouttext /&gt;&lt;/td&gt;<br>&gt; &lt;/tr&gt;<br>&gt; &lt;/table&gt;&=
lt;p&gt;&lt;/p&gt;&lt;endouttext /&gt;
<br>&gt; &lt;/problem&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; ~~~~~~~~~~~~~~=
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>&gt; Justin Gray&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tel.<br>&=
gt; 778-782-4237<br>
&gt; Dept. of Mathematics&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; Fax. 778-782-4947
<br>&gt; Simon Fraser University<br>&gt; 8888 University Drive<br>&gt; Burn=
aby, B.C. V5A 1S6<br>&gt; Canada<br>&gt; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~~~~~~~~~~~~~~~~~~~~~~~~~<br><br>--<br>Peter Riegler<br>Fachhochschule Bra=
unschweig/Wolfenb=FCttel
<br>Salzdahlumer Str. 46/48, 38302 Wolfenb=FCttel<br>Tel. +49 5331 939 6314=
, Fax. +49 5331 939 6002<br>email: <a href=3D"mailto:p.riegler@fh-wolfenbue=
t,this)">
p.riegler@fh-wolfenbuettel.de</a><br><a href=3D"http://public.rz.fh-wolfenb=
k(window,event,this)">
http://public.rz.fh-wolfenbuettel.de/~riegler</a><br>______________________=
_________________________<br>LON-CAPA-users mailing list<br><a href=3D"mail=
LON-CAPA-users@mail.lon-capa.org</a>
<br><a href=3D"http://mail.lon-capa.org/mailman/listinfo/lon-capa-users" ta=
tp://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><br></blockquote>=
</div>
<br><br clear=3D"all"><br></span></div>-- <br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div><span class=3D"e" id=3D"q_114cd9381ef54c6d_4"><br>Justin Gray&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tel. 778-=
782-4237<br>Dept. of Mathematics&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; Fax. 778-782-4947<br>Simon Fraser University
<br>8888 University Drive<br>Burnaby,=20
~~~~~~~~~~~
</span></div></blockquote></div><br><br clear=3D"all"><br>-- <br>~~~~~~~~~~=
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Justin Gray&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tel. 778-7=
82-4237<br>Dept. of Mathematics&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; Fax. 778-782-4947
<br>Simon Fraser University<br>8888 University Drive<br>Burnaby, B.C. V5A 1=