Parent Directory
|
Revision Log
Revision 1457 - (view) (download)
| 1 : | ted shifri | 1457 | ## DESCRIPTION |
| 2 : | ## Orthogonal complement | ||
| 3 : | ## ENDDESCRIPTION | ||
| 4 : | |||
| 5 : | ## KEYWORDS('Linear equations') | ||
| 6 : | ## | ||
| 7 : | |||
| 8 : | ## DBsubject('Calculus') | ||
| 9 : | ## DBchapter('') | ||
| 10 : | ## DBsection('') | ||
| 11 : | ## Date('10/05/2009') | ||
| 12 : | ## Author('Ted Shifrin') | ||
| 13 : | ## Institution('UGA') | ||
| 14 : | ## TitleText1('') | ||
| 15 : | ## EditionText1('') | ||
| 16 : | ## AuthorText1('') | ||
| 17 : | ## Section1('') | ||
| 18 : | ## Problem1('') | ||
| 19 : | |||
| 20 : | DOCUMENT(); # This should be the first executable line in the problem. | ||
| 21 : | |||
| 22 : | loadMacros("PG.pl", | ||
| 23 : | "PGbasicmacros.pl", | ||
| 24 : | "PGchoicemacros.pl", | ||
| 25 : | "PGanswermacros.pl", | ||
| 26 : | "PGauxiliaryFunctions.pl", | ||
| 27 : | "PGmatrixmacros.pl", | ||
| 28 : | "PGmorematrixmacros.pl", | ||
| 29 : | "compoundProblem.pl", | ||
| 30 : | ); | ||
| 31 : | |||
| 32 : | TEXT(beginproblem()); | ||
| 33 : | $showPartialCorrectAnswers = 1; | ||
| 34 : | |||
| 35 : | $a = non_zero_random(-2, 2, 1); | ||
| 36 : | $b = non_zero_random(-2, 2, 1); | ||
| 37 : | $c = non_zero_random(-2, 2, 1); | ||
| 38 : | $d = non_zero_random(-3, 3, 1); | ||
| 39 : | $e = non_zero_random(-3, 3, 1); | ||
| 40 : | $f = non_zero_random(-3, 3, 1); | ||
| 41 : | |||
| 42 : | |||
| 43 : | $i = non_zero_random(-2, 2, 1); | ||
| 44 : | $j = non_zero_random(-1,1,2); | ||
| 45 : | |||
| 46 : | $k = $i; | ||
| 47 : | $l = $j; | ||
| 48 : | $m = $i*$a+$j*$d; | ||
| 49 : | $n = $i*$b+$j*$e; | ||
| 50 : | $o = $i*$c+$j*$f; | ||
| 51 : | |||
| 52 : | if($a==1){$aa="";} elsif ($a==-1){$aa="-";} else{$aa=$a;} | ||
| 53 : | if($b==1){$bb="";} elsif ($b==-1){$bb="-";} else{$bb=$b;} | ||
| 54 : | if($c==1){$cc="";} elsif ($c==-1){$cc="-";} else{$cc=$c;} | ||
| 55 : | if($k==1){$kk="";} elsif ($k==-1){$kk="-";} else{$kk=$k;} | ||
| 56 : | if($l==1){$ll="";} elsif ($l==-1){$ll="-";} else{$ll=$l;} | ||
| 57 : | if($m==1){$mm="";} elsif ($m==-1){$mm="-";} else{$mm=$m;} | ||
| 58 : | if($n==1){$nn="";} elsif ($n==-1){$nn="-";} else{$nn=$n;} | ||
| 59 : | if($o==1){$oo="";} elsif ($o==-1){$oo="-";} else{$oo=$o;} | ||
| 60 : | |||
| 61 : | $isProfessor = ($studentLogin eq 'shifrin' || $studentLogin eq 'test'); | ||
| 62 : | |||
| 63 : | $cp = new compoundProblem( | ||
| 64 : | parts=>2, | ||
| 65 : | weights=>[.2,.8], | ||
| 66 : | parserValues=>1, | ||
| 67 : | allowReset => $isProfessor, | ||
| 68 : | nextVisible => 'Always', | ||
| 69 : | nextStyle => 'Button', | ||
| 70 : | ); | ||
| 71 : | |||
| 72 : | $part = $cp->part; | ||
| 73 : | |||
| 74 : | if($part==1){ | ||
| 75 : | |||
| 76 : | BEGIN_TEXT | ||
| 77 : | |||
| 78 : | Suppose | ||
| 79 : | \[ V = \text{Span}\left(\left[\begin{array}{r} 1\cr 0\cr $a\cr $b\cr $c | ||
| 80 : | \end{array}\right], \left[\begin{array}{r} $k\cr $l\cr $m\cr $n\cr $o\end{array}\right]\right)\subset \mathbb R^5\ . \] | ||
| 81 : | |||
| 82 : | $PAR | ||
| 83 : | dim \(V\) = \{ans_rule(3)\} | ||
| 84 : | |||
| 85 : | $PAR | ||
| 86 : | Now, let | ||
| 87 : | |||
| 88 : | \[ W = \left\{"\{"\} \left[\begin{array}{c} x_1\cr x_2\cr x_3\cr x_4\cr x_5\end{array}\right]\in\mathbb R^5: \begin{array}{r${NO_SPACE}r${NO_SPACE}r${NO_SPACE}r${NO_SPACE}r${NO_SPACE}r${NO_SPACE}r} | ||
| 89 : | x_1 & & + $aa x_3 & + $bb x_4 & + $cc x_5 & = & 0 \cr | ||
| 90 : | $kk x_1 & + $ll x_2 & + $mm x_3 & + $nn x_4 & + $oo x_5 & = & 0 | ||
| 91 : | \end{array} \right\} \ . \] | ||
| 92 : | |||
| 93 : | $PAR | ||
| 94 : | dim \(W\) = \{ans_rule(3)\} | ||
| 95 : | |||
| 96 : | END_TEXT | ||
| 97 : | ANS(num_cmp(2)); | ||
| 98 : | ANS(num_cmp(3)); | ||
| 99 : | } | ||
| 100 : | |||
| 101 : | if($part==2){ | ||
| 102 : | BEGIN_TEXT | ||
| 103 : | |||
| 104 : | Recall that | ||
| 105 : | |||
| 106 : | \[ V = \text{Span}\left(\left[\begin{array}{r} 1\cr 0\cr $a\cr $b\cr $c | ||
| 107 : | \end{array}\right], \left[\begin{array}{r} $k\cr $l\cr $m\cr $n\cr $o\end{array}\right]\right)\subset \mathbb R^5\ . \] | ||
| 108 : | |||
| 109 : | $PAR | ||
| 110 : | Give a basis for \( V^\perp \). | ||
| 111 : | |||
| 112 : | \{mbox( ans_array(5,1,8), ',', ans_array_extension(5,1,8),',', ans_array_extension(5,1,8) ) \} | ||
| 113 : | |||
| 114 : | $PAR | ||
| 115 : | |||
| 116 : | Recall that | ||
| 117 : | |||
| 118 : | \[ W = \left\{"\{"\} \left[\begin{array}{c} x_1\cr x_2\cr x_3\cr x_4\cr x_5\end{array}\right]\in\mathbb R^5: \begin{array}{r${NO_SPACE}r${NO_SPACE}r${NO_SPACE}r${NO_SPACE}r${NO_SPACE}r${NO_SPACE}r} | ||
| 119 : | x_1 & & + $aa x_3 & + $bb x_4 & + $cc x_5 & = & 0 \cr | ||
| 120 : | $kk x_1 & + $ll x_2 & + $mm x_3 & + $nn x_4 & + $oo x_5 & = & 0 | ||
| 121 : | \end{array} \right\} \ . \] | ||
| 122 : | |||
| 123 : | $PAR | ||
| 124 : | Give a basis for \( W^\perp \). | ||
| 125 : | |||
| 126 : | \{mbox( ans_array(5,1,8),',', ans_array_extension(5,1,8) ) \} | ||
| 127 : | |||
| 128 : | END_TEXT | ||
| 129 : | |||
| 130 : | ANS(basis_cmp([[-$a,-$d,1,0,0],[-$b,-$e,0,1,0],[-$c,-$f,0,0,1]])); | ||
| 131 : | ANS(basis_cmp([[1,0,$a,$b,$c],[0,1,$d,$e,$f]])); | ||
| 132 : | } | ||
| 133 : | |||
| 134 : | |||
| 135 : | ENDDOCUMENT(); # This should be the last executable line in the problem. | ||
| 136 : | |||
| 137 : |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |