Numerical Method - Old Questions
1. Compare Gauss Elimination method and Gauss Jordan method of solving simultaneous equation. Use Gauss Elimination to solve the following system of equation and also write its algorithm.
2x+3y+4z=5
3x+4y+5z=6
4x+5y+6z=7
Answer
AI is thinking...
Comparison between Gauss Elimination method and Gauss Jordan method
- In Gauss- elimination method, the augmented
matrix is reduced to Echelon form using row operations and then back
substitution is applied to get values of unknowns, occurring in a system of
linear equations.
- In Gauss-Jordan method, the augmented matrix is
reduced to reduced Echelon form using elementary row operations to obtain
values of unknowns of a system of linear equations.
- For small system it more convenient to use Gauss Jordan method.
- Gauss Jordan requires more computational work than Gauss Elimination.
Given system of equation,
2x+3y+4z=5
3x+4y+5z=6
4x+5y+6z=7
The augmented matrix of given system is;
Applying,
Applying,
Now,
using backward substitution;
3z
= 0
i.e. z = 0
Finding the value of y using the value of z
Again, finding the value of x using the value of y and z
Hence the value of x, y, z are -2, 3, 0 respectively.
Algorithm
for Gauss elimination method
1.
Start
2. Read the order of matrix ānā and take the
coefficients of linear equation.
3.
Do for k=1 to n-1
Do for i=k+1 to n
Do for j=k+1 to n+1
a[i][j]=a[i][j]-a[i][k]/a[k][k]*a[k][j]
end for j
end for i
end for k
4.
Compute x[n]=a[n][n+1]/a[n][n]
5.
Do for k=n-1 to 1
Sum=0
Do for j=k+1 to n
Sum=Sum+a[k][j]*x[j]
end for j
x[k]=(a[k][n+1]-Sum)/a[k][k]
end for k
6.
Display the result x[k]
7. Stop