Department of Mechanical and Industrial Engineering
ENGR 391 Numerical methods
Midterm exam
Read carefully all three questions
Write all the steps you need to find the solution
Please do not write in red (colour used for correction)
Exercise 1 – General understanding (2 marks)
a) Consider following polynomial:
f x x2 2x 1
Why is the false position algorithm not applicable to this function?
b) If you would have a computer able to computer with an infinite number of significant
digits, there would be no ill-conditioned problems. True or false ? Justify or explain your
answer.
Exercise 2 – System of equations (4 marks)
Consider following equations
2x 2 y z 9
x 2y 0
y z 4
a) Write the system in Matrix form
b) Decompose the A matrix in LU
Show the different steps of your calculations.
Hint: Check your answers at each step!
c) Solve the system using your LU decomposition
Show the different steps of your calculations.
Hint: Check your answers at each step!
Exercise 3 – Fix step iteration (4 marks)
Consider following equation:
(1) x 2 3x 1 0
and following two functions:
(2) g1 x
3
1 2
x 1 and g 2 x 3
1
x
a) Prove that (1) is equivalent to g1 x x and as well equivalent to g 2 x x
b) Plot the functions g1 x and g 2 x for x between 0 and 5.
y y
x x
c) Considering your figures from b), which one of the two functions g1 x and g 2 x could
you use to solve equation (1) using the fix point iteration method starting with xo 1.5 ?
Justify your answer by showing your iterations on your plots from figure b).
d) For the function that you have chosen in c), solve equation (1) using the fix point iteration
until you reach an answer with 4 significant digits ( xo 1.5 ).
Present your calculations in a table like :
i xi g xi1 Error estimation
0 1.5
Answer: