



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Solutions to various problems from a linear algebra and implicit functions course. It includes the use of matlab commands to solve systems of linear equations and plot implicit functions. Students can use this document as a reference for understanding the concepts of solving linear systems and plotting implicit functions.
Typology: Assignments
1 / 7
This page cannot be seen from the preview
Don't miss anything!




(^) with(plots): (^) with(linalg):
(^) sys1 := { (^) x1-3x2=2, (^) 2x2= }; sys1 := {x1 โ 3 x2 = 2, 2 x2 = 6} (^) solve(sys1,{x1,x2}); {x2 = 3, x1 = 11}
(^) sys2 := { (^) x1+x2+x3=8, (^) 2x2+x3=5, (^) 3x3=9}; sys2 := {x1 + x2 + x3 = 8, 2 x2 + x3 = 5, 3 x3 = 9} (^) solve(sys2,{x1,x2,x3}); {x3 = 3, x1 = 4, x2 = 1}
(^) sys3 := { (^) x1+2x2+2x3+x4=5, (^) 3x2+x3-2x4=1, (^) -x3+2x4=-1, (^) 4x4=4}; sys3 := {โx3 + 2 x4 = โ 1 , 4 x4 = 4, x1 + 2 x2 + 2 x3 + x4 = 5, 3 x2 + x3 โ 2 x4 = 1} (^) solve(sys3,{x1,x2,x3,x4}); {x3 = 3, x4 = 1, x1 = โ 2 , x2 = 0}
(^) sys4 := { (^) x1+x2+x3+x4+x5=5, (^) 2x2+x3-2x4+x5=1, (^) 4x3+x4-2x5=1, (^) x4-3x5=0, (^) 2x5=2};
sys4 := {x4 โ 3 x5 = 0, 2 x5 = 2, x1 + x2 + x3 + x4 + x5 = 5, 2 x2 + x3 โ 2 x4 + x5 = 1,
4 x3 + x4 โ 2 x5 = 1}
(^) solve(sys4,{x1,x2,x3,x4,x5}); {x5 = 1, x4 = 3, x3 = 0, x1 = โ 2 , x2 = 3}
(^) mat1 := array(1..2,1..2, (^) [[1,-3], (^) [0,2]]);
mat1 :=
(^) mat2 := array(1..3,1..3, (^) [[1,1,1], (^) [0,2,1], (^) [0,0,3]]);
mat2 :=
(^) mat3 := array(1..4,1..4, (^) [[1,2,2,1], (^) [0,3,1,-2], (^) [0,0,-1,2], (^) [0,0,0,4]]);
mat3 :=
(^) mat4 := array(1..5,1..5, (^) [[1,1,1,1,1], (^) [0,2,1,-2,1], (^) [0,0,4,1,-2], (^) [0,0,0,1,-3], (^) [0,0,0,0,2]]);
mat4 :=
(^) implicitplot({x1+x2=4,x1-x2=2},x1=-5..5,x2=-5..5);
x
x
(^) implicitplot({x1+x2=1,x1-x2=1,-x1+3*x2=3},x1=-5..5,x2=-5..5);
x
โ4 โ2 (^2) x1 4
(^) aug1 := array(1..2,1..3, (^) [[1,1,4], (^) [1,-1,2]]);
aug1 :=
(^) aug2 := array(1..2,1..3, (^) [[1,2,4], (^) [-2,-4,4]]);
aug2 :=
(^) aug3 := array(1..2,1..3, (^) [[2,-1,3], (^) [-4,2,-6]]);
aug3 :=
(^) aug4 := array(1..3,1..3, (^) [[1,1,1], (^) [1,-2,1], [-1,3,3]]);
aug4 :=
(^) 3x1+2x2=8; (^) x1+5*x2=7; 3 x1 + 2 x2 = 8 x1 + 5 x2 = 7
(^) 5x1-2x2+x3=3; (^) 2x1+3x2-4*x3=0; 5 x1 โ 2 x2 + x3 = 3 2 x1 + 3 x2 โ 4 x3 = 0
2x1+x2+4x3=-1; (^) 4x1-2x2+3x3=4; (^) 5x1+2x2+6x3=-1; 2 x1 + x2 + 4 x3 = โ 1
(^) solve(sys4,{x1,x2,x3}); {x2 = 1, x3 = โ 1 , x1 = 1}
(^) comb:= array(1..2,1..3, (^) [[2,1,3], (^) [4,3,5]]);
comb :=
(^) result := gausselim(comb);
result :=
(^) backsub(result); [2, โ1] (^) comb:= array(1..2,1..3, (^) [[2,1,-1], (^) [4,3,1]]);
comb :=
(^) result := gausselim(comb);
result :=
(^) backsub(result); [โ 2 , 3]