4. Example `x+y+z=3,2x-y-z=3,x-y+z=9`
Solve Equations x+y+z=3,2x-y-z=3,x-y+z=9 using Doolittle's method
Solution: Total Equations are `3`
`x+y+z=3 -> (1)`
`2x-y-z=3 -> (2)`
`x-y+z=9 -> (3)`
Now converting given equations into matrix form `[[1,1,1],[2,-1,-1],[1,-1,1]] [[x],[y],[z]]=[[3],[3],[9]]`
Now, A = `[[1,1,1],[2,-1,-1],[1,-1,1]]`, X = `[[x],[y],[z]]` and B = `[[3],[3],[9]]`
Doolittle's method for LU decomposition Let `A=LU`
| `1` | `1` | `1` | | | `2` | `-1` | `-1` | | | `1` | `-1` | `1` | |
| = | | `1` | `0` | `0` | | | `l_(21)` | `1` | `0` | | | `l_(31)` | `l_(32)` | `1` | |
| `xx` | | `u_(11)` | `u_(12)` | `u_(13)` | | | `0` | `u_(22)` | `u_(23)` | | | `0` | `0` | `u_(33)` | |
|
| `1` | `1` | `1` | | | `2` | `-1` | `-1` | | | `1` | `-1` | `1` | |
| = | | `u_(11)` | `u_(12)` | `u_(13)` | | | `l_(21)u_(11)` | `l_(21)u_(12) + u_(22)` | `l_(21)u_(13) + u_(23)` | | | `l_(31)u_(11)` | `l_(31)u_(12) + l_(32)u_(22)` | `l_(31)u_(13) + l_(32)u_(23) + u_(33)` | |
|
This implies `u_(11)=1`
`u_(12)=1`
`u_(13)=1`
`l_(21)u_(11)=2=>l_(21)xx1=2=>l_(21)=2`
`l_(21)u_(12) + u_(22)=-1=>2xx1 + u_(22)=-1=>u_(22)=-3`
`l_(21)u_(13) + u_(23)=-1=>2xx1 + u_(23)=-1=>u_(23)=-3`
`l_(31)u_(11)=1=>l_(31)xx1=1=>l_(31)=1`
`l_(31)u_(12) + l_(32)u_(22)=-1=>1xx1 + l_(32)xx(-3)=-1=>l_(32)=2/3`
`l_(31)u_(13) + l_(32)u_(23) + u_(33)=1=>1xx1 + 2/3xx(-3) + u_(33)=1=>u_(33)=2`
`:.A=L xx U=LU`
| `1` | `1` | `1` | | | `2` | `-1` | `-1` | | | `1` | `-1` | `1` | |
| = | | `1` | `0` | `0` | | | `2` | `1` | `0` | | | `1` | `2/3` | `1` | |
| `xx` | | `1` | `1` | `1` | | | `0` | `-3` | `-3` | | | `0` | `0` | `2` | |
| = | | `1` | `1` | `1` | | | `2` | `-1` | `-1` | | | `1` | `-1` | `1` | |
|
Now, `Ax=B`, and `A=LU => LUx=B`
let `Ux=y`, then `Ly=B =>`
| `1` | `0` | `0` | | | `2` | `1` | `0` | | | `1` | `2/3` | `1` | |
| `xx` | | = | |
| | | `` | `y_1` | | | | | `=` | `3` | `` | | | | `` | `2y_1` | `+` | `y_2` | | | `=` | `3` | `` | | | | `` | `y_1` | `+` | `2/3y_2` | `+` | `y_3` | `=` | `9` | `` |
Now use forward substitution method From (1) `y_1=3`
From (2) `2y_1+y_2=3`
`=>2(3)+y_2=3`
`=>6+y_2=3`
`=>y_2=3-6`
`=>y_2=-3`
From (3) `y_1+2/3y_2+y_3=9`
`=>(3)+(2(-3))/(3)+y_3=9`
`=>1+y_3=9`
`=>y_3=9-1`
`=>y_3=8`
Now, `Ux=y`
| `1` | `1` | `1` | | | `0` | `-3` | `-3` | | | `0` | `0` | `2` | |
| `xx` | | = | |
| | | `` | `x` | `+` | `y` | `+` | `z` | `=` | `3` | `` | | | | | | `-` | `3y` | `-` | `3z` | `=` | `-3` | `` | | | | | | | | `` | `2z` | `=` | `8` | `` |
Now use back substitution method From (3) `2z=8`
`=>z=(8)/(2)=4`
From (2) `-3y-3z=-3`
`=>-3y-3(4)=-3`
`=>-3y-12=-3`
`=>-3y=-3+12`
`=>-3y=9`
`=>y=(9)/(-3)=-3`
From (1) `x+y+z=3`
`=>x+(-3)+(4)=3`
`=>x+1=3`
`=>x=3-1`
`=>x=2`
Solution by Doolittle's method is `x=2,y=-3 and z=4`
This material is intended as a summary. Use your textbook for detail explanation. Any bug, improvement, feedback then
|