[npl] / trunk / NationalProblemLibrary / Rochester / setLinearAlgebra1Systems / ur_la_1_5a.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# Annotation of /trunk/NationalProblemLibrary/Rochester/setLinearAlgebra1Systems/ur_la_1_5a.pg

 1 : jjholt 200 ## DESCRIPTION 2 : ## Linear Algebra 3 : ## ENDDESCRIPTION 4 : jj 144 5 : jjholt 200 ## KEYWORDS ('linear algebra','linear system') 6 : ## Tagged by cmd6a 5/3/06 7 : 8 : ## DBsubject('Linear Algebra') 9 : ## DBchapter('Systems of Linear Equations and Matrices') 10 : ## DBsection('Introduction to Systems of Linear Equations') 11 : ## Date('') 12 : ## Author('') 13 : ## Institution('Rochester') 14 : ## TitleText1('') 15 : ## EditionText1('') 16 : ## AuthorText1('') 17 : ## Section1('') 18 : ## Problem1('') 19 : 20 : jj 144 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 : "PGgraphmacros.pl", 28 : "PGauxiliaryFunctions.pl" 29 : 30 : ); 31 : 32 : TEXT(beginproblem()); 33 : $showPartialCorrectAnswers = 1; 34 : 35 :$a11 = random(2,6,2) * random(-1,1,2); 36 : $a12 = random(3,5,1) * random(-1,1,2); 37 :$a13 = random(3,5,2) * random(-1,1,2); 38 : $a21 = random(3,5,2) * random(-1,1,2); 39 :$a22 = random(2,6,2) * random(-1,1,2); 40 : $a23 = random(2,6,2) * random(-1,1,2); 41 :$a31 = random(2,6,1) * random(-1,1,2); 42 : $a32 = random(3,5,2) * random(-1,1,2); 43 :$a33 = random(2,6,2) * random(-1,1,2); 44 : 45 : $x = random(-5,5,1); 46 :$y = random(-5,5,1); 47 : $z = random(-5,5,1); 48 : 49 :$b1 = $a11*$x + $a12*$y + $a13*$z; 50 : $b2 =$a21*$x +$a22*$y +$a23*$z; 51 :$b3 = $a31*$x + $a32*$y + $a33*$z; 52 : 53 : $NO_SPACE = '@{}'; 54 : 55 : 56 : BEGIN_TEXT 57 : 58 : Solve the system using matrices (row operations)$BR 59 : $\left\{ "\{"; \} 60 : \begin{array}{r{NO_SPACE}r{NO_SPACE}r{NO_SPACE}r{NO_SPACE}r} 61 : a11 x & +a12 y & +a13 z &=& b1 \cr 62 : a21 x & +a22 y & +a23 z &=& b2 \cr 63 : a31 x & +a32 y & +a33 z &=& b3 64 : \end{array}\right.$ 65 : $BR 66 : $$x =$$ \{ans_rule(5)\} 67 :$BR 68 : $$y =$$ \{ans_rule(5)\} 69 : $BR 70 : $$z =$$ \{ans_rule(5)\} 71 : 72 : END_TEXT 73 : ANS(num_cmp($x, mode=>"arith")); 74 : ANS(num_cmp($y, mode=>"arith")); 75 : ANS(num_cmp($z, mode=>"arith")); 76 : 77 : ENDDOCUMENT(); # This should be the last executable line in the problem.