[npl] / trunk / NationalProblemLibrary / Rochester / setAlgebra11ComplexNumbers / ur_cn_1_8.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Rochester/setAlgebra11ComplexNumbers/ur_cn_1_8.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 474 - (download) (annotate)
Tue Jul 17 13:55:24 2007 UTC (5 years, 10 months ago) by jjholt
File size: 1467 byte(s)
Fixed edition tags.

    1 ## DESCRIPTION
    2 ##   Complex Numbers
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('Complex')
    6 ## Tagged by nhamblet
    7 
    8 ## DBsubject('Algebra')
    9 ## DBchapter('Equations and Inequalities')
   10 ## DBsection('Complex Numbers')
   11 ## Date('')
   12 ## Author('')
   13 ## Institution('Rochester')
   14 ## TitleText1('Complex Analysis')
   15 ## EditionText1('3')
   16 ## AuthorText1('Saff, Snyder')
   17 ## Section1('1.1')
   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 "PGcomplexmacros.pl"
   29 );
   30 
   31 TEXT(beginproblem());
   32 $showPartialCorrectAnswers = 1;
   33 
   34 # create four complex numbers
   35 $a = new Complex( random(-5,-1,1) , 1 );
   36 $c = new Complex( non_zero_random( -5, 5, 1 ) , non_zero_random( -5, 5, 1 ) );
   37 $d = non_zero_random( -5, 5, 1 );
   38 
   39 BEGIN_TEXT
   40 Write the following numbers in \( a\ +\ bi \) form:$BR
   41 (a) \(($a)^2\ =\) \{ans_rule(5)\} \(+\) \{ans_rule(5)\} \(i\), $BR
   42 (b) \(\displaystyle \frac{$c}{\frac{i}{$d}}\ =\) \{ans_rule(5)\} \(+\) \{ans_rule(5)\} \(i\),$BR
   43 (c) \(\displaystyle \frac{$c}{\frac{1}{$d}}\ =\) \{ans_rule(5)\} \(+\) \{ans_rule(5)\} \(i\).$BR
   44 
   45 END_TEXT
   46 
   47 $b = $c  / ( new Complex( 0, 1/$d ));
   48 
   49 ANS(num_cmp( ($a**2) -> Re ));
   50 ANS(num_cmp( ($a**2) -> Im ));
   51 ANS(num_cmp( $b -> Re ));
   52 ANS(num_cmp( $b -> Im ));
   53 ANS(num_cmp( ($c*$d) -> Re ));
   54 ANS(num_cmp( ($c*$d) -> Im ));
   55 
   56 ENDDOCUMENT();        # This should be the last executable line in the problem.
   57 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9