CHC503 - Assignment 2 - Monsoon 2023-2024
CHC503 - Assignment 2 - Monsoon 2023-2024
CHC503
Computational Techniques in Chemical Engineering
Assignment 2
on
Numerical solution of system of linear algebraic equations
x1 x2 x3 3
6 x1 2 x2 2 x3 2
3x1 4 x2 x3 1
Solve the above system by
(a) Naive Gauss elimination (i.e., Gauss elimination without any pivoting)
(b) Gauss elimination with partial pivoting
(c) Gauss-Jordan elimination without partial pivoting
All the steps of computation should be clear and evident. In each case [(a)-(c)
above], substitute the results back into the original equations in order to check the
accurateness of the obtained solutions.
(d) Represent the above system of equations in the matrix form AX=B, and calculate
the condition number of the matrix A thus obtained. For calculating the norms, use
row-sum norm (i.e., A ), column-sum norm (i.e., A 1 ) and Frobenius norm (also
known as Euclidean norm i.e., A e ) approaches, and evaluate the condition number
for each of these approaches. Is the system ill-conditioned?
(e) Obtain the inverse of matrix A, using the augmented matrix approach while
performing naive Gauss elimination.
(f) Can LU decomposition (Doolittle decomposition variant) method be employed for
solving the above system? Explain your answer, and if the answer is YES, solve it
using LU decomposition method.
(g) Can Thomas algorithm be employed for solving the above system? Explain your
answer, and if the answer is YES, solve it using Thomas algorithm.
(h) Can Cholesky decomposition method be employed for solving the above system?
Explain your answer, and if the answer is YES, solve it using Cholesky
decomposition method.
1
2. Solve the following system of equations by LU decomposition method (Doolittle
decomposition variant):
3x1 2 x2 x3 10
2 x1 6 x2 4 x3 44
x1 2 x2 5 x3 26
2 x1 6 x2 x3 38
3x1 x2 7 x3 34
8 x1 x2 2 x3 20
8 x1 20 x2 15 x3 100
20 x1 80 x2 50 x3 250
15 x1 50 x2 60 x3 100
0.8 0.4 0 x1 41
0.4 0.8 0.4 x 25
2
0 0.4 0.8 x3 105
(a) Is the above system solvable by Thomas algorithm? Explain your answer, and if the
answer is YES, obtain the solution via the method.
(b) Is the above system solvable by Gauss-Siedel iterative method? Explain your
answer, and if the answer is YES, obtain the solution via the method (in case the
system is solvable via Gauss-Siedel method, your reported solution should have an
accuracy level of 5%, i.e., 0.05. You can start with any suitable initial guess as
discussed in the class lectures).
6. The following system of equations have been designed to evaluate the concentrations
(the c’s are in g/m3) in a series of coupled reactors as a function of the quantity of mass
input to each reactor (the right-hand sides of each of these equations are in g/day):
2
(a) Gauss-Siedel iterative method
(b) Jacobi iterative method.
For both (a) and (b), start with [0, 0, 0]T as the initial approximation. In each of these
cases, your solution should have an accuracy level of 5% (i.e., 0.05). Which method is
giving results (having desired accuracy) with lesser number of iterations, and why?
3x1 x2 15 x3 44
6 x1 2 x2 x3 5
5 x1 10 x2 x3 28
You can start with any suitable initial guess as discussed in the class lectures. A good
starting point can be [0 0 0]T (or, [1 1 1]T). The acceptable tolerance (accuracy) level
should be 5% in each of the three cases. You may rearrange the equations to achieve
convergence, if found necessary. You may also explain any observation/make a
comparison based on your calculations by the three methods.