# [LON-CAPA-users] formula response question

James Mueller lon-capa-users@mail.lon-capa.org
Sat, 21 Feb 2009 21:05:12 -0500

A student in a calculus course is entering an answer to a formula
response problem and keeps getting "Unable to understand formula" even
when they enter something simple like "x" for their answer.  The rest
of the students are reported to be not having troubles.  I assumed it
must be some problem with the script tat was triggered by the numbers
used for this particular problem.  After a quick look, I can't see
anything, but I have to admit my perl is rusty.  Anybody else se
anything?

The script is

<problem>
<meta name="isbasedontime" content="1235265561" />
<meta name="isbasedonres" content="\%2fres\%2fpitt\%2fathanas\%2fc2\
%2ddiffeq\%2d21\%2eproblem" />
<script type="loncapa/perl">
$b=0;$d=0; while($b==0 ||$d==0){$b=&random(-10,10,1);$d=&random(-10,10,1);}
$a=-1*$b/$d; while($a==-1*$b/$d){$a=&random(1,10,1);}$c=&random(1,10,1); $i=&random(1,50,1); if($b<0){$s=" ";} if($b>0){$s="+";}$M1=$c/($a*$d+$b); $M2=$i-$M1;$solution="$M1*exp($d*x)+$M2*exp(-1*$b/$a*x) "; </script> <startouttext /> <br /> Determine the solution to the initial value differential equation <m eval="on"> $a y' s b y = c e^{d x} \hspace{.2in} y ( 0 )= i$</m> <endouttext /> <p /> <startouttext /><m>$ y ( x ) =  $</m><endouttext /> <formularesponse samples="x@1:3#4" answer="$solution" id="11">
<responseparam name="tol" default="0.001" type="tolerance"
description="Numerical Tolerance" />
</formularesponse>
</problem>

And the students variables for this problem are

%!
=>0,EFBIG=>0,EHOSTDOWN=>0,EHOSTUNREACH=>0,EIDRM=>0,EILSEQ=>0,EINPROGRESS
=>0,EINTR=>0,EINVAL=>0,EIO=>0,EISCONN=>0,EISDIR=>0,EISNAM=>0,EKEYEXPIRED
=>0,EKEYREJECTED=>0,EKEYREVOKED=>0,EL2HLT=>0,EL2NSYNC=>0,EL3HLT=>0,EL3RS
$M1=7$M2=-2
$a=4$b=-7
$c=7$d=2
$deg2rad=0.0174532925199433$i=5
$pi=3.14159265358979$rad2deg=57.2957795130823
$s=$solution=7*exp(2*x)+-2*exp(-1*-7/4*x)