0% found this document useful (0 votes)
22 views

Assignment #2 - Solutions

The document describes a problem involving determining the amounts of materials to extract from three pits to fulfill an order. Linear equations are set up relating the percentage compositions of each pit to the amounts needed. The system is then solved to determine how many cubic meters must be taken from each pit.

Uploaded by

Mani Kanta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Assignment #2 - Solutions

The document describes a problem involving determining the amounts of materials to extract from three pits to fulfill an order. Linear equations are set up relating the percentage compositions of each pit to the amounts needed. The system is then solved to determine how many cubic meters must be taken from each pit.

Uploaded by

Mani Kanta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Given the system

0.5x|-x2=-9.5
1.01 xi -2x2=-18. 8

(a) Compute the determinant of the coefficient matrix, (b) Solve by elimination of unknowns.

The system is slightly modified to obtain


0.52xi-x2=-9.5
1.0 I xi -2jr2=-18 . 8

(c) Again solve by elimination of unknowns, (d) Comment on the system's condition.

a,5- -(
2) ,A(=

I,¢! -1

!) ¥a=O,9.t4,+gpF _ Pi=f"Jstl{G'g#;+9jFjJ/I,o6

I,o\%`-to,#O,.i iw,,=2-0 ixp&= I9,F

Cj }ELa= O,52F9.5-i ",+\&.8+2(O,g2fty,+9.8j]/Lgri

i.o{ # _ I,oq fry, = o„ + xrf, = _ G, £;F + w2 = 6,D 3~


I

dj ?>hh& bsG¥ S£¥€:€: ;iarife£SgivieutLt2&+ ;iff:rfe: {;>(S:{®ak o5++a:leo a£

6AG{€v-w\ttvR`ptht. Tbeg~ two a.fty*ta4\`otts agrc= vepr`cj

Gt`th\'\av-,i s#sfa¢VA {£ w¢+ i.atd€¢£"€i€v`+d


Xi+X2-X3=-3
6j¥i+2X2+2X3=2
-3xi+4X2+X3=1
Solve the above system with: (a) Cramer's rule, (b) na.I.ve Gaussian elimination, (c) Gauss elimination
with partial pivoting, and (d) Gauss-Jordan method without partial pivoting.

det(A)--48

det(Ai)= 12 and xi=det(Ai)/ det(A) = -0.25

det(A2)= 24 and x2=det(A2)/ det(A) = -0.5

det(A3)= -108 and x3=det(A3)/ det(A) = 2.25

b) The system is first expressed as an augmented matrix:

Forward elimination:
cr2i is eliminated by multiplying row 1 by 6/1 = 6 and subtracting the result from row 2. cz3i is
eliminated by multiplying row 1 by -3/1 = -3 and subtracting the result from row 3.

C'32 is eliminated by multiplying row 2 by 7/(4) = -1.75 and subtracting the result from row

Back substitution:

X3=Z=2.25

20 -8(2.25)
= -0.5
-4
-3 -(-1)(2.25) -1(-0.5)
= -0.25
c) The system is expressed as the above augmented matrix.

Forward elimination: First, we pivot by switching rows 1 and 2:

[-i
Multiply row by 1/6 = 0.16667 and subtract from row 2 to eliminate cz2i. Multiply row 1 by
-3/6 = -0.5 and subtract from row 3 to eliminate cz3i.

-3.33333

Pivot:
22
52
0.66667 -1.33333

Multiply row 2 by 0.66667/5 = 0.133333 and subtract from row 3 to eliminate cz32.

Back substitution:

x3--#-225
2 -2(2.25)
X2= = -0.5
5
2 - 2(2.25) -2(-0.5) = -0.25
'tl=

d) The system is again expressed as the above augmented matrix:

Normalize the first row, and then eliminate cJ2i and a3i,

Normalize the second row and eliminate cJi2 and cz32,

Normalize the third row and eliminate czi3 and cJ23,


1 0 0 -0.25
0 1 0 -0.5
0 0 1 2.25
•, ,t- t;,
L `he,g, 6},wi = S
Given is the linear system life)€=;I;:
7xi+2X2-3x3 = - 12
2xi+5x2-3x3 = -20
XrJX.2-6X3= - 26
\~ ,~ (a) Use LU-decomposition to solve the system. Show all the steps in the computation.
(b) Also solve the system for an alternative right-hand side vector {B}T=[12 18 -6].

7# L.A;( -La. ,u,`2 -3= lvL3

-ity¥.;,:,-`,u"=7 !„ 5-g`g*2,,wh!Z+ .,.,ri -`i --3= ,!l£,\,tis" )

^2r=&jJ7 L,`z2=5-;2==`, F `!"Se± -~`1- iR \= :) -I

