| … | |
… | |
| 6 | ## Tagged by tda2d |
6 | ## Tagged by tda2d |
| 7 | |
7 | |
| 8 | ## DBsubject('Calculus') |
8 | ## DBsubject('Calculus') |
| 9 | ## DBchapter('Limits and Derivatives') |
9 | ## DBchapter('Limits and Derivatives') |
| 10 | ## DBsection('Definition of the Derivative') |
10 | ## DBsection('Definition of the Derivative') |
| 11 | ## Date('') |
11 | ## Date('8/23/07') |
| 12 | ## Author('') |
12 | ## Author('') |
| 13 | ## Institution('Union College') |
13 | ## Institution('Union College') |
| 14 | ## TitleText1('') |
14 | ## TitleText1('') |
| 15 | ## EditionText1('') |
15 | ## EditionText1('') |
| 16 | ## AuthorText1('') |
16 | ## AuthorText1('') |
| 17 | ## Section1('') |
17 | ## Section1('') |
| 18 | ## Problem1('') |
18 | ## Problem1('') |
| 19 | |
19 | |
| 20 | DOCUMENT(); |
20 | DOCUMENT(); # This should be the first executable line in the problem. |
| 21 | |
21 | |
| 22 | loadMacros( |
22 | loadMacros( |
| 23 | "PG.pl", |
23 | "PGstandard.pl", |
| 24 | "PGbasicmacros.pl", |
|
|
| 25 | "PGchoicemacros.pl", |
|
|
| 26 | "PGanswermacros.pl", |
|
|
| 27 | "PGauxiliaryFunctions.pl", |
|
|
| 28 | "PGunion.pl", # Union College utilities |
24 | "PGunion.pl", # Union College utilities |
|
|
25 | "MathObjects.pl", |
| 29 | "PGcourse.pl", # Customization file for the course |
26 | "PGcourse.pl", # Customization file for the course |
| 30 | ); |
27 | ); |
| 31 | |
28 | |
| 32 | TEXT(beginproblem()); |
29 | TEXT(beginproblem); |
| 33 | BEGIN_PROBLEM(); |
30 | |
|
|
31 | ################################### |
|
|
32 | # Setup |
| 34 | |
33 | |
| 35 | $a = random(2, 3, 1); |
34 | $a = random(2, 3, 1); |
| 36 | $b = random(-7,-2,1); |
35 | $b = random(-7,-2,1); |
| 37 | |
36 | |
|
|
37 | $f=Formula("$b x^{$a}"); |
|
|
38 | ################################### |
|
|
39 | # Main text |
|
|
40 | |
|
|
41 | Context()->texStrings; |
| 38 | BEGIN_TEXT |
42 | BEGIN_TEXT |
| 39 | Use the definition of derivative to find \( f'(x) \) for \( f(x) = $b x^{$a}\). |
43 | Let \( f(x) = $f\). Use the definition of derivative to find \( f'(x) \). |
| 40 | $PAR |
44 | $PAR |
| 41 | \( f'(x) \) = \{ans_rule(20) \} |
45 | \( f'(x) \) = \{ans_rule(20) \} |
| 42 | END_TEXT |
46 | END_TEXT |
|
|
47 | Context()->normalStrings; |
| 43 | |
48 | |
| 44 | $exp=$a-1; |
49 | ################################### |
| 45 | $coeff=$a*$b; |
50 | # Answers |
| 46 | $ans = "$coeff(x^$exp)"; |
|
|
| 47 | ANS(fun_cmp($ans)); |
|
|
| 48 | |
51 | |
| 49 | END_PROBLEM(); |
52 | |
|
|
53 | $ans=$f->D('x'); |
|
|
54 | ANS(Formula($ans)->cmp); |
|
|
55 | |
|
|
56 | #$exp=$a-1; |
|
|
57 | #$coeff=$a*$b; |
|
|
58 | #$ans = "$coeff(x^$exp)"; |
|
|
59 | #ANS(Formula($ans)->cmp); |
|
|
60 | |
|
|
61 | # Could also code as ANS(Formula("$coeff(x^$exp)")->cmp); |
|
|
62 | ################################### |
|
|
63 | |
| 50 | ENDDOCUMENT(); |
64 | ENDDOCUMENT(); |
| 51 | |
|
|