## DESCRIPTION ## Imaginary Roots of Quadratics ## ENDDESCRIPTION ## KEYWORDS('complex', 'imaginary', 'quadratic', 'root') ## Tagged by YL ## DBsubject('Calculus') ## DBchapter('Appendixes') ## DBsection('Complex Numbers') ## Date('') ## Author('') ## Institution('ASU') ## TitleText1('Calculus') ## EditionText1('5e') ## AuthorText1('Stewart') ## Section1('G') ## Problem1('') DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGasu.pl", "extraAnswerEvaluators.pl", "PGcomplexmacros.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; $b = random(1,4,1); $c = random(5,8,1); TEXT(EV2(< 0\) here: $BR \{ans_rule(25) \} $BR EOT $nb=-$b; $delta=-$b**2+4*$c; $ans1 = $nb/2; $ans2 = ($delta)**0.5/2; $ans3 = $nb/2; $ans4 = ($delta)**0.5/2; ANS(number_list_cmp("$ans1-$ans2*i",complex=>'ok')); ANS(number_list_cmp("$ans3+$ans4*i",complex=>'ok')); ENDDOCUMENT(); # This should be the last executable line in the problem.