[npl] / branches / UGA / 9.3.4.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /branches/UGA/9.3.4.pg

Sat Jul 24 17:11:33 2010 UTC (2 years, 10 months ago) by ted shifrin
File size: 1515 byte(s)
`Log message`

```    1 ## DESCRIPTION
2 ## Linear Algebra
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS ('linear algebra','matrix','power','diagonalizable')
6 ## Tagged by cmd6a 4/30/06
7
8 ## DBsubject('Linear Algebra')
9 ## DBchapter('Matrices')
10 ## DBsection('Diagonalization')
11 ## Date('')
12 ## Author('modified by Shifrin')
13 ## Institution('Rochester')
14 ## TitleText1('')
15 ## EditionText1('')
16 ## AuthorText1('')
17 ## Section1('')
18 ## Problem1('')
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGgraphmacros.pl",
28 "PGmatrixmacros.pl",
29 "PGnumericalmacros.pl",
30 "PGauxiliaryFunctions.pl"
31 );
32
33 TEXT(beginproblem());
35
36 \$a = non_zero_random(-2,2,1);
37 \$b = 2/\$a;
38 \$s = random(-1,1,2);
39 \$c = random(2,9,1);
40 \$d = random(2,9,1);
41 if (\$c == \$d) {\$d = \$d+1;}
42
43 \$m11 = 2*\$c-\$d;
44 \$m12 = \$s*\$a*\$d - \$s*\$a*\$c;
45 \$m21 = \$s*\$b*\$c - \$s*\$b*\$d;
46 \$m22 = 2*\$d - \$c;
47
48 \$ans11 = "2*(\$c**n) - \$d**n";
49 \$ans12 = "\$s*\$a*(\$d**n) - \$s*\$a*(\$c**n)";
50 \$ans21 = "\$s*\$b*(\$c**n) - \$s*\$b*(\$d**n)";
51 \$ans22 = "2*(\$d**n) - \$c**n";
52
53 BEGIN_TEXT
54
55 Let \(M = \{display_matrix_mm([[\$m11, \$m12], [\$m21, \$m22]]) \}\).
56 \$BR
57 Find formulas for the entries of \(M^n\), where \(n\) is a positive integer.
58 \$BR
59 \{ mbox( '\(M^n=\)', answer_matrix(2,2,20), '.' ) \}
60
61 END_TEXT
62
63 ANS(fun_cmp(\$ans11, vars=>'n'));
64 ANS(fun_cmp(\$ans12, vars=>'n'));
65 ANS(fun_cmp(\$ans21, vars=>'n'));
66 ANS(fun_cmp(\$ans22, vars=>'n'));
67
68 ENDDOCUMENT();       # This should be the last executable line in the problem.
69
```