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