# WeBWorK problem written by Chris Hughes # Portland Community College # ENDDESCRIPTION ## Author('Chris Hughes') ## Institution('PCC') ############################################## DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", ); ############################################## HEADER_TEXT(< EOF Context("Numeric"); Context()->variables->add(y=>'Real'); $a=non_zero_random(1,10,1); $b=non_zero_random(1,10,1); $f = Formula("$a sin($b x^2)/x"); $v = Formula("sin($a x) cos($b y)"); ############################################## Context()->texStrings; BEGIN_TEXT These are some graphs. $PAR \begin{graph} width=300; height=200; xmin=-10; xmax=10; xscl=1; plot(\{$f->string\}); plot(x-2); \end{graph} $PAR \begin{graph} width=400; height=300; xmin=-8.3; xmax=8.3; xscl=1; slopefield("\{$v->string\}",1,1); \end{graph} $PAR \begin{graph} width=300; height=200; xmin=-4; xmax=4; xscl=1; ellipse([1,1],0.5,1); path([[0,0],[1,1],[-2,1],[-2,-2],[3,-2],[0,0]]) \end{graph} END_TEXT Context()->normalStrings; ############################################## ENDDOCUMENT();