CHEN805 Problem Set
CHEN805 Problem Set
FACULTY OF ENGINEERING
Department of Chemical Engineering
CHEN 805: Computational Techniques for Chemical Engineers
Problem Set : Linear Algebraic System (2021/2022)
Question 1
" # 2 3 1
3 8
i. ii. 3 3 1 (1)
4 11
2 4 1
(a) Determine the inverse of the matrices in Eq. (1) using the adjoint method.
(b) Using the results obtain in (a), solve the following system of linear equations
i. 3x + 8y − 5 = 0 ii. 2x + 3y + z = 32
4x + 11y − 7 = 0 3x + 3y + z = −27
2x + 4y + z = −2
(c) Write a separate MATLAB/Octave code that solves the system of linear equations in (b) using the built-in
MATLAB/OCTAVE solver/capability. The code should comprise function and run files that accept the
coefficient matrix and vector of right hand side as input and output the results of the unknown.
Question 2
Consider the following system of linear equations
i. 2x + y − z = 1 ii. 3x − 2y + 3z = 8
−x + 2z = 4 4x + 2y − 2z = 2
4x − 2y + 3z = 0 x + y + 2z = 9
(a) Solve the two system of linear equations using Cramer’s rule
(b) Write a MATLAB/Octave code that implements the solution method in (a) using the built-in MAT-
LAB/OCTAVE solver/capability.
(c) Solve the two system of linear equations using Gauss elimination with partial and full pivoting.
Question 3
Consider the following matrices and vector
2 6 2 1 0 0 2 6 2 x1
A = 4 13 8 L = 2 1 0 U = 0 1 4 x = x2 (2)
2 9 17 1 L3,2 1 0 0 3 x3
1
(b) Using the matrices given and the solution obtain in (a), solve the system of equations given as Ax = b, with
5
b = 10
(c) Write a MATLAB/Octave code that solves the system of linear equations in (b) using the built-in MAT-
LAB/OCTAVE LU decomposition solver/capability.
Question 4
Solve the following problem using Cramer’s rule, Gauss elimination with partial pivoting and LU decomposition.
2x + 3y = 3
x + 2y = 2
Question 5
Given the following system of linear equations
3 2 4 x1 6
1 3 0 x2 = 3
2 4 1 x3 4
(a) Perform the first five iterations in determining the solution for the system using Gauss-Seidel method using
an initial guess of x1 = 0, x2 = 0, x3 = 0.
(b) Perform the first five iterations in determining the solution for the system using successive over-relaxation
3
method with a parameter w = 2 and an initial guess of x1 = 0, x2 = 0, x3 = 0.
(c) Write a MATLAB/Octave code that solves this particular problem to convergence using Gauss-Seidel and
successive over-relaxation methods. Take the convergence criteria to be the magnitude of the vector form
by the unknown and the tolerance to be 1 × 10−6 .
Question 6
Consider the problem given as follow:
6 1 0x1 −3−9
−2 8 2 3
x2 9
1 6 10 −2 x = 17
3
2 1 3 9 x4 13
(b) Perform the first two iterations of Jacobi’s method for the system of equations
(c) Write a MATLAB/Octave code that solves this particular problem to convergence using Jacobi method.
Take the convergence criteria to be the magnitude of the vector form by the unknown and the tolerance to
be 1 × 10−6 .