[npl] / trunk / NationalProblemLibrary / ma122DB / set5 / s3_5_38a.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/ma122DB/set5/s3_5_38a.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 612 - (download) (annotate)
Tue Nov 27 20:10:07 2007 UTC (5 years, 5 months ago) by jj
File size: 1515 byte(s)
Fixed bug 1394, typo in the answer in one case.

    1 ##KEYWORDS('derivatives', 'chain rule')
    2 ##DESCRIPTION
    3 ##  Find a derivative of an expression
    4 ##  involving trig functions; requires use of chain rule
    5 ##ENDDESCRIPTION
    6 
    7 ## Shotwell cleaned
    8 ## tcao , PAID on 11-24-2003
    9 
   10 ## DBsubject('Calculus')
   11 ## DBchapter('Differentiation')
   12 ## DBsection('The Chain Rule')
   13 ## Date('6/3/2002')
   14 ## Author('')
   15 ## Institution('')
   16 ## TitleText1('Calculus: Early Transcendentals')
   17 ## EditionText1('6')
   18 ## AuthorText1('Stewart')
   19 ## Section1('3.4')
   20 ## Problem1('38')
   21 
   22 
   23 DOCUMENT();        # This should be the first executable line in the problem.
   24 
   25 loadMacros(
   26 "PGbasicmacros.pl",
   27 "PGanswermacros.pl",
   28 "PGauxiliaryFunctions.pl"
   29 );
   30 
   31 TEXT(beginproblem());
   32 $showPartialCorrectAnswers = 1;
   33 
   34 $a_gen  = random(2,9,1);
   35 $a_sign = random(-1,1,2);
   36 $a      = $a_gen * $a_sign;
   37 
   38 $n = random(2,8,1);
   39 
   40 $gen = random(0,3,1);
   41 
   42 if ($gen == 0) {
   43   $trig1 = "\sin";
   44   $trig2 = "\sin";
   45   $ans  = "$a*$n*x^($n-1)*cos(sin(x^($n)))*cos(x^($n))";
   46   }
   47 if ($gen == 1) {
   48   $trig1 = "\sin";
   49   $trig2 = "\cos";
   50   $ans  = "-$a*$n*x^($n-1)*cos(cos(x^($n)))*sin(x^($n))";
   51   }
   52 if ($gen == 2) {
   53   $trig1 = "\cos";
   54   $trig2 = "\sin";
   55   $ans  = "-$a*$n*x^($n-1)*sin(sin(x^($n)))*cos(x^($n))";
   56   }
   57 if ($gen == 3) {
   58   $trig1 = "\cos";
   59   $trig2 = "\cos";
   60   $ans  = "$a*$n*x^($n-1)*sin(cos(x^($n)))*sin(x^($n))";
   61   }
   62 
   63 BEGIN_TEXT
   64 Let \( f(x) = $a $trig1 ( $trig2 ( x ^{$n} )) \). $BR$BR
   65 
   66 \( f'( x ) = \) \{ans_rule(50) \}
   67 END_TEXT
   68 ANS(fun_cmp($ans));
   69 
   70 ENDDOCUMENT();        # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9