##DESCRIPTION ## lh2-3_30a.pg. ##ENDDESCRIPTION ##KEYWORDS('algebra', 'increasing and decreasing functions') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGgraphmacros.pl", "extraAnswerEvaluators.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; $h = non_zero_random(-5,5,1); $k = random(-6,1,1); # f(x)=(x+h)^2+k $b = $h*2; $c = ($h)**2+$k; $graph = init_graph(-10,-10,10,10,'axes'=>[0,0],'grid'=>[20,20],'size'=>[200,200]); $f = FEQ("x**2 + $b x +$c for x in <-10,10> using color:green and weight:2"); plot_functions($graph,$f); BEGIN_TEXT $BR Consider the function whose graph is sketched: $BR \{ image(insertGraph($graph), width=>200, height=>200) \} $BR Find the intervals over which the function is increasing or decreasing. If the answer includes more than one interval write the intervals separated by the "union" symbol, U. You may use "infinity" for \(\infty\) and "-infinity" for \(-\infty\). For example, you may write (-infinity, 5] for the interval \((-\infty,5]\) and (-infinity, 5]U(7,9) for \((-\infty,5]\cup (7,9)\). $BR $BR The interval over which the function is increasing: \{ans_rule(35) \} $BR The interval over which the function is decreasing: \{ans_rule(35) \} $PAR END_TEXT $h1=-$h; ANS(interval_cmp("($h1,infty)")); ANS(interval_cmp("(-infty,$h1)")); ENDDOCUMENT(); # This should be the last executable line in the problem.