[rochester] / trunk / rochester_problib / setDerivatives13Higher / s2_7_7.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

View of /trunk/rochester_problib/setDerivatives13Higher/s2_7_7.pg

Mon Jun 25 19:20:51 2001 UTC (11 years, 11 months ago) by sam
File size: 1203 byte(s)
```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 g(s)=(as-b)^c ,
4 ##  evaluate both at a point
5 ##ENDDESCRIPTION
6
7 DOCUMENT();        # This should be the first executable line in the problem.
8
10 "PG.pl",
11 "PGbasicmacros.pl",
12 "PGchoicemacros.pl",
14 "PGauxiliaryFunctions.pl"
15 );
16
17 TEXT(&beginproblem);
18 \$showPartialCorrectAnswers = 1;
19
20 \$a1 = random(2,5,1);
21 \$b1 = random(1,8,1);
22 \$c1 = random(6,9,1);
23 \$x1 = random(1,5,1);
24 \$c2=\$c1-1;
25 \$c3=\$c2-1;
26 \$deriv1f = "\$c1 * (\$a1*s -\$b1)^\$c2 * \$a1";
27 \$deriv1 = \$c1 * (\$a1*\$x1 -\$b1)**(\$c1-1) * \$a1;
28 \$deriv2f = "\$c1*\$c2*(\$a1*s -\$b1)^\$c3 * \$a1^2";
29 \$deriv2 = \$c1*\$c2*(\$a1*\$x1 -\$b1)**\$c3 * \$a1*\$a1;
30
31 TEXT(EV2(<<EOT));
32 Let \( g(s) = ( \$a1 s - \$b1)^ \$c1   \). \$BR
33 Then \( g'(s) \) is \{ans_rule(30) \} \$BR
34 \( g'( \$x1 ) \) is \{ans_rule(30) \}, \$BR
35 EOT
36
37 \$ans1 = \$deriv1f;
38 \$ans2 = \$deriv1;
39 &ANS(function_cmp(\$ans1, "s"));
40 &ANS(std_num_cmp(\$ans2));
41 TEXT(EV2(<<EOT));
42 \( g''(s) \) is \{ans_rule(30) \} \$BR
43 and \( g''( \$x1 ) \) is \{ans_rule(30) \}
44 EOT
45
46 \$ans3 = \$deriv2f;
47 \$ans4 = \$deriv2;
48 &ANS(function_cmp(\$ans3, "s"));
49 &ANS(std_num_cmp(\$ans4));
50 ENDDOCUMENT();        # This should be the last executable line in the problem.
```

 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9