[npl] / trunk / NationalProblemLibrary / Rochester / setDerivatives4Trig / s2_4_27a.pg Repository:
ViewVC logotype

Annotation of /trunk/NationalProblemLibrary/Rochester/setDerivatives4Trig/s2_4_27a.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 556 - (view) (download)

1 : jj 145 ##DESCRIPTION
2 :     ##KEYWORDS('derivatives', 'trigonometry', 'product rule')
3 :     ## Find a derivative of a function involving trigonometric functions,
4 :     ## and evalute it at a given point; requires using product rule
5 :     ##ENDDESCRIPTION
6 :    
7 : jjholt 184 ## Tagged by sawblade
8 :    
9 :     ## DBsubject('Calculus')
10 :     ## DBchapter('Differentiation')
11 :     ## DBsection('Derivatives of Trigonometric Functions')
12 :     ## Date('')
13 :     ## Author('')
14 :     ## Institution('Rochester')
15 :     ## TitleText1('')
16 :     ## EditionText1('')
17 :     ## AuthorText1('')
18 :     ## Section1('')
19 :     ## Problem1('')
20 : sh002i 556 ## TitleText2('Calculus: Early Transcendentals')
21 :     ## EditionText2('1')
22 :     ## AuthorText2('Rogawski')
23 :     ## Section2('3.6')
24 :     ## Problem2('15')
25 : jjholt 184
26 : jj 145 DOCUMENT(); # This should be the first executable line in the problem.
27 :    
28 :     loadMacros(
29 :     "PG.pl",
30 :     "PGbasicmacros.pl",
31 :     "PGchoicemacros.pl",
32 :     "PGanswermacros.pl",
33 :     "PGauxiliaryFunctions.pl"
34 :     );
35 :    
36 :     TEXT(beginproblem());
37 :     $showPartialCorrectAnswers = 1;
38 :    
39 :     $pi = arccos(-1);
40 :    
41 :     $a_n = random(2,12,1);
42 :     $a_s = random(-1,1,2);
43 :     $a = $a_n * $a_s;
44 :    
45 :     $x_d = random(3,6,1);
46 :     while ($x_d == 5) {$x_d = random(3,6,1);};
47 :    
48 :     $q = random(0,1,1);
49 :     if ($q == 0) {
50 :     $x_n = 1;
51 :     $x_s = -1;
52 :     $x_sign = '-';
53 :     };
54 :     if ($q == 1) {
55 :     $x_n = 1;
56 :     $x_s = 1;
57 :     $x_sign = '';
58 :     };
59 :     if ($q == 2) {
60 :     $x_n = $x_d - 1;
61 :     $x_s = 1;
62 :     $x_sign = '';
63 :     };
64 :     if ($q == 3) {
65 :     $x_n = $x_d + 1;
66 :     $x_s = 1;
67 :     $x_sign = '';
68 :     };
69 :     if ($q == 4) {
70 :     $x_n = 2 * $x_d - 1;
71 :     $x_s = 1;
72 :     $x_sign = '';
73 :     };
74 :    
75 :     if ($x_n != 1) { $x_num = $x_n };
76 :     if ($x_n == 1) { $x_num = '' };
77 :    
78 :     $x = $x_s*$x_n*$pi/$x_d;
79 :    
80 :     $deriv1 =($a*(sin($x)+cos($x))+ $a*$x*(cos($x)-sin($x)));
81 :     $funct1 ="($a*(sin(x)+cos(x))+ $a*x*(cos(x)-sin(x)))";
82 :    
83 :     TEXT(EV2(<<EOT));
84 :     Let \[ f(x) = $a x( \sin x + \cos x) \]
85 :     $PAR
86 :     \( f'( x ) = \)
87 :     $PAR
88 :     \{ans_rule(45) \}
89 :     $PAR
90 :     \( f'( $x_sign \frac { $x_num \pi } {$x_d} ) = \)
91 :     $PAR
92 :     \{ans_rule(45) \}
93 :    
94 :     EOT
95 :    
96 :     $ans = $funct1;
97 :     ANS(fun_cmp($ans));
98 :    
99 :     $ans = $deriv1;
100 :     ANS(num_cmp($ans));
101 :    
102 :     ENDDOCUMENT(); # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9