[npl] / branches / UGA / 3.4.3.pg Repository:
ViewVC logotype

View of /branches/UGA/3.4.3.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1457 - (download) (annotate)
Sat Jul 24 17:09:50 2010 UTC (2 years, 9 months ago) by ted shifrin
File size: 3026 byte(s)
Log message

    1 ## DESCRIPTION
    2 ##  Calculus: Functions
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('gradient')
    6 
    7 ## DBsubject('Calculus')
    8 ## DBchapter('Differentiation')
    9 ## DBsection('Differentiation Rules')
   10 ## Date('9/23/2009')
   11 ## Author('Ted Shifrin')
   12 ## Institution('UGA')
   13 
   14 
   15 DOCUMENT();        # This should be the first executable line in the problem.
   16 
   17 loadMacros("PG.pl",
   18            "PGbasicmacros.pl",
   19            "PGchoicemacros.pl",
   20            "PGanswermacros.pl",
   21            "PGauxiliaryFunctions.pl",
   22  #         "extraAnswerEvaluators.pl",
   23  #         "compoundProblem.pl",
   24            "Parser.pl",
   25            "PGmatrixmacros.pl"
   26 );
   27 
   28 $a = non_zero_random(-5,5,1);
   29 do{$b = non_zero_random(-5,5,1)} until $b!=$a;
   30 
   31 $P = '\left[\begin{array}{c}\mathbf{a}\\c\end{array}\right]';
   32 
   33 $i = random(0,3,1);
   34 $j = random(0,3,1);
   35 
   36 @direction1 = ("west","north","east","south");
   37 @direction2 = ("northwest","northeast","southeast","southwest");
   38 
   39 $ans1=-$a/$b;
   40 $ans2=0;
   41 $ans3=$a/($a**2+$b**2);
   42 $ans4=$b/($a**2+$b**2);
   43 
   44 
   45 if($i==0){$c=-$a;} elsif($i==2){$c=$a;} elsif($i==1){$c=$b;} else {$c=-$b;}
   46 
   47 $ans5=arctan($c);
   48 
   49 if($j==0){$d=($b-$a)/sqrt(2);} elsif($j==2){$d=($a-$b)/sqrt(2);}
   50 elsif($j==1){$d=($a+$b)/sqrt(2);} else {$d=-($a+$b)/sqrt(2);}
   51 
   52 $ans6=arctan($d);
   53 
   54 
   55 TEXT(beginproblem());
   56 # BEGIN_PROBLEM();
   57 $showPartialCorrectAnswers=1;
   58 Context()->texStrings;
   59 
   60 BEGIN_TEXT
   61 
   62 Suppose the terrain of a hillside is represented as the graph \(z=f(\mathbf{x})\). Suppose \(f(\mathbf{a})=c\) and
   63 \{ mbox( '\(\nabla f(\mathbf{a}) = \)', display_matrix([['\($a\)'],['\($b\)']]), '.') \}
   64 
   65 $PAR
   66 Give the vector in \(\mathbb{R}^3\) with first coordinate \(1\) tangent to the curve through \($P\) along which the elevation stays constant. (Be prepared to explain your answer to the class.)
   67 $BR
   68 \{ mbox(display_matrix([['\(1\)'],[ans_rule(10)],[ans_rule(10)]]))\}
   69 
   70 $PAR
   71 Give the vector in \(\mathbb{R}^3\) with third coordinate \(1\) tangent to the curve through \($P\) that goes uphill as steeply as possible. (Be prepared to explain your answer to the class.)
   72 $BR
   73 \{ mbox(display_matrix([[ans_rule(10)],[ans_rule(10)],['\(1\)']])) \}
   74 
   75 $PAR
   76 Consider a typical map, in which east is depicted in the \(\mathbf{e}_1\) direction and north is depicted in the \(\mathbf{e}_2\) direction. $BR
   77 If you walk along a path at \($P\) heading due @direction1[$i], at what angle (in radians) are you walking uphill at that instant? (Be prepared to explain your answer to the class.) You may give your answer in terms of an inverse trigonometric function.
   78 $BR
   79 \{ ans_rule(20) \}
   80 
   81 $PAR
   82 If you now walk along a path at \($P\) heading @direction2[$j], at what angle (in radians) are you walking uphill at that instant? (Be prepared to explain your answer to the class.) You may give your answer in terms of an inverse trigonometric function.
   83 $BR
   84 \{ ans_rule(20) \}
   85 
   86 END_TEXT
   87 
   88 ANS(num_cmp($ans1));
   89 ANS(num_cmp($ans2));
   90 ANS(num_cmp($ans3));
   91 ANS(num_cmp($ans4));
   92 ANS(num_cmp($ans5));
   93 ANS(num_cmp($ans6));
   94 
   95 #END_PROBLEM();
   96 ENDDOCUMENT();        # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9