## DESCRIPTION ## Algebra ## ENDDESCRIPTION ## KEYWORDS('algebra','function') ## Tagged by cmd6a 8/6/06 ## DBsubject('Algebra') ## DBchapter('Functions') ## DBsection('Evaluation and Solving') ## Date('7/21/03') ## Author('K. Lesh') ## Institution('Union College') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGunion.pl", # Union College utilities "alignedChoice.pl", # for aligned answer blanks "PGcourse.pl", # Customization file for the course ); TEXT(beginproblem()); BEGIN_PROBLEM(); $a = random(2,8,1); $b = random(1,8,1); $c = random(1,8,1); $f = FPOLY("$a x^2 + $b x - $c"); $ans1 = -$c; $ans2 = $a*4+$b*2-$c; $ans3 = $a*4-$b*2-$c; $ans4 = "$a (x+1)^2+$b(x+1)-$c"; $ans5 = "$a x^2-$b x-$c"; $al = new_aligned_list(ans_rule_len=>15, tex_spacing=>"3pt"); $al->qa( "\(f(0)\)", num_cmp($ans1), "\(f(2)\)", num_cmp($ans2), "\(f(-2)\)", num_cmp($ans3), "\(f(x+1)\)", fun_cmp($ans4), "\(f(-x)\)", fun_cmp($ans5), ); BEGIN_TEXT Given the function \( f(x)= $f\), calculate the following. $PAR \{$al->print_q\} END_TEXT $showPartialCorrectAnswers = 1; ANS($al->correct_ans); END_PROBLEM(); ENDDOCUMENT(); # This should be the last executable line in the problem.