version 1.3, 2004/06/10 22:17:59
|
version 1.6, 2007/01/23 21:16:50
|
Line 1
|
Line 1
|
<problem>
|
<problem> |
<script type="loncapa/perl">$z=&random(1,10,1);
|
<script type="loncapa/perl"> |
$constant=&random(1,10,1);
|
$k=&random(3,6,1); |
# y=x+z-constant, solving for x, x=y-z+constant, prettyconstant is for simplifying
|
$formula="a*x^$k"; |
$prettyconstant=$constant-$z;
|
$m=$k-1; |
$x="y+$prettyconstant";
|
$derivative="$k*a*x^$m"; |
# code below substitutes '+-' and '-+' for '-'. This is used in display of answer
|
</script> |
$x=~s/\+-/-/g;
|
|
$x=~s/-\+/-/g;</script>
|
<startouttext /> |
|
What is the derivative of <tt>$formula</tt> with respect to x? |
<startouttext />If z=$z and y=x+z-$constant, what does x equal?
|
<endouttext /> |
<endouttext />
|
|
|
<formularesponse samples="a,x@-3,-3:3,3#4" answer="$derivative"> |
<formularesponse samples="y@-5:5#10" answer="$x">
|
<responseparam description="Numerical Tolerance" type="tolerance" default="0.00001" name="tol" /> |
<responseparam decription="Numerical Tolerance" type="tolerance" default="0.00001" name="tol" />
|
<textline size="25" /> |
<textline size="25" />
|
</formularesponse> |
</formularesponse>
|
|
|
</problem> |
</problem>
|
|
|
|