[npl] / trunk / NationalProblemLibrary / Union / setMVderivatives / velocity-1.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Union/setMVderivatives/velocity-1.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 314 - (download) (annotate)
Sun Aug 6 16:12:44 2006 UTC (6 years, 9 months ago) by jjholt
File size: 1750 byte(s)
Added tags.  --JH

    1 ## DESCRIPTION
    2 ##   Velocity and Acceleration of a Parametric Curve
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('Derivative', 'Parametric', 'Path', 'Velocity', 'Acceleration')
    6 ## Tagged by nhamblet
    7 
    8 ## DBsubject('Calculus')
    9 ## DBchapter('Parametric Equations and Polar Coordinates')
   10 ## DBsection('Curves Defined by Parametric Equations')
   11 ## Date('')
   12 ## Author('')
   13 ## Institution('Union College')
   14 ## TitleText1('')
   15 ## EditionText1('')
   16 ## AuthorText1('')
   17 ## Section1('')
   18 ## Problem1('')
   19 
   20 DOCUMENT();        # This should be the first executable line in the problem.
   21 
   22 loadMacros(
   23   "PGstandard.pl",
   24   "PGunion.pl",
   25   "Parser.pl",
   26   "parserVectorUtils.pl",
   27   "PGcourse.pl"
   28 );
   29 
   30 
   31 TEXT(beginproblem());
   32 BEGIN_PROBLEM();
   33 
   34 ##############################################
   35 #  Setup
   36 
   37 Context("Vector")->variables->are(t=>'Real');
   38 
   39 #
   40 #  The function and derivative
   41 #
   42 $a = non_zero_random(-5,5,1);
   43 $b = non_zero_random(-5,5,1);
   44 $n = random(4,7,1);
   45 
   46 $f = Formula("<(t + $a)^$n, t(1 - $b t)>")->reduce;
   47 #$veloc = Vector("$n(t + $a)^".($n-1),"1 - ".(2*$b)." t");
   48 #$accel = Vector(($n*($n-1))."(t + $a)^".($n-2),-2*$b);
   49 
   50 $veloc = $f->D('t');
   51 $accel = $veloc->D('t');
   52 
   53 ##############################################
   54 #  Main text
   55 
   56 $V = Overline('v');
   57 $A = Overline('a');
   58 
   59 Context()->texStrings;
   60 BEGIN_TEXT
   61 
   62 Consider the parametric curve \(f(t) = $f\).
   63 $PAR
   64 The velocity vector is \($V(t)\) = \{ans_rule(40)\}$BR
   65 and the acceleration vector is \($A(t)\) = \{ans_rule(40)\}.
   66 
   67 END_TEXT
   68 Context()->normalStrings;
   69 
   70 ##################################################
   71 #  Answers
   72 
   73 ANS($veloc->cmp,$accel->cmp);
   74 
   75 $showPartialCorrectAnswers = 1;
   76 
   77 ##################################################
   78 
   79 END_PROBLEM();
   80 ENDDOCUMENT();        # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9