Parent Directory
|
Revision Log
Revision 481 - (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 : | jjholt | 480 | ## TitleText1('Calculus: Early Transcendentals') |
| 15 : | ## EditionText1('5') | ||
| 16 : | jj | 61 | ## AuthorText1('Stewart') |
| 17 : | jjholt | 473 | ## Section1('G') |
| 18 : | jj | 61 | ## Problem1('') |
| 19 : | |||
| 20 : | jjholt | 481 | ## TitleText2('Calculus: Early Transcendentals') |
| 21 : | ## EditionText2('6') | ||
| 22 : | ## AuthorText2('Stewart') | ||
| 23 : | ## Section2('G') | ||
| 24 : | ## Problem2('') | ||
| 25 : | |||
| 26 : | jj | 61 | DOCUMENT(); # This should be the first executable line in the problem. |
| 27 : | |||
| 28 : | loadMacros( | ||
| 29 : | "PG.pl", | ||
| 30 : | "PGbasicmacros.pl", | ||
| 31 : | "PGchoicemacros.pl", | ||
| 32 : | "PGanswermacros.pl", | ||
| 33 : | "PGauxiliaryFunctions.pl", | ||
| 34 : | "PGasu.pl", | ||
| 35 : | "extraAnswerEvaluators.pl", | ||
| 36 : | "PGcomplexmacros.pl" | ||
| 37 : | ); | ||
| 38 : | |||
| 39 : | gage | 268 | TEXT(beginproblem()); |
| 40 : | jj | 61 | $showPartialCorrectAnswers = 1; |
| 41 : | |||
| 42 : | $b = random(1,4,1); | ||
| 43 : | $c = random(5,8,1); | ||
| 44 : | |||
| 45 : | TEXT(EV2(<<EOT)); | ||
| 46 : | Find all solutions of the equation \( x+$b+\frac{$c}{x} = 0\) and | ||
| 47 : | express them in the form \(a + b i\): | ||
| 48 : | $BR $BR | ||
| 49 : | First input the solution with \(b <0\) here: | ||
| 50 : | $BR | ||
| 51 : | |||
| 52 : | \{ans_rule(25) \} | ||
| 53 : | $BR | ||
| 54 : | Then input the solution with \(b > 0\) here: | ||
| 55 : | $BR | ||
| 56 : | |||
| 57 : | \{ans_rule(25) \} | ||
| 58 : | $BR | ||
| 59 : | EOT | ||
| 60 : | |||
| 61 : | $nb=-$b; | ||
| 62 : | $delta=-$b**2+4*$c; | ||
| 63 : | $ans1 = $nb/2; | ||
| 64 : | $ans2 = ($delta)**0.5/2; | ||
| 65 : | $ans3 = $nb/2; | ||
| 66 : | $ans4 = ($delta)**0.5/2; | ||
| 67 : | |||
| 68 : | gage | 268 | ANS(number_list_cmp("$ans1-$ans2*i",complex=>'ok')); |
| 69 : | jj | 61 | |
| 70 : | gage | 268 | ANS(number_list_cmp("$ans3+$ans4*i",complex=>'ok')); |
| 71 : | jj | 61 | |
| 72 : | |||
| 73 : | ENDDOCUMENT(); # This should be the last executable line in the problem. | ||
| 74 : |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |