[npl] / trunk / NationalProblemLibrary / Union / setMVderivatives / an14_3_34.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Union/setMVderivatives/an14_3_34.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 882 - (download) (annotate)
Thu Jan 1 00:02:58 2009 UTC (4 years, 4 months ago) by dpvc
File size: 1802 byte(s)
Update to current Union versions (using MathObjects)

    1 ## DESCRIPTION
    2 ##   Calculate Partial Derivatives
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('Derivative', 'Partial')
    6 ## Tagged by nhamblet
    7 
    8 ## DBsubject('Calculus')
    9 ## DBchapter('Partial Derivatives')
   10 ## DBsection('Partial Derivatives')
   11 ## Date('8/23/07')
   12 ## Author('')
   13 ## Institution('Union College')
   14 ## TitleText1('Calculus')
   15 ## EditionText1('7')
   16 ## AuthorText1('Anton')
   17 ## Section1('14.3')
   18 ## Problem1('34')
   19 ## TitleText2('Calculus: Early Transcendentals')
   20 ## EditionText2('1')
   21 ## AuthorText2('Rogawski')
   22 ## Section2('14.3')
   23 ## Problem2('12 66')
   24 
   25 DOCUMENT();        # This should be the first executable line in the problem.
   26 
   27 loadMacros(
   28   "PGstandard.pl",
   29   "PGunion.pl",
   30   "MathObjects.pl",
   31   "alignedChoice.pl",
   32   "PGcourse.pl",
   33 );
   34 
   35 
   36 TEXT(beginproblem);
   37 
   38 ##############################################
   39 #  Setup
   40 
   41 Context("Vector");
   42 
   43 #
   44 #  The function
   45 #
   46 $a = random(2,6,1);
   47 $b = random(2,6,1);
   48 
   49 $f = Formula("(x^2 - $a y^2)/(y^2 + $b z^2)");
   50 
   51 #
   52 #  The derivatives
   53 #
   54 $fx = Formula("2x/(y^2 + $b z^2)");
   55 $fy = Formula("-2y(x^2 + $a*$b z^2)/(y^2 + $b z^2)^2");
   56 $fz = Formula("-2*$b z(x^2 - $a y^2)/(y^2 + $b z^2)^2");
   57 
   58 ##############################################
   59 
   60 $al = new_aligned_list(
   61   ans_rule_len => 40,
   62   tex_spacing => "3pt",
   63   row_spacing => 5,
   64 );
   65 
   66 $al->qa(
   67   "\(f_x(x,y,z)\)",  $fx->cmp,
   68   "\(f_y(x,y,z)\)",  $fy->cmp,
   69   "\(f_z(x,y,z)\)",  $fz->cmp,
   70 );
   71 
   72 ##############################################
   73 #  Main text
   74 
   75 Context()->texStrings;
   76 BEGIN_TEXT
   77 
   78 Let \(f(x,y,z) = $DISPLAY $f\).  Then
   79 $PAR
   80 
   81 \{$al->print_q\}
   82 
   83 END_TEXT
   84 Context()->normalStrings;
   85 
   86 ##################################################
   87 #  Answers
   88 
   89 ANS($al->correct_ans);
   90 $showPartialCorrectAnswers = 1;
   91 
   92 ##################################################
   93 
   94 ENDDOCUMENT();        # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9