a) Solve the system of equations by the LU decomposition method. If the first and third equations were interchanged, would you expect the Gauss-Seidel iteration to converge?
8x+y+2z=29
x+9y+z=34
2x+3y+7z=48
b)do you expect the numerical scheme to converge? Justify your answer. Consider the following diagonally dominant system of equations:
8x+y+2z=29
x+9y+z=34
2x+3y+7z=48
using the Jacobi method and also the Gauss-Seidel method, solve this system. Compare the number of iterations needed for convergence in the two cases, if the convergence criterion is taken as 10-3 and applied to the computed value of the unknown.
c)The temperature distribution in the square region shown is governed by the Laplace equation. The finite difference approximation to this equation yields a system of algebraic equations given by
(Ti,j= Ti+1,j+Ti-1,j+Ti,j+1+Ti,j-1)/4
where i is the the number of the row and j is the column in which a grid point is located. For the nine points shown, obtain nine linear equations for determining the temperatures at these points. Solve this system by the Gauss-Siedel method. Note thatt the temperatures at the boundaries are given and are used in the equations for all the temperatures, except for the one at position 5, Also, using the inv(A) command in MATLAB, solve this problem and compare the results with those obtained earlier.



0 comments