3 Hproblems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Solution of ODEs III/IV MATH3081/4221 Problem Sheet

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

2. Reduce each of the following equations to a normal system of first order.

d2 y d3 y
(a) + y = 4, (b) + y 2 = 1, (c) ty 00 (t) + y 0 (t) + ty(t) = 0.
dt2 dt3

3. Given the Volterra integral equation


Z t
y(t) = cos(τ + y(τ )) dτ + et ,
0

find, by differentiation, an initial-value problem which has the same solution.


4. In which domains of the xy-plane do the following functions satisfy a Lipschitz condition in y?

(a) f (x, y) = 1 + y 2 (b) f (x, y) = 1 + x2


1 x
(c) f (x, y) = (d) f (x, y) = .
1 + y2 1 + y2
5. Airy’s equation is y 00 = ty. Express this linear equation as a first-order system in standard form.
What is the Jacobian matrix J(t)? Given that the interval of interest is 0 ≤ a ≤ t ≤ b, find a
Lipschitz constant when the ∞-norm is used and when 2-norm is used. Use the subordinate matrix
norm in the first case and the Frobenius matrix norm in the second.
6. By applying Euler’s method to the initial-value problem dy/dt = y 1/3 , y(0) = 0, show that the
resulting numerical approximation does not converge to the solution y = (2t/3)3/2 as the steplength
tends to zero. Explain why this does not contradict the theorem on the convergence of Euler’s
method.
7. Euler’s method for the initial-value problem

y 0 = f (t, y) a ≤ t ≤ b, y(a) = α

is based on the formula

y n+1 = y n + hf (tn , y n ), n = 0, 1, . . . , N − 1, N = (b − a)/h,

with tn = a + nh. In practice there are rounding errors, so we actually compute

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

or otherwise, show that the trapezium rule


h
yn+1 − yn = [f (tn , yn ) + f (tn+1 , yn+1 )],
2
1 3 (3)
with h = tn+1 −tn , has local truncation error − 12 h y (c) for some c in (a, b) if the third derivative,
(3)
y , is continuous.
If en = y(tn ) − yn show that
1 1
|en+1 | ≤ |en | + hL(|en+1 | + |en |) + h3 M,
2 12
where |∂f /∂y| ≤ L and |y (3) (t)| ≤ M on [t0 , tn ].
Deduce that if y0 = y(t0 ) and the steplength h is constant, with hL < 2, then
n
h2 M
 
2 + hL
|en | ≤ −1 .
12L 2 − hL

Find appropriate values of L and M if the initial-value problem

y 0 = cos(y 2 ), y(0) = 0,

is to be solved on the interval [0, 1].


10. Write down the recurrence relation obtained when Euler’s method is applied to the initial-value
problem
y 0 = −2y/(1 + t), y(0) = 1,
and hence find an explicit expression for yn ; in other words, find a formula for yn in terms of n
and h. Find the exact solution y(t) of the initial-value problem and show that in this case, when
t = nh,
3t
y(t) − yn = h + O(h2 ) as h → 0.
(1 + t)3
Find suitable values for the constants M and L appearing in the global error bound obtained in
lectures, and compare with the above result.
11. Write the second-order differential equation y 00 = ty as a pair of equations of first order. Apply
Euler’s method, with steplengths 0.1 and 0.05, to estimate y(0.2), given that y(0) = 1 = y 0 (0).
12. The theta method is based on the formula

y n+1 = y n + h[ θf (tn , y n ) + (1 − θ)f (tn+1 , y n+1 ) ],

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

y n+1 = y n + 16 h[ 4f (tn , y n ) + 2f (tn+1 , y n+1 ) + hf 0 (tn , y n ) ]

is of order 3. The prime indicates differentiation with respect to t.


14. Find the order of the two-step method defined by

yn+1 = yn−1 + 16 h(fn+1 + fn + fn−1 ).

15. The Lucas numbers Ln are defined by the difference equation

Ln+2 = Ln+1 + Ln , for non-negative integers n,

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

ar−1 + 6ar + ar+1 = 0, r = 1, 2, ...

such that limr→∞ ar = 0 and 3a0 + a1 = 4.


18. Find the general solution of the difference equation

yn+2 − 2µyn+1 + µyn = 1, 0 < µ < 1.

Show that yn → 1/(1 − µ) as n → ∞.


19. Find the general solutions of the following difference equations:
(a) 2yn+2 − 5yn+1 + 2yn = 0,
(b) un − 4un−1 + 4un−2 = 0,
(c) xn+2 − 7xn+1 + 12xn = cos(nθ), where θ is independent of n.
20. Show that the intergal
π
cos(kθ) − cos(kφ)
Z
Ik (φ) = dθ,
0 cos θ − cos φ
for non-negative integers k and real φ, satisfies the difference equation

In+2 (φ) − 2 cos φIn+1 (φ) + In (φ) = 0,

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 ) ,

as a Runge Kutta method, and find its order.


24. Verify that the Butcher table

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.]

25. The two-stage Runge-Kutta method

y n+1 = y n + h(b1 k 1 + b2 k 2 ),

with

k 1 = f (tn + c1 h, y n + h(a11 k 1 + a12 k 2 )), k 2 = f (tn + c2 h, y n + h(a21 k 1 + a22 k 2 )),

corresponds to the Butcher table

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

give the following relationships between error coefficients:


(3) (2) (3) (4) (3) (4) (4) (2) (3) (4)
τ2 = τ1 − 2τ1 , τ3 = τ1 − 3τ1 , τ4 = τ1 − 2τ1 − τ2 .

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 .

Verify that the table

0
1 1
2 2
1 1
2 0 2
1 0 0 1
1 1 1 1
6 3 3 6

describes a fourth-order method.

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

Show that the method is A-stable.


45. The parameters of a diagonally implicit Runge-Kutta method are given in the following Butcher
table.
1 1
6 6 0
5 2 1
6 3 6
1 1
2 2

What is the order of this method? Is it A-stable?


46. A three-stage Runge-Kutta method has the form
1
y n+1 = y n + 891 h(214k 1 + 27k 2 + 650k 3 )

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

1 + z/3 1 + 2z/5 + z 2 /20


(d) , (e) .
1 − 2z/3 + z 2 /6 1 − 3z/5 + 3z 2 /20 − z 3 /60
48. Prove that the backward differentiation formula

yn+1 − 34 yn + 13 yn−1 = 32 hf (tn+1 , yn+1 )

is zero-stable and investigate its linear stability.


49. Write down the stability polynomial π(r, h̄) associated with the two-step explicit method

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,

y 00 + 20y 0 + 200y = 0, y(0) = 1, y 0 (0) = −10,

recast as a first-order system.


51. Derive an explicit three-step method of third order with the first characteristic polynomial

ρ(ζ) = ζ 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?

You might also like