# [LON-CAPA-users] Response Math unable to understand formula for incorrect responses

Seema Ali sali at vsb.bc.ca
Sun Jan 29 03:12:56 EST 2012

If the answer is correct, it will accept it as correct but if it is incorrect the Unable To Understand Formula error pops up and I would prefer if it said Incorrect instead.  Is there something that I have set up incorrectly?  Below is the XML for the problem.

The problem creates a simple rational expression and asks the student to find the inverse function of that expression.

Thanks.

<problem>
<script type="loncapa/perl">$a = &random(2,6,1) * &random(-1,1,2);$b = &random(7,9,1) * &random(-1,1,2);
$c = &random(7,9,1) * &random(-1,1,2);$d = &random(2,6,1) * &random(-1,1,2);

$num1 = "$a * x + $b";$den1 = "$c * x +$d";

#simplify the expression
$numerator=&cas('maxima',"num(trigsimp(($num1) / ($den1)))");$denominator=&cas('maxima',"denom(trigsimp(($num1) / ($den1)))");

$function = "($numerator)/($denominator)"; @args = ($function);

</script><startouttext />Given the function <m eval='on'>f(x) = \Large\frac{$numerator}{$denominator}</m>, determine the equation of the inverse function.

<br />
Answer: <m>$f^{-1}(x)=$</m><endouttext />
g(x):=LONCAPALIST[1];

</mathresponse>

</problem>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20120129/c06f71bf/attachment-0001.html>