Solve Equations 4x1+8x2=8;8x1+18x2+2x3=18;2x2+5x3+1.5x4=0.5;1.5x3+1.75x4=1.75 using Thomas algorithm methodSolution:Solving tridiagonal matrix system of equations using Thomas algorithm method
Total Equations are `4`
`4x1+8x2+0x3+0x4=8 -> (1)`
`8x1+18x2+2x3+0x4=18 -> (2)`
`0x1+2x2+5x3+1.5x4=0.5 -> (3)`
`0x1+0x2+1.5x3+1.75x4=1.75 -> (4)`
Converting given equations into matrix form
| `4` | `8` | `0` | `0` | | `8` | |
| `8` | `18` | `2` | `0` | | `18` | |
| `0` | `2` | `5` | `1.5` | | `0.5` | |
| `0` | `0` | `1.5` | `1.75` | | `1.75` | |
Identify each number above with Thomas algorithm notation
| `b_1` | `c_1` | `0` | `0` | | `d_1` | |
| `a_2` | `b_2` | `c_2` | `0` | | `d_2` | |
| `0` | `a_3` | `b_3` | `c_3` | | `d_3` | |
| `0` | `0` | `a_4` | `b_4` | | `d_4` | |
Sub diagonal values are
`a_2=8,a_3=2,a_4=1.5`
Main diagonal values are
`b_1=4,b_2=18,b_3=5,b_4=1.75`
Super diagonal values are
`c_1=8,c_2=2,c_3=1.5`
Right-hand side values are
`d_1=8,d_2=18,d_3=0.5,d_4=1.75`
Step-1 :`y_i=b_i-(a_i * c_(i-1))/(y_(i-1)), i=2,3,4``y_1=b_1``=4`
`y_2=b_2-(a_2 * c_1)/(y_1)``=18-(8 * 8)/(4)`
`=18-16`
`=2`
`y_3=b_3-(a_3 * c_2)/(y_2)``=5-(2 * 2)/(2)`
`=5-2`
`=3`
`y_4=b_4-(a_4 * c_3)/(y_3)``=1.75-(1.5 * 1.5)/(3)`
`=1.75-0.75`
`=1`
Step-2 :`z_i=(d_i-a_i*z_(i-1))/(y_i), i=2,3,4``z_1=d_1/y_1``=8/4=2`
`z_2=(d_2-a_2*z_1)/(y_2)``=(18 - 8 * 2)/(2)`
`=(2)/(2)`
`=1`
`z_3=(d_3-a_3*z_2)/(y_3)``=(0.5 - 2 * 1)/(3)`
`=(-1.5)/(3)`
`=-0.5`
`z_4=(d_4-a_4*z_3)/(y_4)``=(1.75 - 1.5 * (-0.5))/(1)`
`=(2.5)/(1)`
`=2.5`
Step-3 :`x_i=z_i-(c_i*x_(i+1))/(y_i), i=3,2,1``x_4=z_4``=2.5`
`x_3=z_3-(c_3*x_4)/(y_3)``=-0.5-(1.5 * 2.5)/(3)`
`=-0.5-1.25`
`=-1.75`
`x_2=z_2-(c_2*x_3)/(y_2)``=1-(2 * (-1.75))/(2)`
`=1+1.75`
`=2.75`
`x_1=z_1-(c_1*x_2)/(y_1)``=2-(8 * 2.75)/(4)`
`=2-5.5`
`=-3.5`
Solution is
`x_1=-3.5`
`x_2=2.75`
`x_3=-1.75`
`x_4=2.5`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then