Docsity

Practice Final Exam Problems - Computational Methods | AMSC 460, Exams of Mathematics

Toggle sidebar
bg1
AMSC/CMSC 460 Fall ’05 Practice Final Problems (Osborn)
1. Suppose x∗is the computed solution of Ax=bobtained using Gaussian
elimination with partial pivoting. Assume the computation is done with
MATLAB, whose machine epsilon is eps. What is the quality of the
computed solution, x∗? Specifically, how large would you expect
kb−Axkand kx−x∗k
to be? (k·k here is any vector norm; the answers to these questions does
not depend strongly on the particular norm.) How many correct digits
would you expect x∗to have?
2. Suppose f(x) has three continuous derivatives, and we wish to approxi-
mate f′(a) by
f(a+h)−f(a)
hor f(a+h)−f(a−h)
2h
for small h. Assess the error in these approximations, i.e., estimate the
sizes of
f′(a)−f(a+h)−f(a)
hand f′(a)−f(a+h)−f(a−h)
2h
in term of h. Explain your analysis, mentioning any theorems you use.
3. (a) State Euler’s Method for the approximate solution of the initial value
problem dy
dt =f(t, y), y(t0) = y0.(1)
(b) Consider the specific initial value problem
dy
dt =t/y, y(0) = 1,
whose solution is y(t) = √t2+ 1.
i. Let h= 0.1, and approximate y(0.3) using the Euler Method
with three steps.
ii. Let h= 0.05, and approximate y(0.3) using the Euler Method
with six steps.
iii. The Global Error (the error at t= 0.3 in this example) for the
Euler Method satisfies
Global Error ≤C h, (2)
for some constant S. Compute the Global Errors in (i) and
(ii), and verify that (3) correct for this example, and find an
approximate value for C.
1
pf3
pf4

Partial preview of the text

Download Practice Final Exam Problems - Computational Methods | AMSC 460 and more Exams Mathematics in PDF only on Docsity!

AMSC/CMSC 460 Fall ’05 Practice Final Problems (Osborn)

  1. Suppose x∗ is the computed solution of Ax = b obtained using Gaussian elimination with partial pivoting. Assume the computation is done with MATLAB, whose machine epsilon is eps. What is the quality of the computed solution, x∗? Specifically, how large would you expect

‖b − Ax‖ and ‖x − x∗‖

to be? (‖ · ‖ here is any vector norm; the answers to these questions does not depend strongly on the particular norm.) How many correct digits would you expect x∗ to have?

  1. Suppose f (x) has three continuous derivatives, and we wish to approxi- mate f ′(a) by

f (a + h) − f (a) h

or

f (a + h) − f (a − h) 2 h for small h. Assess the error in these approximations, i.e., estimate the sizes of

f ′(a) −

f (a + h) − f (a) h and f ′(a) −

f (a + h) − f (a − h) 2 h in term of h. Explain your analysis, mentioning any theorems you use.

  1. (a) State Euler’s Method for the approximate solution of the initial value problem dy dt

= f (t, y), y(t 0 ) = y 0. (1)

(b) Consider the specific initial value problem

dy dt

= t/y, y(0) = 1,

whose solution is y(t) =

t^2 + 1. i. Let h = 0.1, and approximate y(0.3) using the Euler Method with three steps. ii. Let h = 0.05, and approximate y(0.3) using the Euler Method with six steps. iii. The Global Error (the error at t = 0.3 in this example) for the Euler Method satisfies

Global Error ≤ Ch, (2) for some constant S. Compute the Global Errors in (i) and (ii), and verify that (3) correct for this example, and find an approximate value for C.

  1. The goals in this problem is to prove estimate (3) for the initial value problem, dy dt

= f (t), 0 ≤ t ≤ 1 y(0) = 0,

which is a special case of (2). Let h = 1/n, tk = kh, k = 1, · · · , n, let yk be the Euler approximation at tk, and view yk as an approximation to y(tk) : y(tk) ≈ yk. k = 0, 1 , · · · , n.

(a) Let ek = y(tk) − yk be the error at the kth mesh point. Show that

y(tk+1) = y(tk)+hf (tk)+

h^2 y′′(ξk) 2

, for some ξk betweentk and tk− 1 ,

and then show that

|ek+1| ≤ |ek| +

h^2 M 2 , k = 0, 1 , · · · , n, (3)

where M = max 0 ≤t≤ 1

|y′′(t)|.

(b) Use (4) to show that

|ek| ≤

M h 2 , for k = 0, 1 , · · · , n.

  1. Consider the following points in the plane:

(x 1 , y 1 ) = (1, 3 .2), (x 2 , y 2 ) = (2, 5 .2), (x 3 , y 3 ) = (3, 6 .85), (x 4 , y 4 ) = (4, 8 .7), (x 5 , y 5 ) = (5, 11 .1).

Find the line that is the best fit to these points in the least-squares sense:

(a) Using the Normal Equations (b) Using the backslash operator (c) Using polyfit.

  1. Consider the least-squares problem

Xβ ≈ y, (4)

where the design matrix X is m × n and the data vector y is m × 1 (a column)

(a) State the QR factorization result (full version).

  1. Suppose f ′′(x) is continuous on the interval (a, b), that x∗ is a zero of f (x) in (a, b), and that f ′(x∗) 6 = 0. If the initial approximation x 0 is close enough to x∗, then the Newton iterates xn converge to x∗. Use the Taylor Formula to give a careful proof that Newton’s Method converges quadrat- ically: en+1 = O(e^2 n). Note: You are asked just to prove the quadratic convergence; you don’t have to prove that limn→∞ xn = x∗.