0% found this document useful (0 votes)
16 views

Exam 170824

The document is an exam for a numerical analysis course. It contains 9 problems testing various numerical methods topics, including matrix computations, linear and nonlinear systems of equations, interpolation, integration, and initial value problems.

Uploaded by

skills
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Exam 170824

The document is an exam for a numerical analysis course. It contains 9 problems testing various numerical methods topics, including matrix computations, linear and nonlinear systems of equations, interpolation, integration, and initial value problems.

Uploaded by

skills
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Exam in Numerical Analysis FMN050, 2017–08–24

Exam duration 14:00–18: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. Let
   
3 0 −2 1 2 0
A =  −1 0 1 , where A−1 =  0 1 1 .
1 1 −1 1 3 0

Compute the condition number of the matrix A with respect to the 1-norm.
How large can the solution’s relative error kδxk1 /kxk1 be when solving
Ax = b with the data error kδbk1 /kbk1 = 0.2? (2p)

2. Consider the linear system Ax = b, where the matrix A can be factorized


as P A = LU with
     
0 1 0 1 0 0 2 5 −2
P =  0 0 1  , L =  −1 1 0  and U =  0 4 0 .
1 0 0 0 1/2 1 0 0 −1

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


one forward and one backward substitution. (3p)

3. We would like to approximate the intersections of the circle x2 + y 2 = 2


and the curve y = x3 , by employing Newton’s method.

a) Formulate the problem as a system of nonlinear equations of the form


f (x, y) = 0. How many solutions are there? (1p)

b) Construct the Jacobian matrix f 0 (x, y). (1p)

c) Introduce a suitable notation and write out Newton’s method for the
problem at hand. (2p)

1
4. Construct the Newton interpolation polynomial that interpolates the data
below. (3p)

x 0 1 2
y 1 -1 2

5. We would like to fit a straight line y(x) = c0 + c1 x to the data below.

x 0 1 2 4
y 1 0 -1 -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)

6. Consider the integral Z 1


x2 (x + 1) dx.
0

a) Approximate the integral by employing Simpson’s rule and dividing


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

b) Why is the approximation error equal to zero when applying Simpson’s


rule to the integral above? (1p)

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


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


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


and discretize the problem by a standard second order method, i.e., y 00 (x)
should be discretized as in Project 2. 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 equations, the grid, the step
size ∆x, etc., must be clearly stated. (4p)

2
8. Consider the initial value problem

y 0 (t) = −1000 y(t), t > 0,

with the initial value y(0) = 2.

a) Write down the implicit Euler discretization of the initial value prob-
lem. (1p)

b) Derive for which step sizes ∆t your discretization is stable. (2p)

c) Explain what is meant by the statement “the implicit Euler method


has a convergence order of p = 1”. (1p)

d) State an implicit discretization of the initial value problem that has a


convergence order of p = 2. (1p)

9. Consider the Matlab code below.

A = [1 3 ; 2 2]
y = [-1 ; 1]
n = 12
for k = 1:n
yh = y/norm(y,2)
y = A*yh
sigma = yh’*y
end
sigma_out = sigma
y_out = y/norm(y,2)

Which numerical method is implemented in the code? What does sigma_out


and y_out approximate, respectively? (3p)

Lycka till!

You might also like