[npl] / trunk / NationalProblemLibrary / ASU-topics / setComplexNumbers / zhu10.pg Repository:
ViewVC logotype

Annotation of /trunk/NationalProblemLibrary/ASU-topics/setComplexNumbers/zhu10.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 473 - (view) (download)

1 : jj 61 ## DESCRIPTION
2 : jjholt 473 ## Imaginary Roots of Quadratics
3 : jj 61 ## ENDDESCRIPTION
4 :    
5 : jjholt 473 ## KEYWORDS('complex', 'imaginary', 'quadratic', 'root')
6 : jj 61 ## Tagged by YL
7 :    
8 :     ## DBsubject('Calculus')
9 : jjholt 473 ## DBchapter('Appendixes')
10 :     ## DBsection('Complex Numbers')
11 : jj 61 ## Date('')
12 :     ## Author('')
13 :     ## Institution('ASU')
14 :     ## TitleText1('Calculus')
15 :     ## EditionText1('5e')
16 :     ## AuthorText1('Stewart')
17 : jjholt 473 ## Section1('G')
18 : jj 61 ## Problem1('')
19 :    
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 :     "PGasu.pl",
29 :     "extraAnswerEvaluators.pl",
30 :     "PGcomplexmacros.pl"
31 :     );
32 :    
33 : gage 268 TEXT(beginproblem());
34 : jj 61 $showPartialCorrectAnswers = 1;
35 :    
36 :     $b = random(1,4,1);
37 :     $c = random(5,8,1);
38 :    
39 :     TEXT(EV2(<<EOT));
40 :     Find all solutions of the equation \( x+$b+\frac{$c}{x} = 0\) and
41 :     express them in the form \(a + b i\):
42 :     $BR $BR
43 :     First input the solution with \(b <0\) here:
44 :     $BR
45 :    
46 :     \{ans_rule(25) \}
47 :     $BR
48 :     Then input the solution with \(b > 0\) here:
49 :     $BR
50 :    
51 :     \{ans_rule(25) \}
52 :     $BR
53 :     EOT
54 :    
55 :     $nb=-$b;
56 :     $delta=-$b**2+4*$c;
57 :     $ans1 = $nb/2;
58 :     $ans2 = ($delta)**0.5/2;
59 :     $ans3 = $nb/2;
60 :     $ans4 = ($delta)**0.5/2;
61 :    
62 : gage 268 ANS(number_list_cmp("$ans1-$ans2*i",complex=>'ok'));
63 : jj 61
64 : gage 268 ANS(number_list_cmp("$ans3+$ans4*i",complex=>'ok'));
65 : jj 61
66 :    
67 :     ENDDOCUMENT(); # This should be the last executable line in the problem.
68 :    

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9