Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Example 2

Use the LU decomposition method to solve the following simultaneous linear equations.
25 5 1 a1 106 . 8
64
[ 8 1 a2
144 12 1 a
3
=
][ ] [ ]
177 . 2
279 .2
Solution
Recall that
[ A ][ X ] =[ C ]
and if
[ A ] =[ L ][ U ]
then first solving
[ L ][ Z ] =[ C ]
and then
[ U ][ X ]= [ Z ]
gives the solution vector [ X ] .
Now in the previous example, we showed
[ A ] =[ L ] [ U ]
1 0 0 25 5 1

First solve
[
5.76 3.5 1 0 0 ][
= 2.56 1 0 0 −4.8 −1.56
0.7 ]
[ L ] [ Z ]= [ C ]
1 0 0 z 1 106 . 8

[ 5 . 76 3 . 5 1 z
3
][ ] [ ]
2. 56 1 0 z 2 = 177 . 2
279 . 2
to give
z 1=106 . 8
2. 56 z 1 +z 2 =177. 2
5 .76 z 1+3 . 5 z 2 +z 3 =279 .2
Forward substitution starting from the first equation gives
z 1=106 .8
z 2=177 . 2−2 .56 z 1
=177 . 2−2 .56×106 . 8
=−96 .208
z 3=279.2−5 .76 z1 −3 .5 z 2
=279 .2−5 .76×106 . 8−3 .5×(−96 .208 )
=0. 76
Hence
z1

[]
[ Z ]= z2
z3
106.8
[ ]
= −96.208
0.76
This matrix is same as the right hand side obtained at the end of the forward elimination steps of
Naïve Gauss elimination method. Is this a coincidence?
Now solve
[ U ] [ X ] =[ Z ]
25 5 1 a1 106 . 8

[ 0 0.7 a
3
][ ] [ ]
0 −4 .8 −1. 56 a2 = −96. 208
0 0 . 76
25 a1 +5 a2 +a 3=106 . 8
−4.8a 2−1.56 a3 =−96.208
0.7 a3 =0.76
From the third equation
0.7 a3 =0.76
0 .76
a3 =
0 .7
=1 . 0857
Substituting the value of
a3 in the second equation,
−4.8a 2−1.56 a3 =−96.208
−96 . 208+1. 56 a3
a2 =
−4 . 8
−96 .208+1. 56×1 . 0857
=
−4 .8
=19 .691
a
Substituting the value of a2 and 3 in the first equation,
25 a1 +5 a2 +a 3=106 . 8
106 . 8−5 a 2−a3
a1 =
25
106 . 8−5×19. 691−1 . 0857
=
25
=0 . 29048
Hence the solution vector is
a1 0 .29048

[ ][ ]
a2 = 19 .691
a3 1. 0857

You might also like