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 Crout'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]]`
Crout's method for LU decomposition Let `A=LU`
| `1` | `1` | `1` | | | `2` | `-1` | `-1` | | | `1` | `-1` | `1` | |
| = | | `l_(11)` | `0` | `0` | | | `l_(21)` | `l_(22)` | `0` | | | `l_(31)` | `l_(32)` | `l_(33)` | |
| `xx` | | `1` | `u_(12)` | `u_(13)` | | | `0` | `1` | `u_(23)` | | | `0` | `0` | `1` | |
|
| `1` | `1` | `1` | | | `2` | `-1` | `-1` | | | `1` | `-1` | `1` | |
| = | | `l_(11)` | `l_(11)u_(12)` | `l_(11)u_(13)` | | | `l_(21)` | `l_(21)u_(12) + l_(22)` | `l_(21)u_(13) + l_(22)u_(23)` | | | `l_(31)` | `l_(31)u_(12) + l_(32)` | `l_(31)u_(13) + l_(32)u_(23) + l_(33)` | |
|
This implies `l_(11)=1`
`l_(11)u_(12)=1=>1xxu_(12)=1=>u_(12)=1`
`l_(11)u_(13)=1=>1xxu_(13)=1=>u_(13)=1`
`l_(21)=2`
`l_(21)u_(12) + l_(22)=-1=>2xx1 + l_(22)=-1=>l_(22)=-3`
`l_(21)u_(13) + l_(22)u_(23)=-1=>2xx1 + (-3)xxu_(23)=-1=>u_(23)=1`
`l_(31)=1`
`l_(31)u_(12) + l_(32)=-1=>1xx1 + l_(32)=-1=>l_(32)=-2`
`l_(31)u_(13) + l_(32)u_(23) + l_(33)=1=>1xx1 + (-2)xx1 + l_(33)=1=>l_(33)=2`
`:.A=L xx U=LU`
| `1` | `1` | `1` | | | `2` | `-1` | `-1` | | | `1` | `-1` | `1` | |
| = | | `1` | `0` | `0` | | | `2` | `-3` | `0` | | | `1` | `-2` | `2` | |
| `xx` | | `1` | `1` | `1` | | | `0` | `1` | `1` | | | `0` | `0` | `1` | |
| = | | `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` | `-3` | `0` | | | `1` | `-2` | `2` | |
| `xx` | | = | |
| | | `` | `y_1` | | | | | `=` | `3` | `` | | | | `` | `2y_1` | `-` | `3y_2` | | | `=` | `3` | `` | | | | `` | `y_1` | `-` | `2y_2` | `+` | `2y_3` | `=` | `9` | `` |
Now use forward substitution method From (1) `y_1=3`
From (2) `2y_1-3y_2=3`
`=>2(3)-3y_2=3`
`=>6-3y_2=3`
`=>-3y_2=3-6`
`=>-3y_2=-3`
`=>y_2=(-3)/(-3)=1`
From (3) `y_1-2y_2+2y_3=9`
`=>(3)-2(1)+2y_3=9`
`=>1+2y_3=9`
`=>2y_3=9-1`
`=>2y_3=8`
`=>y_3=(8)/(2)=4`
Now, `Ux=y`
| `1` | `1` | `1` | | | `0` | `1` | `1` | | | `0` | `0` | `1` | |
| `xx` | | = | |
| | | `` | `x` | `+` | `y` | `+` | `z` | `=` | `3` | `` | | | | | | `` | `y` | `+` | `z` | `=` | `1` | `` | | | | | | | | `` | `z` | `=` | `4` | `` |
Now use back substitution method From (3) `z=4`
From (2) `y+z=1`
`=>y+(4)=1`
`=>y+4=1`
`=>y=1-4`
`=>y=-3`
From (1) `x+y+z=3`
`=>x+(-3)+(4)=3`
`=>x+1=3`
`=>x=3-1`
`=>x=2`
Solution by Crout'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
|