Parent Directory
|
Revision Log
Log message
1 ##DESCRIPTION 2 # 3 4 # 5 # Asks for the tangent plane to a surface. 6 # 7 ##ENDDESCRIPTION 8 9 ##KEYWORDS('Multivariable','Tangent Plane') 10 11 ## DBsubject('Calculus') 12 ## DBchapter('Partial Derivatives') 13 ## DBsection('Tangent Planes') 14 ## Date('9/7/2009') 15 ## Author('Shifrin') 16 ## Institution('UGA') 17 18 19 DOCUMENT(); # This should be the first executable line in the problem. 20 21 loadMacros( 22 "PGstandard.pl", 23 "PGunion.pl", 24 "Parser.pl", 25 "alignedChoice.pl", 26 "PGcourse.pl", 27 "PGanswermacros.pl", 28 "PGbasicmacros.pl", 29 ); 30 31 32 33 # loadMacros("PGstandard.pl", 34 # "PGbasicmacros.pl", 35 # "PGchoicemacros.pl", 36 # "PGanswermacros.pl", 37 # "PGauxiliaryFunctions.pl"); 38 39 40 TEXT(beginproblem()); 41 BEGIN_PROBLEM(); 42 43 44 Context("Numeric")->variables->are(x=>'Real',y=>'Real'); 45 $showPartialCorrectAnswers = 1; 46 47 $a = non_zero_random( -4, 4, 1 ); 48 $aa = random(1,5,1); 49 do{$b = non_zero_random( -4, 4, 1 )} until ($b!=$a); 50 do{$bb = random(1,5,1)} until ($bb!=$aa); 51 do{$c = random( 1, 10, 1 )} until ($c**2 > $a**2+$b**2); 52 $d = non_zero_random( -4, 4, 1 ); 53 54 @func = ("e^($d x y)", "sqrt($c^2 - x^2 - y^2)", "sqrt($aa x^2+$bb y^2)", 55 "$a x^2+$b y^2"); 56 57 @choice=NchooseK($#func,2); 58 @sub_func=@func[@choice]; 59 60 for ($k=0; $k<2; $k++){ 61 $f[$k] = Formula("$sub_func[$k]")->reduce; 62 $fx[$k] = $f[$k]->D('x'); 63 $fy[$k] = $f[$k]->D('y'); 64 $evalf[$k] = $f[$k]->eval(x=>$a,y=>$b); 65 $evalfx[$k] = $fx[$k]->eval(x=>$a,y=>$b); 66 $evalfy[$k] = $fy[$k]->eval(x=>$a,y=>$b);} 67 68 69 $ans1x = $evalfx[0]->cmp; $ans1y = $evalfy[0]->cmp; $ans1z=$evalf[0]->cmp; 70 $ans2x = $evalfx[1]->cmp; $ans2y = $evalfy[1]->cmp; $ans2z=$evalf[1]->cmp; 71 72 73 Context()->texStrings; 74 BEGIN_TEXT 75 76 Let \( f(x,y) = $f[0] \). 77 Find the equation of the tangent plane of the graph \( z = f(x,y) \) at the point \( \left( $a, $b, f($a,$b) \right) \). 78 $PAR 79 \( z = \)\{ans_rule(10)\}\(x + \) \{ans_rule(10)\} \( y + \) \{ans_rule(15)\}. 80 $PAR 81 $PAR 82 Now let \( f(x,y) = $f[1] \). 83 Find the equation of the tangent plane of the graph \( z = f(x,y) \) at the point \( \left( $a, $b, f($a,$b) \right) \). 84 $PAR 85 \( z = \)\{ans_rule(10)\}\(x + \) \{ans_rule(10)\} \( y + \) \{ans_rule(15)\}. 86 $PAR 87 $PAR 88 89 END_TEXT 90 91 ANS($ans1x); ANS($ans1y); ANS($ans1z); 92 ANS($ans2x); ANS($ans2y); ANS($ans2z); 93 94 END_PROBLEM(); 95 ENDDOCUMENT(); # This should be the last executable line in the problem.
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |