3 Hproblems
3 Hproblems
3 Hproblems
1. Solve the following differential equations, in each case subject to the initial condition y(0) = 1.
dy y dy dy y
= 3t + , = y − t, = −3t − .
dt 2 dt dt 2
d2 y d3 y
(a) + y = 4, (b) + y 2 = 1, (c) ty 00 (t) + y 0 (t) + ty(t) = 0.
dt2 dt3
y 0 = f (t, y) a ≤ t ≤ b, y(a) = α
y n+1 = e
e y n + hf (tn , e
y n ) + Rn+1
where Rn+1 is the rounding error introduced at the (n + 1)-th step. The global error at tn , in
the resulting approximation, is e en = y(tn ) − e
y n . Prove that if f satisfies a Lipschitz condition,
with Lipschitz constant L, and if in addition ky 00 (t)k ≤ M for a ≤ t ≤ b and kRn k ≤ R for
n = 1, 2, . . . , N , then
1 hM R
ke
en k ≤ ke
e0 k exp(b − a)L + + [exp(b − a)L − 1]
L 2 h
where e e0 = α − e
e0 is the error in the starting value, i.e., e y0 .
8. Apply Euler’s method to the initial-value problem dy/dt = t − y, y(0) = 2, to estimate y(0.1) and
y(0.2). Try steplengths 0.2, 0.1 and 0.05. Compare with the exact solution.
9. Let y(t) be the solution of an initial-value problem for the scalar differential equation y 0 = f (t, y).
By using integration by parts on
Z tn+1
(t − tn+1 )(t − tn )y (3) (t) dt,
tn
y 0 = cos(y 2 ), y(0) = 0,
where 0 ≤ θ ≤ 1. Show that its order is 1 except when θ = 1/2, in which case it is 2.
13. Show that the implicit one-step method defined by
with L0 = 2 and L1 = 1. Solve the difference equation to find Ln . Write down the first six Lucas
numbers.
16. Find the solution of 2yn+2 + 3yn+1 − 2yn = 0, n = 0, 1.2, ..., under the following conditions
(a) y0 = 0, y1 = 1,
(b) y0 = 1, yn → 0 as n → ∞.
17. Find the solution of the difference equation
with I0 (φ) = 0 and I1 (φ) = π. Solve the difference equation to find In (φ).
21. Given that y 0 = sin(ty) and y(0) = 1, estimate y(0.2) by using a second-order Runge-Kutta formula,
(a) with steplength h = 0.2 and (b) with h = 0.1.
22. Write the theta method of Problem 12 as a Runge-Kutta method.
23. Write the implicit mid-point rule
y n+1 = y n + hf tn + 12 h, 12 (y n + y n+1 ) ,
0
1 1
2 2
3 3
4 0 4
2 1 4
9 3 9
corresponds to a third-order Runge-Kutta method. Find its principal error coefficients and confirm
that two of them are zero. [This is the method used to advance the computation in ode23.]
y n+1 = y n + h(b1 k 1 + b2 k 2 ),
with
c1 a11 a12
c2 a21 a22
b1 b2
Write down the conditions, including the row sum conditions, which ensure that the order is ≥ 3.
Find the method with a11 = 0 = a12 . What is its order? Calculate its principal error coefficients.
26. Write down the order conditions for a four-stage explicit Runge-Kutta method of fourth order.
From the table of error coefficients for Runge-Kutta methods show that the simplifying conditions
4
X
bi aij = bj (1 − cj ), j = 2, 3, 4,
i=1
Hence show that three of the conditions for fourth order may be replaced by simpler equations.
The simplifying conditions also reduce the number of independent principal error coefficients; show
that, for a fourth-order method,
(5) (5) (5) (5) (5) (5) (5) (5)
τ5 = −4τ1 , τ7 = −2τ2 , τ8 = −τ4 , and τ9 = −τ6 .
0
1 1
2 2
1 1
2 0 2
1 0 0 1
1 1 1 1
6 3 3 6
27. Consider the order conditions for three-stage explicit Runge-Kutta methods of third order with
c3 = c2 , in the usual notation. Show that there is a one-parameter family of such methods, with b3
as the free parameter, and that the principal error coefficients are unaffected by the choice of b3 .
Calculate q
(4) (4) (4) (4) (4)
A = (τ1 )2 + (τ2 )2 + (τ3 )2 + (τ4 )2 .
Show that when b3 = b2 the Butcher table for the method is
0
2 2
3 3
2 2
3 0 3
1 3 3
4 8 8
28. Use the convergence theorem for one-step methods to prove that every consistent explicit Runge-
Kutta method is convergent.
29. By integrating the appropriate interpolating polynomial derive the three-step Adams-Bashforth
formula
1
yn+1 = yn + 12 h(23fn − 16fn−1 + 5fn−2 )
and find its order and error constant.
30. The two-step method yn+1 − yn−1 = 2hf (tn , yn ), tn = t0 + nh, is used to solve the scalar equation
y 0 = f (t, y). If en = y(tn ) − yn show that
h3
|en+1 | ≤ |en−1 | + 2hk|en | + M
3
where |∂f /∂y| ≤ k and |y 000 (t)| ≤ M on [t0 , tn ]. Deduce that if y0 = y(t0 ) then
h2 M n 1
|en | < (θ − 1) where θ = hk + (1 + h2 k 2 ) 2
6k
provided that |y1 − y(t1 )| ≤ ε, and write down a suitable value of ε.
31. Find the order and error constant of each of the following multistep formulae
3h
(i) yn+1 = yn−2 + (fn+1 + 3fn + 3fn−1 + fn−2 )
8
1 1 h
(ii) yn+1 = yn + yn−1 + (119fn − 99fn−1 + 69fn−2 − 17fn−3 ).
2 2 48
32. Find the linear two-step method of highest order. Find also the leading term in its local truncation
error.
33. Find the exact solution of the initial-value problem y 0 = y − t2 , y(0) = 2. Use the following three
different methods to approximate y(1):
(a) the second-order Taylor method with steplength 0.5,
(b) the two-step Adams-Bashforth method with h = 0.5, and with y(0) and y(0.5) as starting
values,
(c) a second-order Runge-Kutta method with h = 0.5.
You should find that the first two methods give the exact value of y(1); explain this, and whatever
you find for the third method.
34. For the initial-value problem y 0 = 1 − 2ty, y(0) = 0, use the formulae (Adams methods)
h
yn+1 = yn + (23fn − 16fn−1 + 5fn−2 )
12
h
yn+1 = yn + (5fn+1 + 8fn − fn−1 )
12
as a predictor-corrector pair with steplength h = 0.1, to estimate y(0.3) as accurately as you can,
given that, to five decimal places, y(0.1) = 0.09934 and y(0.2) = 0.19475. Estimate the local
truncation error (a) by Milne’s device and (b) by using the three-step Adams-Moulton formula as
corrector.
35. Use Milne’s device to construct formulae which estimate the local truncation errors of predictor-
corrector methods based on Adams-Bashforth predictors and Adams-Moulton correctors of orders
2, 3 and 4. The Adams formulae and their error constants can be found in Burden and Faires,
Section 5.6.
36. Find the order of each of the methods in the embedded formula pair corresponding to the following
Butcher table.
0
1 1
3 3
1 −1 2
1 1
2 0 2
3 1
0 4 4
37. Show that every s-stage explicit Runge-Kutta method of order s, when applied to y 0 = λy, where
λ is a complex constant, gives
s
X zi
y1 = y0 , z = hλ.
i=0
i!
Hint. Show first that y1 /y0 must be a polynomial in z of degree s and then think about what it
means to say that the order is s.
38. Prove that all explicit 2-stage Runge-Kutta methods of second order have the same region of linear
stability, and find the corresponding interval of linear stability.
39. For each of the following sets of simultaneous equations, what restriction does the requirement of
linear stability impose on the steplength used to solve them by Euler’s method?
dy dz
(a) = −8y + 7z, = 42y − 43z
dt dt
dy dz
(b) = −12.5y + 6.3z + f1 (t), = 5y − 2.4z + f2 (t)
dt dt
where f1 and f2 are given functions.
40. For the equations u0 = −10u + 9v, v 0 = 10u − 11v, what is the largest steplength which could be
used with a 4-stage fourth-order Runge-Kutta method for which the interval of linear stability is
(−2.78, 0)?
41. Prove that the solution of the initial-value problem
dy
= − sin(ty 3 ), y(0) = 1
dt
satisfies the inequality 0 < y(t) ≤ 1 for all t ∈ [0, 1]. What condition does the requirement of linear
stability impose on the steplength if this problem is to be solved by a numerical method for which
the interval of linear stability is (−2.78, 0)?
42. Show that the following two-stage Runge-Kutta method has order 1.
y n+1 = y n + hk 2 ,
k 1 = f (tn , y n ), k 2 = f (tn + 18 h, y n + 18 hk 1 ).
Find its stability polynomial and hence its interval of linear stability.
[In this case the parameters of the Runge-Kutta method were chosen to give a large stability interval
rather than the highest order possible.]
43. Prove that the method specified by the following table is A-stable, and find its order.
1
0 2 − 21
1
1 2 − 21
1 1
2 2
44. Find the order of the implicit Runge-Kutta method corresponding to the Butcher table
1 5 1
3 12 − 12
3 1
1 4 4
3 1
4 4
Write down the equations which would have to be solved at each step in applying this method to
a scalar differential equation of the form y 0 = f (t, y). What if we had a system of three differential
equations?
Prove that the stability function of the method is
1 + 31 z
R(z) = .
1 − 23 z + 61 z 2
k 1 = f (tn , y n ), k 2 = f (tn + 41 h, y n + 41 hk 1 )
67 189 729
k 3 = f (tn + 40 h, y n − 800 hk 1 + 800 hk 2 ).
Find its stability polynomial. Use the program bdlocus to investigate the region of linear stability
of this method.
47. The following rational functions are the stability functions of implicit one-step methods. Which of
them correspond to A-stable methods? Any such functions are said to be A-acceptable. Which of
the functions are L-acceptable?
1 + 2z/3 + z 2 /6 1 1 + z/2 + z 2 /12
(a) , (b) , (c) ,
1 − z/3 1 − z + z 2 /2 1 − z/2 + z 2 /12
h
yn+2 − (1 + a)yn+1 + ayn = [(3 − a)fn+1 − (1 + a)fn ]
2
where −1 ≤ a < 1. Show that for real h̄ the roots of the equation π(r, h̄) = 0 are real and distinct.
Find the interval of linear stability of the method. Why is the restriction −1 ≤ a < 1 imposed?
50. The regions of linear stabilty of Adams-Moulton methods are plotted on page 72 of Lambert (1991).
Find the approximate maximum steplength dictated by the requirement of linear stability when
the 3-step Adams-Moulton method is applied to the initial-value problem,
ρ(ζ) = ζ 3 + 41 ζ 2 − 12 ζ − 34 .
Prove that the method is zero-stable and find the leading term in its local truncation error.
The interval of linear stability of a particular linear multistep method (−6, 0). If that method is
used to solve the initial-value problem
dy
= −56y + 80z, y(0) = 2,
dt
dz
= 44y − 65z, z(0) = 1,
dt
what restriction is imposed on the steplength by the requirement of linear stability?
52. Suppose the trapezium rule is used to integrate from tn to tn +h in one step to get an approximation
a
yn+1 for y(tn+1 ), and then is used to integrate in two steps of size h/2 to get a second approximation
b
yn+1 . Finally we take
yn+1 = 13 (4yn+1
b a
− yn+1 ).
Is this method A-stable?