[npl] / trunk / NationalProblemLibrary / ASU-topics / setTrigGraphs / p2.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# Annotation of /trunk/NationalProblemLibrary/ASU-topics/setTrigGraphs/p2.pg

 1 : jj 61 ## DESCRIPTION 2 : jjholt 317 ## Precalculus: Trigonometry 3 : jj 61 ## ENDDESCRIPTION 4 : 5 : jjholt 317 ## KEYWORDS('precalculus','trigonometric graphs') 6 : ## Tagged by cmd6a 6/21/06 7 : jj 61 8 : jj 318 ## DBsubject('Trigonometry') 9 : jjholt 483 ## DBchapter('Trigonometric Functions of Real Numbers') 10 : jjholt 317 ## DBsection('Trigonometric Graphs') 11 : ## Date('') 12 : ## Author('') 13 : ## Institution('ASU') 14 : ## TitleText1('') 15 : ## EditionText1('') 16 : ## AuthorText1('') 17 : ## Section1('') 18 : ## Problem1('') 19 : jj 61 20 : DOCUMENT(); # This should be the first executable line in the problem. 21 : 22 : loadMacros( 23 : "PG.pl", 24 : "PGbasicmacros.pl", 25 : "PGchoicemacros.pl", 26 : "PGanswermacros.pl", 27 : "PGauxiliaryFunctions.pl", 28 : "PGasu.pl" 29 : ); 30 : 31 : gage 268 TEXT(beginproblem()); 32 : jj 61 $showPartialCorrectAnswers = 1; 33 : 34 :$a_n = random(2,15,1); 35 : $a_s = random(-1,1,2); 36 :$a = $a_n *$a_s; 37 : 38 : $b = random(2,6,1); 39 : 40 :$c_d = random(2,6,1); 41 : $c_s = random(-1,1,2); 42 : if ($c_s == -1) {$c_sign = '-'}; 43 : if ($c_s == 1) {$c_sign = '+'}; 44 : 45 : BEGIN_TEXT 46 : Let $$y = a \cos\left(b (x c_sign \frac { \pi } { c_d } )\right)$$. 47 :$BR$BR 48 : What is the amplitude? \{ ans_rule(15) \} 49 :$BR$BR 50 : What is the period? \{ ans_rule(15) \} 51 :$BR$BR 52 : END_TEXT 53 : 54 : # For the phase shift, is the graph shifted$BITALIC left $EITALIC 55 : # or$BITALIC right $EITALIC? \{ ans_rule(15) \} 56 : BEGIN_TEXT 57 : For the phase shift, which way is the graph shifted? 58 : \{ pop_up_list('?' => ' ? ', 'Left' => 'Left', 'Right' => 'Right') \} 59 :$BR$BR 60 : How far is it shifted? \{ ans_rule(15) \} 61 :$BR$BR 62 : [NOTE: If needed, you can enter $$\pi$$ as 'pi' in your answers.] 63 : 64 : END_TEXT 65 : 66 :$dir = "left"; 67 : $dir = "right" if($c_s < 0); 68 : # record the answers 69 : ANS(num_cmp($a_n)); 70 : ANS(num_cmp("2 * pi /$b")); 71 : ANS(str_cmp($dir)); 72 : ANS(num_cmp("pi/$c_d")); 73 : 74 : ENDDOCUMENT(); # This should be the last executable line in the problem.