What is LON-CAPA?  Who is LON-CAPA?  Documentation  Installation  Scholarship  Developers  Events

The LearningOnline Network with CAPA

Home > Features > Computer Algebra System > Formularesponse Example

Formularesponse Example

<problem>
<script type="loncapa/perl">
$a1=&random(3,6,1);
$e1=&random(3,6,1);
$a2=&random(6,8,1);
$e2=&random(6,8,1);
$da1=$a1*$e1;
$da2=$a2*$e2;
$de1=$e1-1;
$de2=$e2-1;
@derivative=($da1.'t^'.$de1,$da2.'t^'.$de2);
@wrongderivative=($a1.'t^'.$de1,$a2.'t^'.$de2);
</script>
<startouttext />What is the derivative of
<m eval="on">\[\left(\begin{array}{c}$a1 t^$e1\\ $a2 t^$e2\end{array}\right)\]</m>
with respect to <m>$t$</m>?<endouttext />
<formularesponse answer="@derivative">
<textline readonly="no" size="25" />
<hintgroup showoncorrect="no">
<formulahint answer="@wrongderivative" name="nomulti"></formulahint>
<hintpart on="nomulti">
<startouttext />You need to multiply with the original exponent.<endouttext />
</hintpart>
</hintgroup>
</formularesponse>
</problem>

Contact Us: lon-capa@lon-capa.org

Site maintained by Gerd Kortemeyer.
Supported by the National Science Foundation under NSF-ITR 0085921, NSF-CCLI-ASA 0243126, and NSF-CCLI 0717790. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. Initial funding for CAPA has been provided by the Alfred. P. Sloan Foundation and the Andrew W. Mellon Foundation.

©2013 Michigan State University Board of Trustees.