Exam 190424
Exam 190424
Exam 190424
2019–04–24
Exam duration 8:00–12:00. In order to pass, a minimum of 15 points is
required on the exam. The (preliminary) grade requirements are
grade 3 ≥ 15 p, grade 4 ≥ 21 p and grade 5 ≥ 26 p.
You are allowed to use a pocket calculator, but no other material of any
kind. Please answer the problems in Swedish or English.
Problems
1. Consider the linear system Ax = b, where the matrix A can be factorized
as P A = LU with
1 0 0 1 0 0 2 1 3
P = 0 0 1 , L = −1 1 0 and U = 0 1 1 .
0 1 0 0 1 1 0 0 2
x2 − x − 2 = 0, for x ≥ 0.
On the interval [1, 3] we have the solution x∗ = 2. Which one of the two
formulations will give rise to a convergent fixed point iteration for the starting
value x0 = 2.5, and why is this the case? (3p)
1
4. We would like to fit a straight line f (x) = c0 + c1 x to the data below by
using the least squares method.
x -1 0 1 2
y -1 0 0 2
b) How does the error of the midpoint rule decrease as the number of
intervals N tends to infinity? (1p)
2
8. Consider the following Matlab program:
lambda = -121;
N = 10;
u(1) = 2;
dt = 1/N;
for n = 1:N
u(n+1) = u(n) + dt*(lambda*u(n));
end
c) Modify the code (without changing the problem being solved) so that
the numerical approximation is improved. (1p)
a) Write out the formula for the Jacobi iterates xn for the problem at
hand. (2p)
Lycka till!