Professional Documents
Culture Documents
4 1 −1 0 2 0 0 −1 14 7 −1 0
2 −8 2 4 3 −7 2 1 2 10 1 3
EXERCISE 1: Let the matrices A1 = 1 −2 6 1, A2 =1 1 5
and A3 =
2 3 −4
1 0
1 1 1 5 2 3 5 −11 0 0 0 5
While solving Ax=b, which one(s) will for sure converge whatever the initial vector ~x(0) for Gauss-Seidel
and Jacobi methods? Why? (Quick answer) Why you didn’t choose the other one(s)? (Quick answer)
7 2 3 20
EXERCISE 2: Cholesky: Let solve the system Ax=b with A=2 4 1 and b= −1
3 1 2 9
a/ Find the L and LT of Cholesky decomposition (at the end of each step rewrite your L LT =A with the
values you yet know).
b/ Find ~x (answer is only with integer numbers, maybe during process you lost accuracy, keep the integer
you are the more near for each xi )
1
2
a/ Write the equations of (i) Jacobi, (ii) Gauss-Seidel and (iii) SOR with ω = 1.2, to go from vector ~x(k)
to ~x(k+1) .
1
b/ Let start with the initial vector ~x(0) = 1. Find ~x(1) using the equations of Jacobi from question a/,
1
then find ~x(2) using the equations of Gauss-Seidel of a/. Give details of your calculation.
0 −0.2857 −0.4286
c/ Let MGS = 0 0.1429 −0.0357. Calculate the norm 1 and the norm infinity of this matrix. What
0 0.3571 −0.3393
do you conclude for Gauss-Seidel method?
3
Part 2
EXERCISE 4: Let X ~ = (1, 3, 4, 7) means x0 = 1, x1 = 3, x2 = 4 and x3 = 7 and Y
~ = (3, 5, 1, 9) means
y0 = 3, y1 = 5, y2 = 1 and y3 = 9.
(ii) Start from the equation of question a(i) to find this equation (do in a very simple and quick way,
naturally change a function to a function matrix and a real variable to a vector variable): F’(~x(k) ) (~x(k+1) −
~x(k) ) = - F(~x(k)
)
f1 (x)
f2 (x)
with F(~x) = : . This equation is the one of Newton method for a system with n unknown.
fn (x)
(Explanation: we cannot divide by f 0 (x) which is now a matrix....)
(iii) This method is still an interative method: from ~x(k) using one method to find ~x(k+1) .
Let ~x(0) an initial vector.
Give an algorithm which is using one of the methods of Chapter 2 or Chapter 3 (the one you want, if you
choose a method we have learnt the partial pivoting, use the one with partial pivoting) to solve the equation
of (ii). (you have to reorganize this equation). For that:
Input are: F (means the vector function F(~x) ), F’ (the Jacobian matrix which is a matrix function), tol
(the tolerance), x0 (the initial vector), N0 (maximum number of iterations).
Your algorithm should explain how to go from ~x(k) to ~x(k+1) - of course using the equation of (ii) - and
also verify when to stop (when there is convergence = when it is succeed or maybe when it fails).
Before your algorithm give some explanation and the main idea/step of your algorithm, then write the
algorithm with details.
No forget you cannot divide by a matrix and you are not allowed to use the inverse matrix.