[npl] / trunk / NationalProblemLibrary / Dartmouth / setMTWCh2S6 / problem_2.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Dartmouth/setMTWCh2S6/problem_2.pg

Fri Jul 20 21:19:23 2007 UTC (5 years, 10 months ago) by jjholt
File size: 1552 byte(s)
Updated tags.


    1 ## DESCRIPTION
2 ## Calculus
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('tangent' 'slope')
6 ## Tagged by tda2d
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Partial Derivatives')
10 ## DBsection('Directional Derivatives and the Gradient Vector')
11 ## Date('')
12 ## Author('')
13 ## Institution('Dartmouth')
14 ## TitleText1('Basic Multivariable Calculus')
15 ## EditionText1('3')
16 ## AuthorText1('Marsden, Tromba, Weinstein')
17 ## Section1('2.6')
18 ## Problem1('')
19
20 DOCUMENT();
22            "PGbasicmacros.pl",
23            "PGchoicemacros.pl",
25            "PGauxiliaryFunctions.pl",
26            "PGgraphmacros.pl",
27            "Dartmouthmacros.pl");
28
29
30 ## Do NOT show partial correct answers
31 $showPartialCorrectAnswers = 1; 32 33 ## Lots of set up goes here 34$x1 = random(1,8,1);
35 $y1 = random(1,8,1); 36 37$a = random(1,4,1);
38 $a_x = clean_scalar_string($a, "x");
39
40 $b = random(1,4,1); 41$b_y = clean_scalar_string($b, "y"); 42 43$c = random(1,4,1);
44 $c_xy = clean_scalar_string($c, "xy");
45
46 #$d = sqrt($a*$x1+$b*$y1) + sqrt($c*$x1*$y1);
47
48 $num =$a/(2*sqrt($a*$x1 + $b*$y1) ) + $c*$y1/(2*sqrt($c*$x1*$y1) ); 49$denom = $b/(2*sqrt($a*$x1+$b*$y1) ) +$c*$x1/(2*sqrt($c*$x1*$y1) );
50
51 $yp = -$num/$denom; 52 53 # 54 ## Ok, we are ready to begin the problem... 55 ## 56 TEXT(beginproblem()); 57 58 59 BEGIN_TEXT 60$BR
61 Find the slope of the tangent line to the curve
62 $BR 63 $$\displaystyle \sqrt{a_x +b_y} + \sqrt{c_xy} = 64 \sqrt{\{a*x1+b*y1\}} + \sqrt{\{c*x1*y1\}}$$ 65 at the point $$( x1,y1 )$$.$BR
66
67 The slope is \{ ans_rule(70) \}.
68
69 END_TEXT
70
71 ANS(num_cmp(\$yp));
72 ENDDOCUMENT();
73
74
75
76