matlab6 - Solutions to Problems in Chapter Six Test Your...

This preview shows pages 1–6. Sign up to view the full content.

Solutions to Problems in Chapter Six Test Your Understanding Problems T6.1-1 x =2 , y = - 3, z =5 T6.1-2 Multiplying the frst equation by - 3 shows that it has the same leFt side as the second equation, but a diﬀerent right side. Thus the equations are represented by parallel lines, and no solution exists. T6.1-3 Substitute the second equation into the frst to obtain 4 x - b (0 . 5 x )=0or(8 - b ) x = 0. IF b ± = 8, the solution is x = y = 0. IF b = 8 the two equations are identical, and all we can say is that x y . T6.2-1 Solving by hand: A = ± 3 - 4 6 - 10 ² b = ± 5 2 ² Thus x = A - 1 x = 1 6 ± 10 - 4 6 - 3 ²± 5 2 ² = ± 7 4 ² The MATLAB session is ² A = [3,-4;6,-10]; ² b = [5;2]; ² x = inv(A)*b x= 7.0000 4.0000 T6.2-2 Solving by hand: A = ± 3 - 4 6 - 8 ² b = ± 5 2 ² But | A | =3( - 8) - 6( - 4) = 0, so the inverse oF A does not exist. Thus there is no unique solution. (These two equations are represented by parallel lines.) The MATLAB session is ² A = [3,-4;6,-8]; ² b = [5;2]; ² x = inv(A)*b Warning: Matrix is singular to working precision. 6-1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
x= Inf Inf Thus no solution exists. T6.3-1 Cramer’s determinants are D = ± ± ± ± ± 4 - b - 36 ± ± ± ± ± D 1 = ² 5 - b ± ± ± ± ± D 2 = ² 45 - 33 ± ± ± ± ± These determinants evaluate to D =24 - 3 b , D 1 =30+3 b , and D 2 = 12 + 15 = 27. Thus x = D 1 /D = (30 + 3 b ) / (24 - 3 b ) = (10 + b ) / (8 - b ), y = D 2 /D =27 / (24 - 3 b )=9 / (8 - b ). If D = 0 we cannot divide by D to obtain a solution. D =0if b =8 . T6.3-2 The session is ± A = [2,1,2;0,3,1;2,-3,4]; ± D2 = det([A(:,1),[17,6,19] ± ,A(:,3)]); ± x = D2/det(A) y= 1 T6.4-1 The MATLAB session is ± A = [3,12,-7;5,-6,-5;-2,7,9]; ± b = [5;-8;5]; ± rank(A) ans = 3 ± rank([A b]) ans = 3 ± x=A\b -1.0204 0.5940 -0.1332 ± A*x ans = 5.0000 -8.0000 5.0000 6-2
These numbers are the right hand side of the equations. Thus the answer x = - 1 . 0204, y =0 . 5940, z = - 0 . 1332 is correct. Because the ranks are 3 and equal the number of unknowns, the solution is unique. T6.4-2 The MATLAB session is ± A = [1,3,2;1,1,1]; ± b = [2;4]; ± rank(A) ans = 2 ± rank([A b]) ans = 2 ± pinv(A)*b ans = 4.3333 -1.6667 1.3333 ± x=A\b x= 5.0000 -1.0000 0 Because the ranks are 2 and less than the number of unknowns, the solution is not unique. The minimum-norm solution is x =4 . 3333, y = - 1 . 6667, z =1 . 333. The left-division solution is x =5 , y = - 1, z . T6.4-3 The MATLAB session is ± A = [3,5,6;8,-1,2;5,-6,-4]; ± b = [6;1;-5]; ± rank(A) ans = 2 ± rank([A b]) ans = 2 ± rref([A b]) ans = 1.0000 0 0.3721 0.2558 0 1.0000 0.9767 1.0465 0000 6-3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
± x = pinv(A)*b x= 0.0571 0.5249 0.5340 ± x=A\b Warning: Matrix is singular to working precision. Inf Inf Inf Because the ranks are less than the number of unknowns, an inFnite number of solutions exists. The reduced row echelon form gives the following solutions: x = - 0 . 3721 z +0 . 2558 y = - 0 . 9767 z +1 . 0465 where z can have any value. The pseudoinverse solution is x =0 . 0571, y . 5249, z . 534. T6.4-4 The MATLAB session is ± A = [3,5,6;8,-1,2;5,-6,-4]; ± b = [6;1;-5]; ± rank(A) ans = 2 ± rank([A b]) ans = 2 rref([A b]) ans = 1.0000 0 -0.2727 5.2727 0 1.0000 1.3636 -2.3636 ± x = pinv(A)*b 4.8394 -0.1972 -1.5887 ± 4.8000 6-4
0 -1.7333 Because the ranks are equal but less than the number of unknowns, an inFnite number of solutions exists. These are given by the reduced row echelon form: x =0 . 2727 z +5 . 2727 y = - 1 . 3636 z - 2 . 3636 where z can have any value.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

matlab6 - Solutions to Problems in Chapter Six Test Your...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online