[npl] / trunk / NationalProblemLibrary / Rochester / setComplexNumbers / ur_cn_1_21.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Rochester/setComplexNumbers/ur_cn_1_21.pg

Tue Jul 17 17:17:39 2007 UTC (5 years, 11 months ago) by jjholt
File size: 1550 byte(s)
It's Snider, not Snyder.


    1 ## DESCRIPTION
2 ## Calculus
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS ('complex','imaginary','polar coordinates')
6 ## Tagged by cmd6a 4/20/06
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Complex Variables')
10 ## DBsection('Complex Numbers')
11 ## Date('')
12 ## Author('')
13 ## Institution('Rochester')
14 ## TitleText1('Complex Analysis')
15 ## EditionText1('3')
16 ## AuthorText1('Saff, Snider')
17 ## Section1('1.4')
18 ## Problem1('')
19
20
21 DOCUMENT();        # This should be the first executable line in the problem.
22
24 "PG.pl",
25 "PGbasicmacros.pl",
26 "PGchoicemacros.pl",
28 "PGauxiliaryFunctions.pl",
29 "PGcomplexmacros.pl"
30 );
31
32 TEXT(beginproblem());
33 $showPartialCorrectAnswers = 1; 34 35$d = random(2,4,1);
36 $e = random(2,4,1); 37 38 BEGIN_TEXT 39 40 Write each of the given numbers in the form $$a+bi$$ :$PAR
41 (a) $$\displaystyle e^{-\frac{i \pi}{d}}$$ $PAR \{ans_rule(10)\} $$+$$ \{ans_rule(10)\}$$i$$,$PAR
42 (b) $$\displaystyle \frac{ e^{(1+ie\pi)}}{e^{(-1+\frac{i\pi}{2})}}$$ $PAR \{ans_rule(10)\} $$+$$ \{ans_rule(10)\}$$i$$,$PAR
43 (c) $$\displaystyle e^{e^{i}}$$ $PAR \{ans_rule(10)\} $$+$$ \{ans_rule(10)\}$$i$$.$PAR
44 $PAR 45 END_TEXT 46 47$a = new Complex();
48 $a = exp(-3.14159265358979/$d*i);
49 $b = new Complex(); 50$b = (exp(1+3.14159265358979*$e*i))/(exp(-1+3.14159265358979/2*i)); 51$c = new Complex();
52 $c = (exp(exp(i))); 53 54 ANS(num_cmp($a -> Re ));
55 ANS(num_cmp( $a -> Im )); 56 ANS(num_cmp($b -> Re, tol=>.001));
57 ANS(num_cmp( $b -> Im)); 58 ANS(num_cmp($c -> Re ));
59 ANS(num_cmp( \$c -> Im ));
60
61
62
63 ENDDOCUMENT();        # This should be the last executable line in the problem.
64


 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9