`=/v3\ u„ a i;3=\!i7 -\"=„u§2.+`{3~£ u2z -fe=`EL3\'wlt3+#d,= Lu+'z43j

uJ|;=

a , = -a\ 2
a d\L= _`.0 -*-. ='-i ir2\ThL) = ` :h\v`S_i \

grl5 = -2-9 . a 9 „ ,?

i lj{--r= :, dr?79
I ~± :3.a ~i,,,i
o3'7 =i `rfet.if
dc L t[ ±~ , r:J` :S
0 c, -byS',ito?£J :cj®®91 - R.6f~ RE
B€i€`fr Substifus`iSi& :

-3
-3,1438S
-S.19~$55 :-:.-:§-::i:::::.,-:.:-

-£*£,ffis£#
= #. SS?# `l ?
-S.1S.*5S
-lfi¢5?14-{~2.E4Sff,'`.}{`4.SS?91?}
= -1 ]46faT§
4.428.ST|
-l£-f,-3)4.S$7#1?-3ti,48S?-q?
= ®A71S??

€`b} F®rtit!"-tl Srfestitti¥i®i&: £E] {#} = {#},

sc*lrfe&B ¥`i€lEis all = I 2h rfe a I #r~q7 i4.3. €ffiifed ¢#.8 = -£`ig#&TO

E£H#k gutsg[itut`iffFn:

-3
-E ¢ i i28S
-S.1S-$55

-.a.48.S$7
•io? = =S.£g}=S
i£,i#tr%£5
ldy.5-14~3~g~8.i43S#}£<S..i$25,\§
=`3,56¥u£
#.#=8§?1
12~€-3}{ffi.~S$2.S+j-3€<`3.S#2.S}
=S.S.$75
Use the Gauss-Seidel method to solve the following system until the relative error falls below €s=5%
lou,+2x2-x3=27
-3Xi-6X2+2x3=-61.5
Xi+X2+5#3=-21.5

The first iteration can be implemented as (use 0 as initial estimate for j*2 and x3)
27 -2x2 + x3 = 27 - 2(0) + 0 -_2.J
't,=
1010
-61.5 + 3x, -2x3 = -61.5 + 3(2.7) -2(0)
j*2=
=8.9
-6 -6
-21.5 -Xi -X2 -21.5 -(2.7) -8.9
X3=
= -6.62

Second iteration:
27 -2(8.9) -6.62 = 0.258
Xl=
10
-61.5 + 3(0.25 8) -2(-6.62)
X2= =7.914333
-6
-21.5 -(0.258) -7.914333
JX3=
= -5.934467

The error estimates can be computed as


x100°/o=947°/o

7.914333 -8.9
x 100% = 12.45%
7.91433.3
-5.934467 -(-6.62)
€a.3- x 1 0 0 °/o = 1 I . 5 5 0/o
-5 .934467

The remainder of the calculation proceeds until all the errors fall below the stopping criterion
of 5%. The entire can be summarized as
iteration unknown value maximum €a
xl 2.7 100.00%
X2 8.9 100.000/o
X3 -6.62 100.00% 100%
Xi 0.258 946.51 °/o
X2 7.914333 12.45%
X3 -5.93447 11.550/o 946%
Xi 0.523687 50.73%
X2 8.010001 1.19%
X3 -6.00674 1.200/o 50.73%
Xi 0.497326 5.30%
X2 7.999091 0.14%
X3 -5.99928 0.12% 5.30%
Xi 0.500253 0.59%
X2 8.000112 0.01%
X3 -6.00007 0.01 % 0.59%
= 0.500253, jx2 =
Thus, after 5 iterations, the maximum error is0.59% and we arrive at the result: xi
8.000112 and #3 = -6.00007.
A civil engineer requires 4800, 5800, and 5700 m3 of sand, fine gravel, and coarse gravel, respectively,
for a building project. There are three pits from which these materials can be obtained with composition
as specified in the table. Formulate the correct linear system and determine how many cubic meters must
be hauled from each pit.
sand(o/o) flne gravel (o/o) coarse gravel (°/o)
Pitl 25 20 55
Pit2 25 45 30
Pit3 55 30 15

Let xj = the volume taken from pit I.. Therefore, the following system of equations must hold
0.25x, + 0.25x2 + 0.55x3 = 4800
0.20x, + 0.45X2 + 0.30X3 = 5800

0.55x, + 0.30x2 + 0.15J*3 = 5700

These can then be solved for xi = 4690, x2 = 9193, and x3 = 2417 m3. I used MATLAB to
solve [A] {x}={b} :
A-

0.2500 0.2500 0.5500


0.2000 0.4500 0.3000
0.5500 0.3000 0.1500

X=

I.Oe+003 *

4.6900
9.1933
2.4167
Employing the same methods as used to analyze Fig. 12.4, determine the forces and reactions for the truss
shown. Formulate the matrix system and solve with Matlab or Excel.

i-h\

zTft=0=-~r`L®jLe56~SS0

ZTv=O I iJfro`VI|€®-¥e
i
Tb/€T:2
¥iH =0 = T{ e¢jts5` + Tz i T5 c¢7fro.vy-Tc 6®<j3o-

Zfv j#o g i, 4;ntr5° -i6 rfu" ao-- i6 4giv`n 3o.

r fH t=® = -Tz _ 250


11 dr~ :i.
` dr- 25®
[Tv=0= T3 -i\
t=i
Ti Zfttg@&i6CJ®j3®`+`+7rHty
Htif:T7
ETrf=®=T6zwh3®.ttvtr

ZTtry tftl = -T5. q',quJ qufaQ -i7


H€hc€-.,
¥xpv g a g Th + ups ~S``vy bo` + Vg

Cj C~', `3?, ,- ci i = -I, I,3 i


I a 0 a 811 Tz = - 2 5 S
{} cft ¢grS;di-'*3rf` g2 goo_-i
``! ,¢,q _,tofl(as _rfu`dy`:ijjp u* fL2} €`j €* TFg=-Iffty,fl#
f.i , ,ky, #.SfL?`B
-i,3Sg,
I,, r -, c, (--f' -~, g3 ®#,
83.9(
cj gr gS G{,/iF. i ' cSc¥
C9 i{3 ft'`\«iB:3 Ll i \J I Q 5u_ .®

eat ELq--~;'-i S he' £P ue

wi'qfa c, (a-P (1:.;!


8

You might also like