You are on page 1of 4

Part 1

During all exam, give answer with 4 decimal figures.

     
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

EXERCISE 3: Chapter 3: Let solve the same system than Exo 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.

a/ Lagrange basis method:


(i) How many vectors in the Lagrange basis? Find each vectors Lk (x).
(ii) What is the interpolant polynomial p(x)? To write it quickly, keep it with Li .

b/ Newton basis method:


How many vectors in the Newton basis? Find each vectors.

c/ Hat basis method:


(i) Sketch the shape of a general Λk (x) (for any data such that x0 < x1 < ... < xk−1 < xk < xk+1 < .... <
xn ). Give its equation (should be on 4 intervals)
(ii) Let a = 3.3. On which interval should we work to find p(a)? (direct answer).
What is the interpolant polynomial on this interval? What is the value of p(a)?
4

EXERCISE 5: Newton method of Chapter 1 then generalized to non-linear system:

a/ Let the function f (x) = x3 + x − 3 = 0


(i) Newton method formula: xn+1 = ....
(ii) Let x1 = 1.4. Calculate x2 and x3 with Newton method. Keep 4 decimal figures.
(iii) Draw clearly Newton Method for 2 iterations, x1 = 1.4 (twice - so you find x2 and x3 - no explanation,
just draw clearly).

b/ Let the system : 


 f1 (x) = 7x31 + 2x42 + 3x3 − 20 = 0
f2 (x) = 2x21 + 4x42 + x23 =0
f3 (x) = 3x31 + x2 + 2x23 − 9 =0

(i) Let the Jacobian matrix for a linear system with n functions and n unknown defined by :
 ∂f1 ∂f1 ∂f1 
∂x1 ∂x2 ... ∂x n
 : : : : 
F’(~x) = 
 
: : : : 
∂fn ∂fn ∂fn
∂x1 ∂x2 ... ∂x n
Write the Jacobian matrix F’(x) of the system we want to solve.

(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.

You might also like