Name______

Math 44 – Differential Equations

Monday, March 19, 2007

Problem Set 5

(let’s call the Laplace exercise #4)

Due at start of class Monday, April 23, 2007. You may work together. Turn in separate paper solutions, but I’ll accept spreadsheets from teams of up to three people.

Objectives for Chapter 7, numerical solutions…

1. Understand how the usual numerical methods for y’ = f( t, y) are generalizations of numerical integration methods.

y(t0) = y0 

y’(t) = f(t)  --can be integrated numerically

y’(t) = f(t, y) 

-- can still be integrated

numerically, but with care, since

the integrand depends on y itself

2. Be able to use Euler’s method to estimate y(t), given y’=f(t, y) and y(t0) = y0.

Euler:Start with t0, y0, and the function f. Chose Δt.

For each k = 0, 1, 2, …(change Δt at each step if you feel like it)

tk+1 = tk + Δt

m = f ( tk, yk)(slope at left endpoint)

yk+1 = yk + m Δt

3. Be able to use a second-order (or third-order, if you’re ambitious) Euler method for the same purpose.

Second-order Euler:Start with t0, y0, and the function f. Chose Δt.

For each k = 0, 1, 2, …(change Δt at each step if you feel like it)

tk+1 = tk + Δt

m = f ( tk, yk )(first derivative at left endpoint)

s = ft(tk, yk) + fy(tk, yk) m

(second derivative at left endpoint –

computed from tk and yk )

yk+1 = yk + m Δt + (1/2) s (Δt)2

(second-order Taylor expansion…

add (1/6) (third derivative) (Δt)3 if you like)

4. Be able to use the “improved Euler method” (predictor-corrector).

Improved Euler: Start with t0, y0, and the function f. Chose Δt.

For each k = 0, 1, 2, …(change Δt at each step if you feel like it)

tk+1= tk + Δt

m = f(tk, yk)(slope at left endpoint)

= yk + m Δt(“predicted” y at right endpoint)

n = f(tk+1, )(estimated slope at right endpoint)

yk+1 = yk + Δt

(“corrected” y at right endpoint…looks

like trapezoid method)

5. Have some experience with the 4-th order Runge-Kutta method.

Runge-Kutta: Start with t0, y0, and the function f. Chose Δt.

For each k = 0, 1, 2, …(change Δt at each step if you feel like it)

tk+1= tk + Δt

tk+1/2 = tk + Δt/2(time at midpoint)

m = f(tk, yk)(slope at left endpoint)

= yk + m Δt/2 (first guess at y for midpoint)

n = f( tk+1/2, )(first guess at slope at midpoint)

= yk + n Δt/2 (second guess at y for midpoint)

q = f( tk+1/2, )(second guess at slope at midpoint)

= yk + q Δt(predicted y at right endpoint)

p = f( tk+1, )(estimate of slope at right endpoint)

yk+1 = yk + Δt

(looks like Simpson’s method)

6. Understand why Runge-Kutta is called a “fourth-order” method and why that’s good.

(For any particular problem, the error in computing y(t) is roughly proportional

to (Δt)4. The constant of proportionality depends on the problem.)

(Euler is first-order. Second-order Euler and Improved Euler are 2nd-order.)

7. Know how to use these methods to solve a system, Y’ = F ( t, Y).

(Same as usual, except that all of the y’s and all of the slopes

are vectors. For the Taylor-series method, the derivatives can

get very complicated.)

Exercises to turn in:

Most of the exercises refer to the equation

y’(t) = e-t – y,

with the initial condition y(0) = 0. It happens that the solution to this equation is

y(t) = te-t. Please don’t use that solution for your answers, but feel free to use it for checking and testing.

These exercises require extensive calculation. A spreadsheet would help. Please give answers to

6 digits past the decimal point, or as far as it takes to illustrate what is happening.

1. Use Euler’s method to estimate y(1), with each of the following step sizes…

N = 1, Δt = 1

N = 2, Δt = 1/2

N = 4, Δt = 1/4

N = 8, Δt = 1/8

2. Use the second-order Euler method to estimate y(1), with each of the following step sizes…

N = 1, Δt = 1

N = 2, Δt = 1/2

3. Use the “improved Euler” method to estimate y(1), with each of the following step sizes… N = 1, Δt = 1

N = 2, Δt = 1/2

N = 4, Δt = 1/4

N = 8, Δt = 1/8

4. Use 4-th-order Runge-Kutta to estimate y(1), with each of the following step sizes… N = 1, Δt = 1

N = 2, Δt = 1/2

N = 4, Δt = 1/4

5. Using the fact that y(1) = e-1 ≈ 0.36787944, verify that the errors from the Runge-Kutta method are roughly proportional to (Δt)4. (Or are they?)

6. Now consider the second-order equation y’’ + y = 0, subject to the initial conditions

y(0) = 1, y’(0) = 0. [ The solution is y(t) = cos t, but pretend you don’t notice that. ]

Write the equation as a system, with v = y’:

.

Using any numerical method you like, but with at least two time-steps, estimate y(/2).

(end)

1