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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 449 - (download) (annotate)
Tue Jul 3 17:27:24 2007 UTC (5 years, 10 months ago) by jjholt
File size: 1269 byte(s)
Updated Tags.  --JJH

    1 ## DESCRIPTION
    2 ## Calculus
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('numbers', 'complex')
    6 ## Tagged by YL
    7 
    8 ## DBsubject('Calculus')
    9 ## DBchapter('Complex Numbers')
   10 ## DBsection('Complex')
   11 ## Date('')
   12 ## Author('')
   13 ## Institution('ASU')
   14 ## TitleText1('Calculus')
   15 ## EditionText1('5e')
   16 ## AuthorText1('Stewart')
   17 ## Section1('')
   18 ## 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 TEXT(beginproblem());
   34 $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 ANS(number_list_cmp("$ans1-$ans2*i",complex=>'ok'));
   63 
   64 ANS(number_list_cmp("$ans3+$ans4*i",complex=>'ok'));
   65 
   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