Parent Directory
|
Revision Log
added problem library as webwork/ww_prob_lib with revision tag prob-lib-2
1 ##DESCRIPTION 2 ##KEYWORDS('derivatives') 3 ## Find first and second derivatives of a polynomial, evaluate both at a point 4 ##ENDDESCRIPTION 5 6 DOCUMENT(); # This should be the first executable line in the problem. 7 8 loadMacros( 9 "PG.pl", 10 "PGbasicmacros.pl", 11 "PGchoicemacros.pl", 12 "PGanswermacros.pl", 13 "PGauxiliaryFunctions.pl" 14 ); 15 16 TEXT(&beginproblem); 17 $showPartialCorrectAnswers = 1; 18 19 $a1 = random(2,5,1); 20 $b1 = random(2,8,1); 21 $c1 = random(2,4,1); 22 $d1 = random(1,10,1); 23 $x1 = random(1,5,1); 24 $deriv1f = "7*x^6 - 5*$a1*x^4 +3*$b1*x^2 - $c1"; 25 $deriv1 = 7*$x1**6 - 5*$a1*$x1**4 +3*$b1*$x1**2 - $c1; 26 $deriv2f = "42*x^5 - 20*$a1*x^3 +6*$b1*x"; 27 $deriv2 = 42*$x1**5 - 20*$a1*$x1**3 +6*$b1*$x1; 28 29 TEXT(EV2(<<EOT)); 30 Let \( f(x) = x^7- $a1 x^5 + $b1 x^3 - $c1 x - $d1 \). $BR 31 Then \( f'(x) \) is \{ans_rule(30) \} $BR 32 \( f'( $x1 ) \) is \{ans_rule(30) \} $BR 33 EOT 34 35 $ans1 = $deriv1f; 36 $ans2 = $deriv1; 37 &ANS(function_cmp($ans1)); 38 &ANS(std_num_cmp($ans2)); 39 TEXT(EV2(<<EOT)); 40 \( f''(x) \) is \{ans_rule(30) \} $BR 41 and \( f''( $x1 ) \) is \{ans_rule(30) \} 42 EOT 43 44 $ans3 = $deriv2f; 45 $ans4 = $deriv2; 46 &ANS(function_cmp($ans3)); 47 &ANS(std_num_cmp($ans4)); 48 ENDDOCUMENT(); # This should be the last executable line in the problem.
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |