Exam 190424

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Exam in Numerical Analysis FMNF10/FMN050

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

Solve Ax = b, with b = (2, 1, 0)T , by first pivoting and thereafter performing


one forward and one backward substitution. (2p)

2. The currents x = (I1 , I2 , I3 )T in an electric circuit satisfy the linear system


Ax = b, where b is given by the voltages in the circuit and the 3 × 3-matrix
A satisfies
kAk∞ = 2 and kA−1 k∞ = 5.
You have access to voltage measurements, which unfortunately have a sys-
tematic measurement error. The correct values are b = (2.0, 0.13, 1.1)T , but
you are given b + δb = (2.2, 0.10, 0.90)T . How large can the currents’ relative
error kδxk∞ /kxk∞ be due to the error in the voltage measurements? (2p)

3. Consider the equation

x2 − x − 2 = 0, for x ≥ 0.

The equation can be reformulated in several ways, e.g.,



x = x2 − 2 or x = x + 2.

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

a) Derive the overdetermined system Ac ≈ b which the coefficients c =


(c0 , c1 )T need to fulfill. (1p)

b) Approximate a solution to the overdetermined system by the least


squares method. (2p)

5. Construct the Lagrange interpolation polynomial that interpolates the


data in Problem 4. (3p)

6. Consider the integral Z 1


(x + 1)x2 dx.
0

a) Approximate the integral by employing the midpoint rule and dividing


the interval [0, 1] into N = 3 equally sized intervals. (2p)

b) How does the error of the midpoint rule decrease as the number of
intervals N tends to infinity? (1p)

c) How large is the approximation error if we instead apply Simpson’s


rule to the integral above, with N = 3 equally sized intervals? (1p)

7. We want to approximate a solution to the two-point boundary value


problem
y 00 (x) + y 0 (x) + 1 + y(x)2 = 0,
p

with boundary values y(0) = 0 and y(1) = 1. Introduce a suitable notation


and discretize the problem by a standard second order method. Construct
the system of nonlinear equations that have to be solved, and make sure to
include the boundary conditions. All details, such as the number of equa-
tions, the grid, the step size ∆x, etc., must be clearly stated. (4p)

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

a) Which numerical method is implemented in the code, and which prob-


lem does it solve? (2p)

b) If we would run the code it would give a very disappointing result.


Explain why this is the case. (2p)

c) Modify the code (without changing the problem being solved) so that
the numerical approximation is improved. (1p)

9. We want to approximate the solution to the linear system Ax = b, with


b = (1, 1, 0)T and  
11 1 0
A =  1 10 1  ,
0 0 10
by employing the Jacobi method.

a) Write out the formula for the Jacobi iterates xn for the problem at
hand. (2p)

b) Prove that for any starting vector x0 the Jacobi approximation xn


converges to the exact solution x of the linear system Ax = b in the
1-norm, i.e., kxn − xk1 → 0 as n → ∞. (2p)

Lycka till!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy