Mathematics 371–Numerical Analysis Take-Home Final Exam December 3, 2001

Ground Rules

This is an open book, open notes, open Swords 219 lab, open 335 Swords exam. If you consult library books, the Internet, etc. in preparing your solutions, please footnote your sources (give full URL’s for any web sites you use). You must work independently on these problems; you may not consult with other faculty members, etc. You may (and should) use Maple for any needed calculations. When you submit your solutions, please write out a short statement that you have abided by these rules, and sign it.

Due: No later than 5:00pm on Wednesday, December 12.

I. The current I in an electrical circuit (as a function of time) is measured experimentally as follows:

\begin{matrix}t & 1.0 & 1.1 & 1.2 & 1.3 & 1.4 \\ I(t) & 28.2277 & 7.2428 & −5.9908 & 4.5260 & .29122 \end{matrix}

A) (5) Find the interpolating polynomial of degree 4 or less for these five data points,

and use it to estimate I′(1.25). B) (5) Use an appropriate cubic spline interpolating function to approximate I′(1.25). C) (5) Compute an approximation to I′(1.25) by 3-point centered differences and extrap-

olation. D) (5) Discuss the possible sources of error in each computation. If you can identify one

method that is giving the best results, say why.

II. Values of the Bessel function of order zero, denoted J_{0}(x), can be computed by integration:

J_{0}(x) = \frac{1}{π} ∫_{0}^{π} cos(x sin(t))dt.

A) (10) Using the error formula for Simpson’s Rule, determine how many subdivisions are needed to compute J_{0}(0.6) to 7 decimal place accuracy. Do the computation. (Your answer to 7 decimal places should be 0.9120049.)

B) (10) Approximate J_{0}(0.6) to 7 decimal place accuracy using Romberg integration (start with h = \frac{π}{2} –two subintervals, and continue until no change is observed in the first 7 decimals).

C) (10) Now, approximate J_{0}(0.6) to 7 decimal place accuracy using Gaussian Quadrature. Use the 5 point formula (with the roots and the weights from the text or from Lab 4). You may need to subdivide the interval [0, π] and apply GQ on each subinterval. Which of the three methods (Simpson, Romberg, or Gauss) is most efficient in terms of the number of evaluations of f(t) = cos(0.6 sin(t)) that must be carried out in order to obtain 7 decimal place accuracy?

III. (Gauss-Laguerre Quadrature) The Laguerre polynomials are defined by the following recurrence relation: L_{0}(x) = 1, L_{1}(x) = 1 − x and for n ≥ 1:

L_{n+1}(x) = (1 + 2n − x)L_{n}(x) − n^{2}L_{n−1}(x)

A) (5) Compute L_{2}, L_{3}, L_{4} from the recurrence relation. B) (5) Show that

⟨f, g⟩ = ∫_{0}^{∞} f(x)g(x)e^{−x}dx

defines an inner product on the vector space of continuous functions on [0, ∞) which grow no faster than some power x^{n} as x → ∞. (Note: this condition is needed to make the improper integral in the definition converge!)

C) (5) Show that {L_{0}, L_{1}, L_{2}, L_{3}} is an orthogonal set with respect to the inner product from part B by computing the inner products. (The same is true for the whole collection {L_{k} : k ≥ 0}.)

Our general Gaussian Quadrature theorem applies to give numerical approximation methods:

∫_{0}^{∞} f(x)e^{−x}dx ≐ ∑_{i=1}^{n} c_{i}f(x_{i})

where the x_{i} are the roots of a the Laguerre polynomial L_{n} and the c_{i} are appropriate weights. Here is a listing of the roots and weights for the two, three, and four point Gauss-Laguerre quadrature formulas:

2 point:  3 point:
x_{i}  0.585786 3.414214  x_{i}  0.415775 2.294280 6.289945
c_{i}  0.853553 0.146447  c_{i}  0.711093 0.278518 0.010389

4 point:

x_{i}  0.322548 1.745761 4.536620 9.395071
c_{i}  0.603154 0.357419 0.038888 0.000539

D) (5) Verify the given roots for the polynomial L_{4} by using Newton-Raphson iteration

on the equation L_{4}(x) = 0 (not the fsolve command in Maple). E) (5) Use the two, three, and four-point Gauss-Laguerre quadrature formulas to approx-

imate

∫_{0}^{∞} e^{−x}(x^{5} − 2x^{3})dx

Note: f(x) = x^{5} − 2x^{3} here. (Any guess as to the exact value?)

Extra credit – Evaluate the integral exactly and compare to the Gauss-Laguerre approximations.

IV. In this problem, we will examine a simple example of a class of ODE that present severe problems for numerical methods.

A) (10) Solve the initial value problem y′ = −20y; y(0) = 1 with h = .2 for 0 ≤ t ≤ 3.0 using the “classical” 4^{th} order Runge-Kutta method, and compare to the values of the exact solution y(t) = e^{−20t}. (Your results should be terrible.) We need to understand why this happened–it’s not just a round-off problem!

B) (5) From class on November 28, we know that the Runge-Kutta method applied to the equation y′ = λy with a step size of h yields approximate solution values:

(1)  w_{i} = (1 + hλ + \frac{1}{2}(hλ)^{2} + \frac{1}{6}(hλ)^{3} + \frac{1}{24}(hλ)^{4}) w_{i−1}

Let Q(hλ) be the term in parentheses on the right side of (1)–the “multiplier” in going from w_{i−1} to w_{i}. With h = .1, λ = −20, what is the value of Q(hλ)? How is this related to the results you got in part A?

C) (10) How small should h be taken so that w_{i} is at least decreasing in absolute value as i increases? Use one such h, apply Runge-Kutta again, and compare to the exact solution.

Have a peaceful and joyous holiday season!