[rochester] / trunk / rochester_problib / setDerivatives10MaxMin / s3_1_42.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/rochester_problib/setDerivatives10MaxMin/s3_1_42.pg

Revision 2 - (download) (annotate)
Mon Jun 25 19:20:51 2001 UTC (11 years, 11 months ago) by sam
File size: 1238 byte(s)
```added problem library as webwork/ww_prob_lib with revision tag prob-lib-2
```

```    1 #DESCRIPTION
2 #KEYWORDS('derivatives', 'critical points', 'minimum,maximum')
3 #  Find local maximum and minimum of a cubic polynomial
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(1,5,1);
20 \$b1 = random(6,10,1);
21 \$coef3 = 2;
22 \$coef2 = 3*(\$a1+\$b1);
23 \$coef1 = 6*\$a1*\$b1;
24 \$coef0 = random(1,11,1);
25
26 TEXT(EV2(<<EOT));
27 The function \( f(x) = \$coef3 x^3 - \$coef2 x^2 + \$coef1 x + \$coef0 \)
28 has one local minimum and one local maximum. \$BR
29 This function has a local minimum at \( x \) equals \{ans_rule(10) \}
30 EOT
31 \$ans = \$b1;
32 &ANS(std_num_cmp(\$ans));
33 TEXT(EV2(<<EOT));
34 with value \{ans_rule(20) \} \$BR
35 EOT
36 \$ans = \$coef3*\$b1**3 - \$coef2*\$b1**2 + \$coef1*\$b1 + \$coef0;
37 &ANS(std_num_cmp(\$ans));
38 TEXT(EV2(<<EOT));
39 and a local maximum at \( x \) equals \{ans_rule(10) \}
40 EOT
41 \$ans = \$a1;
42 &ANS(std_num_cmp(\$ans));
43 TEXT(EV2(<<EOT));
44 with value \{ans_rule(20) \}
45 EOT
46 \$ans = \$coef3*\$a1**3 - \$coef2*\$a1**2 + \$coef1*\$a1 + \$coef0;
47 &ANS(std_num_cmp(\$ans));
48
49 ENDDOCUMENT();        # This should be the last executable line in the problem.
```

 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9