| 1 | #DESCRIPTION |
1 | # This file is just a pointer to the file |
| 2 | #KEYWORDS('derivatives', 'mean value theorem') |
2 | # |
| 3 | ## tsuda tagged and PAID on 2-20-2004 |
3 | # "Library/Rochester/setDerivatives12MVT/c3s2p1.pg" |
|
|
4 | # |
|
|
5 | # You may want to change your problem set to use that problem |
|
|
6 | # directly, especially if you want to make a copy of the problem |
|
|
7 | # for modification. |
| 4 | |
8 | |
| 5 | ## DBsubject('Calculus') |
9 | DOCUMENT(); |
| 6 | ## DBchapter('Applications of Differentiation') |
10 | includePGproblem("Library/Rochester/setDerivatives12MVT/c3s2p1.pg"); |
| 7 | ## DBsection('The Mean Value Theorem') |
11 | ENDDOCUMENT(); |
| 8 | ## Date('6/3/2002') |
|
|
| 9 | ## Author('') |
|
|
| 10 | ## Institution('') |
|
|
| 11 | ## TitleText1('Calculus: Early Transcendentals') |
|
|
| 12 | ## EditionText1('6') |
|
|
| 13 | ## AuthorText1('Stewart') |
|
|
| 14 | ## Section1('4.2') |
|
|
| 15 | ## Problem1('12') |
|
|
| 16 | |
12 | |
| 17 | # Validate mean value theorem in special cases |
13 | ## These tags keep this problem from being added to the NPL database |
| 18 | #ENDDESCRIPTION |
14 | ## |
|
|
15 | ## DBsubject('ZZZ-Inserted Text') |
|
|
16 | ## DBchapter('ZZZ-Inserted Text') |
|
|
17 | ## DBsection('ZZZ-Inserted Text') |
| 19 | |
18 | |
| 20 | DOCUMENT(); # This should be the first executable line in the problem. |
|
|
| 21 | |
|
|
| 22 | loadMacros("PG.pl", |
|
|
| 23 | "PGbasicmacros.pl", |
|
|
| 24 | "PGchoicemacros.pl", |
|
|
| 25 | "PGanswermacros.pl", |
|
|
| 26 | "PGauxiliaryFunctions.pl", |
|
|
| 27 | "PGcourse.pl"); |
|
|
| 28 | |
|
|
| 29 | TEXT(beginproblem()); |
|
|
| 30 | $showPartialCorrectAnswers=1; |
|
|
| 31 | |
|
|
| 32 | sub f1 { |
|
|
| 33 | my $x = shift; |
|
|
| 34 | $A3*$x**3 + $A2*$x**2 + $A1*$x +$A0; |
|
|
| 35 | } |
|
|
| 36 | $discrim = 0; |
|
|
| 37 | |
|
|
| 38 | while ($discrim == 0 ) { |
|
|
| 39 | $A3= random(1,3,1)*(random(0,1,1) ? 1: -1); |
|
|
| 40 | $A2 = non_zero_random(-4,4,1); |
|
|
| 41 | $A1 = non_zero_random(-4,4,1); |
|
|
| 42 | $A0 = non_zero_random( -4 ,4,1); |
|
|
| 43 | $left = random(-4,4,1); |
|
|
| 44 | $right = $left + random (1,8,1); |
|
|
| 45 | |
|
|
| 46 | $avg = (f1($right) - f1($left) ) /($right - $left); |
|
|
| 47 | $a= 3*$A3; |
|
|
| 48 | $b=2*$A2; |
|
|
| 49 | $c = $A1 - $avg; |
|
|
| 50 | $discrim = $b**2 - 4*$a*$c; |
|
|
| 51 | } |
|
|
| 52 | |
|
|
| 53 | $root1 = ( -$b - sqrt($discrim) ) /(2*$a); |
|
|
| 54 | $root2 = ( -$b + sqrt($discrim) ) /(2*$a); |
|
|
| 55 | TEXT(EV2(<<EOT)); |
|
|
| 56 | Consider the function |
|
|
| 57 | \[ f(x) = !{$A3}x^3 ? {$A2}x^2 ? {$A1}x ? {$A0} \] |
|
|
| 58 | Find the average slope of this function on the interval \( ( $left , $right ) \). |
|
|
| 59 | \{ans_rule(20) \} $BR |
|
|
| 60 | EOT |
|
|
| 61 | |
|
|
| 62 | if ($left<= $root1 and $root1 <= $right and $left < $root2 and $root2 <= $right) { # both roots are in interval) |
|
|
| 63 | TEXT(EV2(<<EOT)); |
|
|
| 64 | By the Mean Value Theorem, we know there exists a \( c \) in the open interval |
|
|
| 65 | \( ( $left, $right ) \) such that \( f'(c) \) is equal to this mean slope. |
|
|
| 66 | Find the two values of \( c \) in the interval which work, enter the smaller root first: |
|
|
| 67 | |
|
|
| 68 | \{ ans_rule(10) \}\( $LTE \) \{ ans_rule(10) \} |
|
|
| 69 | EOT |
|
|
| 70 | |
|
|
| 71 | ANS(num_cmp([$avg,num_sort($root1, $root2)], relTol=>.1)); |
|
|
| 72 | } |
|
|
| 73 | elsif ($left<$root1 and $root1<$right ) { #root 1 is in the interval |
|
|
| 74 | TEXT(EV2(<<EOT)); |
|
|
| 75 | By the Mean Value Theorem, we know there exists a \( c \) in the open interval |
|
|
| 76 | \( ( $left, $right ) \) such that \( f'(c) \) is equal to this mean slope. |
|
|
| 77 | Find the value of \( c \) in the interval which works |
|
|
| 78 | \{ ans_rule(10) \} |
|
|
| 79 | EOT |
|
|
| 80 | ANS(num_cmp([$avg,$root1], relTol=>.1)); |
|
|
| 81 | } |
|
|
| 82 | elsif ($left<$root2 and $root2<$right ) { #root 1 is in the interval |
|
|
| 83 | TEXT(EV2(<<EOT)); |
|
|
| 84 | By the Mean Value Theorem, we know there exists a \( c \) in the open interval |
|
|
| 85 | \( ( $left, $right ) \) such that \( f'(c) \) is equal to this mean slope. |
|
|
| 86 | Find the value of \( c \) in the interval which works |
|
|
| 87 | \{ ans_rule(10) \} |
|
|
| 88 | EOT |
|
|
| 89 | ANS(num_cmp([$avg,$root2], relTol=>.1)); |
|
|
| 90 | } |
|
|
| 91 | else { |
|
|
| 92 | TEXT("Error in formulating problem -- inform instructor please."); |
|
|
| 93 | } |
|
|
| 94 | |
|
|
| 95 | ENDDOCUMENT(); # This should be the last executable line in the problem. |
|
|