[npl] / trunk / NationalProblemLibrary / Rochester / setAlgebra11ComplexNumbers / srw3_4_61.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# Annotation of /trunk/NationalProblemLibrary/Rochester/setAlgebra11ComplexNumbers/srw3_4_61.pg

 1 : jj 517 ##DESCRIPTION 2 : ## Algebra problem: complex numbers 3 : ##ENDDESCRIPTION 4 : 5 : ##KEYWORDS('algebra', 'quadratic equation') 6 : 7 : ## tcao , PAID on 11-24-2003 8 : 9 : ## DBsubject('Algebra') 10 : ## DBchapter('Polynomial and Rational Functions') 11 : ## DBsection('Complex Roots/Fundamental Theorem of Algebra') 12 : ## Date('6/3/2002') 13 : ## Author('') 14 : ## Institution('') 15 : ## TitleText1('Precalculus') 16 : ## EditionText1('3') 17 : ## AuthorText1('Stewart, Redlin, Watson') 18 : ## Section1('3.4') 19 : ## Problem1('11') 20 : DOCUMENT(); # This should be the first executable line in the problem. 21 : 22 : loadMacros( 23 : "PG.pl", 24 : "PGbasicmacros.pl", 25 : "PGchoicemacros.pl", 26 : "PGanswermacros.pl", 27 : "PGauxiliaryFunctions.pl" 28 : ); 29 : 30 : TEXT(beginproblem()); 31 : $showPartialCorrectAnswers = 1; 32 : 33 :$b = random(2,4,1); 34 : $c = random(5,8,1); 35 : 36 : TEXT(EV2(< 0\) here: 46 :$BR 47 : the real part $$a$$ equals \{ans_rule(20) \} 48 : and the imaginary part $$b$$ equals \{ans_rule(20) \} 49 : $BR 50 : EOT 51 : 52 :$ans1 = -$b/2; 53 :$ans2 = -(-$b**2+4*$c)**(1/2)/2; 54 : $ans3 = -$b/2; 55 : $ans4 = (-$b**2+4*$c)**(1/2)/2; 56 : 57 : ANS(num_cmp($ans1)); 58 : ANS(num_cmp($ans2)); 59 : ANS(num_cmp($ans3)); 60 : ANS(num_cmp(\$ans4)); 61 : 62 : ENDDOCUMENT(); # This should be the last executable line in the problem. 63 :