[npl] / trunk / NationalProblemLibrary / 270 / setDerivatives13Higher / c2s7p1.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/270/setDerivatives13Higher/c2s7p1.pg

Fri Jul 20 21:19:23 2007 UTC (5 years, 11 months ago) by jjholt
File size: 1381 byte(s)
```Updated tags.
```

```    1 ## DESCRIPTION
2 ## First, second and higher derivatives
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS ('derivatives','second derivative')
6 ## Tagged by cmd6a 3/8/06
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Differentiation')
10 ## DBsection('Derivatives of Polynomials and Exponential Functions')
11 ## Date('')
12 ## Author('')
13 ## Institution('ASU')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20
21 DOCUMENT();        # This should be the first executable line in the problem.
22
24            "PGbasicmacros.pl",
25            "PGchoicemacros.pl",
27 "PGauxiliaryFunctions.pl");
28
29 TEXT(beginproblem());
30 \$showPartialCorrectAnswers = 1;
31
32 \$a= random(1,10,1);
33 \$b= random(1,2,1);
34 \$c= random(2,5,1);
35
36 TEXT(EV2(<<EOT));
37 If \( g(t) = (\$a -t^{\$b})^{\$c} \) find
38 \$BR
39 \(g(0) =\)\{&ans_rule(20) \} \$BR
40 \(g'(0) =\)\{&ans_rule(20) \} \$BR
41 \(g''(0) =\)\{&ans_rule(20) \} \$BR
42
43 EOT
44
45 sub tat0 {
46   my (\$power) = @_;
47   my \$out = 0;
48   \$out = 0 if \$power > 0;
49   \$out = 1 if \$power == 0;
50   \$out = 0 if \$power < 0;
51   \$out;
52   }
53
54 \$g0 = ( \$a + &tat0(\$b) )** \$c;
55 \$gp0 = \$c*(\$a-&tat0(\$b) )**(\$c-1) *(-\$b*&tat0(\$b-1) );
56 \$gp00 = \$c*(\$c-1)*(\$a-&tat0(\$b))**(\$c-2)*(\$b*\$b*&tat0(2*\$b-2) )  - \$c*(\$a-&tat0(\$b))**(\$c-1)*(\$b*(\$b-1)*&tat0(\$b-2));
57
58 ANS(num_cmp([\$g0,\$gp0,\$gp00], relTol=>.1));
59
60 ENDDOCUMENT();        # This should be the last executable line in the problem.
```

 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9