## DESCRIPTION ## Precalculus: Trigonometry ## ENDDESCRIPTION ## KEYWORDS('precalculus','trigonometric graphs') ## Tagged by cmd6a 6/21/06 ## DBsubject('Trigonometry') ## DBchapter('Trigonometry Functions of Real Numbers') ## DBsection('Trigonometric Graphs') ## Date('') ## Author('') ## Institution('ASU') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGgraphmacros.pl", "PGasu.pl" ); TEXT(beginproblem()); $a=random(-4, -1);$c=random(1, 8); $b=1/$c; $pi=4*arctan(1);$xdom=3*$c;$ydom=abs($a)+1;$xgrid=2*$xdom;$ygrid=2*$ydom;$graph = init_graph(-$xdom,-$ydom,$xdom,$ydom,'axes'=>[0,0],'grid'=>[$xgrid,$ygrid]); $f = FEQ("$a*cos($pi*$b*x) for x in <-$xdom,$xdom> using color:blue and weight:2"); ($fref) = plot_functions($graph, $f);$period = 2*$c; # Label some points$label1 = new Label(0,$a, "$a",'black','right'); $d = -$a; $label2 = new Label($c, $d, "($c,$d)",'black','bottom','center');$label3 = new Label(0,$d,"$d",'black','top'); $graph->lb($label1, $label2,$label3); BEGIN_TEXT \{ image(insertGraph($graph)) \}$BR$BR To get a better look at the graph, you can click on it.$BR$BR The curve above is the graph of a sinusoidal function. It goes through the point $$(c,d)$$. Find a sinusoidal function that matches the given graph. If needed, you can enter $$\pi$$ as$BITALIC pi$EITALIC in your answer.$BR$BR $$f(x) =$$ \{ans_rule(60)\} END_TEXT # # Tell WeBWork how to test if answers are right. These should come in the # same order as the answer blanks above. You tell WeBWork both the type of # "answer evaluator" to use, and the correct answer. #$ans = "$a*cos(pi*x/$c)"; ANS(fun_cmp($ans,limits=>[[-$xdom,\$xdom]])); ENDDOCUMENT(); # This should be the last executable line in the problem.