[npl] / trunk / NationalProblemLibrary / Dartmouth / setStewartAppendixG / problem_1.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/Dartmouth/setStewartAppendixG/problem_1.pg

Thu Jul 19 21:11:19 2007 UTC (5 years, 11 months ago) by jjholt
File size: 1166 byte(s)
```Updated/Consolidated tags.
```

```    1 ## DESCRIPTION
2 ## Complex Arithmetic
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('complex numbers', 'multiplication')
6 ## Tagged by tda2d
7
8 ## DBsubject('Calculus')
9 ## DBchapter('Complex Variables')
10 ## DBsection('Complex Numbers')
11 ## Date('')
12 ## Author('')
13 ## Institution('Dartmouth')
14 ## TitleText1('Calculus')
15 ## EditionText1('5')
16 ## AuthorText1('Stewart')
17 ## Section1('G')
18 ## Problem1('')
19
20 DOCUMENT();
22            "PGbasicmacros.pl",
23            "PGchoicemacros.pl",
25            "PGauxiliaryFunctions.pl",
26            "PGgraphmacros.pl",
27            "Dartmouthmacros.pl");
28
29
30 ## Do NOT show partial correct answers
32
33 ## Lots of set up goes here
34 \$a = random(-10,10);
35 \$b = random(-10,10);
36 \$c = non_zero_random(-10,10);
37 \$d = non_zero_random(-10,10);
38
39
40 ## Ok, we are ready to begin the problem...
41 ##
42 TEXT(beginproblem());
43
44
45 BEGIN_TEXT
46 \$BR
47     Evaluate the expression \(\displaystyle (\$a + \$b i)(\$c + \$d i)\), and write your answer in the form \( a + b i\).
48
49 a = \{ans_rule()\} and b = \{ ans_rule()\}.
50
51 \$PAR
52 END_TEXT
53     ANS(num_cmp( \$a*\$c - \$b*\$d  ));
54 ANS(num_cmp( \$b*\$c + \$a*\$d   ));
55 ENDDOCUMENT();
56
57
58
59
```