Math 304 Homework: Solving Linear Systems and Plotting Implicit Functions, Assignments of Linear Algebra

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

Pre 2010

Uploaded on 02/10/2009

koofers-user-fzi-2
koofers-user-fzi-2 ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 304 Homework 1.1
>with(plots):
>with(linalg):
1 Problem 1
1.1 Problem 1a
>sys1 := {
>x1-3*x2=2,
>2*x2=6
>};
sys1 := {x1 โˆ’3x2 =2,2x2 =6}
>solve(sys1,{x1,x2});
{x2 =3,x1 = 11}
1.2 Problem 1b
>sys2 := {
>x1+x2+x3=8,
>2*x2+x3=5,
>3*x3=9};
sys2 := {x1 +x2 +x3 =8,2x2 +x3 =5,3x3 =9}
>solve(sys2,{x1,x2,x3});
{x3 =3,x1 =4,x2 =1}
1.3 Problem 1c
>sys3 := {
>x1+2*x2+2*x3+x4=5,
>3*x2+x3-2*x4=1,
>-x3+2*x4=-1,
>4*x4=4};
sys3 := {โˆ’x3 +2x4 =โˆ’1,4x4 =4,x1 +2x2 +2x3 +x4 =5,3x2 +x3 โˆ’2x4 =1}
>solve(sys3,{x1,x2,x3,x4});
{x3 =3,x4 =1,x1 =โˆ’2,x2 =0}
1.4 Problem 1d
>sys4 := {
>x1+x2+x3+x4+x5=5,
>2*x2+x3-2*x4+x5=1,
>4*x3+x4-2*x5=1,
>x4-3*x5=0,
>2*x5=2};
sys4 := {x4 โˆ’3x5 =0,2x5 =2,x1 +x2 +x3 +x4 +x5 =5,2x2 +x3 โˆ’2x4 +x5 =1,
4x3 +x4 โˆ’2x5 =1}
>solve(sys4,{x1,x2,x3,x4,x5});
{x5 =1,x4 =3,x3 =0,x1 =โˆ’2,x2 =3}
pf3
pf4
pf5

Partial preview of the text

Download Math 304 Homework: Solving Linear Systems and Plotting Implicit Functions and more Assignments Linear Algebra in PDF only on Docsity!

Math 304 Homework 1.

(^) with(plots): (^) with(linalg):

1 Problem 1

1.1 Problem 1a

(^) sys1 := { (^) x1-3x2=2, (^) 2x2= }; sys1 := {x1 โˆ’ 3 x2 = 2, 2 x2 = 6} (^) solve(sys1,{x1,x2}); {x2 = 3, x1 = 11}

1.2 Problem 1b

(^) 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}

1.3 Problem 1c

(^) 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}

1.4 Problem 1d

(^) 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}

2 Problem 2

2.1 Problem 2a

(^) mat1 := array(1..2,1..2, (^) [[1,-3], (^) [0,2]]);

mat1 :=

[

]

2.2 Problem 2b

(^) mat2 := array(1..3,1..3, (^) [[1,1,1], (^) [0,2,1], (^) [0,0,3]]);

mat2 :=

2.3 Problem 2c

(^) mat3 := array(1..4,1..4, (^) [[1,2,2,1], (^) [0,3,1,-2], (^) [0,0,-1,2], (^) [0,0,0,4]]);

mat3 :=

2.4 Problem 2d

(^) 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 :=

3 Problem 3

3.1 Problem 3a

(^) implicitplot({x1+x2=4,x1-x2=2},x1=-5..5,x2=-5..5);

x

x

3.4 Problem 3d

(^) implicitplot({x1+x2=1,x1-x2=1,-x1+3*x2=3},x1=-5..5,x2=-5..5);

x

โ€“4 โ€“2 (^2) x1 4

4 Problem 4

4.1 Problem 4a

(^) aug1 := array(1..2,1..3, (^) [[1,1,4], (^) [1,-1,2]]);

aug1 :=

[

]

4.2 Problem 4b

(^) aug2 := array(1..2,1..3, (^) [[1,2,4], (^) [-2,-4,4]]);

aug2 :=

[

]

4.3 Problem 4c

(^) aug3 := array(1..2,1..3, (^) [[2,-1,3], (^) [-4,2,-6]]);

aug3 :=

[

]

4.4 Problem 4d

(^) aug4 := array(1..3,1..3, (^) [[1,1,1], (^) [1,-2,1], [-1,3,3]]);

aug4 :=

5 Problem 5

5.1 Problem 5a

(^) 3x1+2x2=8; (^) x1+5*x2=7; 3 x1 + 2 x2 = 8 x1 + 5 x2 = 7

5.2 Problem 5b

(^) 5x1-2x2+x3=3; (^) 2x1+3x2-4*x3=0; 5 x1 โˆ’ 2 x2 + x3 = 3 2 x1 + 3 x2 โˆ’ 4 x3 = 0

5.3 Problem 5c

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}

7 Problem 7

(^) 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]