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

View of /trunk/NationalProblemLibrary/Union/setMVderivatives/an14_7_15.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: 2011 byte(s)
Update to current Union versions (using MathObjects)

    1 ## DESCRIPTION
    2 ##   Tangent Plane to a Multivariate Function
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('Tangent', 'Plane', 'Multivariable', 'Implicit', 'Parametric')
    6 ## Tagged by nhamblet
    7 
    8 ## DBsubject('Calculus')
    9 ## DBchapter('Partial Derivatives')
   10 ## DBsection('Tangent Planes')
   11 ## Date('8/23/07')
   12 ## Author('')
   13 ## Institution('Union College')
   14 ## TitleText1('Calculus')
   15 ## EditionText1('7')
   16 ## AuthorText1('Anton')
   17 ## Section1('14.7')
   18 ## Problem1('15')
   19 
   20 DOCUMENT();        # This should be the first executable line in the problem.
   21 
   22 loadMacros(
   23   "PGstandard.pl",
   24   "PGunion.pl",
   25   "parserParametricLine.pl",
   26   "parserImplicitPlane.pl",
   27   "parserVectorUtils.pl",
   28   "PGchoicemacros.pl",
   29   "PGcourse.pl",
   30 );
   31 
   32 
   33 TEXT(beginproblem);
   34 
   35 ##############################################
   36 #  Setup
   37 
   38 Context("Vector");
   39 
   40 #
   41 #  Ceofficients for function
   42 #
   43 ($a,$b,$c) = (random(3,5,1),random(1,2,1),1)[shuffle(3)];
   44 
   45 #
   46 #  The point
   47 #
   48 ($x,$y,$z) = (non_zero_random(-1,1,1),
   49         2*non_zero_random(-1,1,1),
   50               non_zero_random(-3,3,1));
   51 
   52 $P = Point($x,$y,$z);
   53 
   54 $d = $a + 4*$b + $c*$z**2;
   55 
   56 #
   57 #  The function
   58 #
   59 $f = Formula("$a x^2 + $b y^2 + $c z^2")->reduce;
   60 
   61 #
   62 #  The Normal Vector
   63 #
   64 $N = Vector($a*$x,$b*$y,$c*$z);
   65 
   66 #
   67 #  The tangent plane
   68 #
   69 Context("ImplicitPlane");
   70 $T = ImplicitPlane($P,$N);
   71 
   72 #
   73 #  The Normal Line
   74 #
   75 Context("ParametricLine");
   76 $L = ParametricLine($P,$N);
   77 
   78 ##############################################
   79 #  Main text
   80 
   81 Context()->texStrings;
   82 BEGIN_TEXT
   83 
   84 Consider the ellipsoid \($f = $d\).
   85 $PAR
   86 
   87 The implicit form of the tangent plane to this ellipsoid at
   88 \($P\) is \{ans_rule(40)\}.
   89 $PAR
   90 
   91 The parametric form of the line through this point that is
   92 perpendicular to that tangent plane is \(L(t)\) = \{ans_rule(30)\}.
   93 
   94 END_TEXT
   95 Context()->normalStrings;
   96 
   97 ##################################################
   98 #  Answers
   99 
  100 ANS($T->cmp);
  101 ANS($L->cmp);
  102 
  103 $showPartialCorrectAnswers = 1;
  104 
  105 ##################################################
  106 
  107 ENDDOCUMENT();        # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9