| … | |
… | |
| 9 | ## DBchapter('Applications of Differentiation') |
9 | ## DBchapter('Applications of Differentiation') |
| 10 | ## DBsection('The Mean Value Theorem') |
10 | ## DBsection('The Mean Value Theorem') |
| 11 | ## Date('') |
11 | ## Date('') |
| 12 | ## Author('') |
12 | ## Author('') |
| 13 | ## Institution('Rochester') |
13 | ## Institution('Rochester') |
| 14 | ## TitleText1('') |
14 | ## TitleText1('Calculus: Early Transcendentals') |
| 15 | ## EditionText1('') |
15 | ## EditionText1('6') |
| 16 | ## AuthorText1('') |
16 | ## AuthorText1('Stewart') |
| 17 | ## Section1('') |
17 | ## Section1('4.2') |
| 18 | ## Problem1('') |
18 | ## Problem1('12') |
|
|
19 | |
| 19 | |
20 | |
| 20 | DOCUMENT(); # This should be the first executable line in the problem. |
21 | DOCUMENT(); # This should be the first executable line in the problem. |
| 21 | |
22 | |
| 22 | loadMacros("PG.pl", |
23 | loadMacros("PG.pl", |
| 23 | "PGbasicmacros.pl", |
24 | "PGbasicmacros.pl", |
| … | |
… | |
| 47 | $b=2*$A2; |
48 | $b=2*$A2; |
| 48 | $c = $A1 - $avg; |
49 | $c = $A1 - $avg; |
| 49 | $discrim = $b**2 - 4*$a*$c; |
50 | $discrim = $b**2 - 4*$a*$c; |
| 50 | } |
51 | } |
| 51 | |
52 | |
|
|
53 | $poly = nicestring([$A3, $A2, $A1, $A0]); |
|
|
54 | |
| 52 | $root1 = ( -$b - sqrt($discrim) ) /(2*$a); |
55 | $root1 = ( -$b - sqrt($discrim) ) /(2*$a); |
| 53 | $root2 = ( -$b + sqrt($discrim) ) /(2*$a); |
56 | $root2 = ( -$b + sqrt($discrim) ) /(2*$a); |
| 54 | TEXT(EV2(<<EOT)); |
57 | TEXT(EV2(<<EOT)); |
| 55 | Consider the function |
58 | Consider the function |
| 56 | \[ f(x) = !{$A3}x^3 ? {$A2}x^2 ? {$A1}x ? {$A0} \] |
59 | \[ f(x) = $poly\] |
| 57 | Find the average slope of this function on the interval \( ( $left , $right ) \). |
60 | Find the average slope of this function on the interval \( ( $left , $right ) \). |
| 58 | \{ans_rule(20) \} $BR |
61 | \{ans_rule(20) \} $BR |
| 59 | EOT |
62 | EOT |
| 60 | |
63 | |
| 61 | if ($left<= $root1 and $root1 <= $right and $left < $root2 and $root2 <= $right) { # both roots are in interval) |
64 | if ($left<= $root1 and $root1 <= $right and $left < $root2 and $root2 <= $right) { # both roots are in interval) |