Professional Documents
Culture Documents
M318 Lecture Notes
M318 Lecture Notes
Course Outline: Ordinary Differential Equations. Higher Order one –step methods; Taylor and Runge –Kutta
methods, Linear Multistep steps; Adams, Backward Differentiation Formula (BDF), Predictor –Corrector methods.
Convergence and Stability Analyses. Stiff systems and rational approximations. Continuous methods and
Consider the initial-value problem (ivp) for single first order differential equation
We seek a solution in the range 𝑎 ≤ 𝑥 ≤ 𝑏, where 𝑎 and 𝑏 are finite and we assume that 𝑓 satisfies the conditions
stated in Theorem 1.1 below which guarantee that the problem has a unique continuously differentiable solution,
Let 𝑓(𝑥, 𝑦) be defined and continuous for all points (𝑥, 𝑦) in region 𝐷 defined by 𝑎 ≤ 𝑥 ≤ 𝑏, −∞ < 𝑦 < ∞, 𝑎 and
𝑏 finite, and let there exist a constant 𝐿 such that, for every 𝑥, 𝑦, 𝑦 ∗ such that (𝑥, 𝑦) and (𝑥, 𝑦 ∗ ) are both in 𝐷,
Then if 𝑦0 is any given number, there exist a unique solution 𝑦(𝑥) of the ivp (1.1), where 𝑦(𝑥) is continuous and
Consider the sequence of points {𝑥𝑛 } defined by 𝑥𝑛 = 𝑎 + 𝑛ℎ, 𝑛 = 0,1,2, …, where the parameter is called the
step length or step size. An essential property of the majority of computational methods for the solution of (1.1) is
that of discretization; that is, we seek an approximate solution, not on the continuous interval 𝑎 ≤ 𝑥 ≤ 𝑏, but on
the discrete point set {𝑥𝑛 |𝑛 = 0,1, … , (𝑏 − 𝑎)⁄ℎ}. Let 𝑦𝑛 be an approximation to the theoretical solution at 𝑥𝑛 ,
that is, to 𝑦(𝑥𝑛 ), and let 𝑓𝑛 ≡ 𝑓(𝑥𝑛 , 𝑦𝑛 ). If a computational method for determining the sequence {𝑦𝑛 } takes the
form of a linear relationship between𝑦𝑛+𝑗 , 𝑓𝑛+𝑗 , 𝑗 = 0,1, … , 𝑘, we call it a linear multistep method of step number
or
𝑘 𝑘
Where 𝛼𝑗 and 𝛽𝑗 are constants, called the coefficients of the method. We assume that 𝛼𝑘 ≠ 0 and that not both
𝛼0 and 𝛽0 are zero, that is, 𝛼02 + 𝛽02 > 0. Since (1.2) can be multiplied on both sides by the same constant without
altering the relationship, the coefficients 𝛼𝑗 and 𝛽𝑗 are arbitrary to the extent of a constant multiplier. We remove
this arbitrariness by assuming throughout that 𝛼𝑘 = 1. Some examples of LMM are the mid –point method,
Simpson’s method, Adams methods and Backward Differentiation Formulae (BDF) methods.
The problem of determining the solution 𝑦(𝑥) of (1.1) is replaced by that of finding a sequence {𝑦𝑛 } which
satisfies the difference equation (1.2). The 𝑦𝑛 values which are intended to be estimates of 𝑦(𝑎 + 𝑛ℎ) can be
computed recursively from (1.2) if in addition to the initial value 𝑦0 = 𝑦(𝑎), 𝑘 − 1 more values, that is,
2
We say that the method (1.2) is explicit if 𝛽𝑘 = 0, and implicit if 𝛽𝑘 ≠ 0. For an explicit method, (1.2) yields the
current value 𝑦𝑛+𝑘 directly in terms of 𝑦𝑛+𝑗 , 𝑓𝑛+𝑗 , 𝑗 = 0,1, … , 𝑘, which at this stage of computation have been
calculated. An implicit method, however, will call for the solution at each stage of computation, of the equation
𝑦𝑛+𝑘 = ℎ𝛽𝑘 𝑓(𝑥𝑛+𝑘 , 𝑦𝑛+𝑘 ) + 𝑔 where 𝑔 is a known function of the previously calculated values 𝑦𝑛+𝑗 , 𝑓𝑛+𝑗 , 𝑗 =
0,1, … , 𝑘 − 1. Thus implicit methods in general entail a substantially greater computational effort than do explicit
methods. On the other hand, for a given step number 𝑘, implicit methods can be made more accurate than
We now consider the problem of determining the coefficients 𝛼𝑗 , 𝛽𝑗 appearing in (1.2). Any specific LMM may be
derived in a number of different ways and we shall consider a selection of different approaches.
2 𝑞
𝑦(𝑥𝑛 + ℎ) = 𝑦(𝑥𝑛 ) + ℎ𝑦 ′ (𝑥𝑛 ) + ℎ2! 𝑦 ′′ (𝑥𝑛 ) + ⋯ + ℎ𝑞! 𝑦 (𝑞) (𝑥𝑛 ) + ⋯
where
𝑑 𝑞 𝑦(𝑥𝑛 )
𝑦 (𝑞) (𝑥𝑛 ) = 𝑑𝑥 𝑞
,𝑞 = 1,2, …
If we truncate this expansion after two terms and substitute for 𝑦 ′ (𝑥) from the differential equation (1.1), we
have
ℎ2 3
2!
𝑦 ′′ (𝑥𝑛 ) + ℎ3! 𝑦 ′′′ (𝑥𝑛 ) + ⋯ (1.4)
Equation (1.3) expresses an approximate relation between exact values of the solution of (1.1). We can also
interpret it as an exact relation between approximate values of the solution of (1.1) if we replace 𝑦(𝑥𝑛 ), 𝑦(𝑥𝑛 +
3
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓𝑛
an explicit linear one –step method. It is, in fact, Euler’s explicit rule, the simplest of all LMM.
The error associated with it is the expression (1.4) (multiplied by ±1 according to the definition of error) and is
called the local truncation error (LTE) or local discretization error. For this method, the local truncation error is
𝑜(ℎ2 ) and that it is exactly zero if the solution of (1.1) is a polynomial of degree not exceeding one. The first term
2
of the LTE ℎ2 𝑦 ′′ (𝑥𝑛 ), is called the principal part of the LTE.
2 3
𝑦(𝑥𝑛 − ℎ) = 𝑦(𝑥𝑛 ) − ℎ𝑦 ′ (𝑥𝑛 ) + ℎ2! 𝑦 ′′ (𝑥𝑛 ) − ℎ3! 𝑦 ′′′ (𝑥𝑛 ) …
Subtracting, we get
3
𝑦(𝑥𝑛 + ℎ) − 𝑦(𝑥𝑛 − ℎ) = 2ℎ𝑦 ′ (𝑥𝑛 ) + ℎ3 𝑦 ′′′ (𝑥𝑛 ) …
This can be brought into the standard form (1.2) by replacing 𝑛 by 𝑛 + 1 to give
𝑦𝑛+2 − 𝑦𝑛 = 2ℎ𝑓𝑛+1
3
which is the Mid –point rule and its local truncation error is ±ℎ3! 𝑦 ′′′ (𝑥𝑛 ) + ⋯ .
Similar techniques can be used to derive any LMM of given specification. Thus if we wish to find the most
and we choose 𝛼0 , 𝛽1 , 𝛽0 so as to make the approximation as accurate as possible. The following expansions are
used:
2 3
𝑦(𝑥𝑛 + ℎ) = 𝑦(𝑥𝑛 ) + ℎ𝑦 ′ (𝑥𝑛 ) + ℎ2! 𝑦 ′′ (𝑥𝑛 ) + ℎ3! 𝑦 ′′′ (𝑥𝑛 ) + ⋯
2
𝑦 (1) (𝑥𝑛 + ℎ) = 𝑦 ′ (𝑥𝑛 ) + ℎ𝑦 ′′ (𝑥𝑛 ) + ℎ2! 𝑦 ′′′ (𝑥𝑛 ) + ⋯
4
𝑐0 𝑦(𝑥𝑛 ) + 𝑐1 ℎ𝑦 ′ (𝑥𝑛 ) + 𝑐2 ℎ2 𝑦 ′′ (𝑥𝑛 ) + 𝑐3 ℎ3 𝑦 ′′′ (𝑥𝑛 ) + ⋯ ≅ 0
where
𝑐0 = 1 + 𝛼0 , 𝑐1 = 1 − 𝛽1 − 𝛽0
𝑐2 = 12−𝛽1, 𝑐3 = 16 − 12𝛽1
Thus in order to make the approximation in (1.5) as accurate as possible, we choose 𝛼0 = −1, 𝛽1 = 𝛽0 = 12. 𝑐3
1
then takes the value −12 . The LMM is now
𝑦𝑛+1 − 𝑦𝑛 = ℎ2[𝑓𝑛+1 + 𝑓𝑛 ]
1 3 ′′′
the Trapezoidal rule, its local truncation error is −12ℎ 𝑦 (𝑥𝑛 ) + ⋯.
Exercise 1.1: Find the most accurate implicit linear two –step method. Find also the first term in the local
truncation error.
Using (1.1), we can replace 𝑦 (1) (𝑥) by 𝑓(𝑥, 𝑦) in the integrand. If our aim is to derive, say a linear two –step
method, then the only available data for the approximate evaluation of the integral will be the values
(𝑥𝑛 , 𝑓𝑛 ), (𝑥𝑛+1 , 𝑓𝑛+1 ), (𝑥𝑛+2 , 𝑓𝑛+2 ). By the Newton –Gregory Forward interpolation formula,
𝑥 𝑥 2
∫𝑥 𝑛+2 𝑦 ′ (𝑥)𝑑𝑥 ≅ ∫𝑥 𝑛+2 𝑝(𝑥)𝑑𝑥 = ∫0 [𝑓𝑛 + 𝑟Δ𝑓𝑛 + 𝑟(𝑟−1)
2!
1 2
Δ2 𝑓𝑛 ]ℎ𝑑𝑟 = ℎ(2𝑓𝑛 + 2Δfn + Δ 𝑓𝑛 )
3
𝑛 𝑛
Expanding Δ𝑓𝑛 and Δ2 𝑓𝑛 in terms of 𝑓𝑛 , 𝑓𝑛+1 , 𝑓𝑛+2 and substituting in (1.6) gives
which is Simpson’s rule, the most accurate linear two –step method.
5
ℎ
𝑦𝑛+2 − 𝑦𝑛+1 = 12[5𝑓𝑛+2 + 8𝑓𝑛+1 − 𝑓𝑛 ]
Clearly this technique can be used to derive only a subclass of LMM consisting of hose methods for which
𝛼𝑘 = 1, 𝛼𝑗 = −1, 𝛼𝑖 = 0, 𝑖 = 0,1, … , 𝑗 − 1, 𝑗 + 1, … , 𝑘, 𝑗 ≠ 𝑘
The importance of this technique is that it establishes a link between the concepts of polynomial interpolation
and LMM.
Convergence
A basic property which we shall demand of an acceptable LMM is that the solution {𝑦𝑛 } generated by the method
converges, in some sense, to the theoretical solution 𝑦(𝑥) as the step length tends to zero.
With the LMM (1.2), we associate the linear difference operator defined by
where 𝑦(𝑥) is an arbitrary function, continuously differentiable on [𝑎, 𝑏]. Expanding 𝑦(𝑥 + 𝑗ℎ) and its derivative
where
𝑐0 = 𝛼0 + 𝛼1 + ⋯ + 𝛼𝑘
𝑞 = 2,3, …
The LMM (1.2) is said to be of order 𝑝 if 𝑐0 = 0, 𝑐1 = 0, … , 𝑐𝑝 = 0 but 𝑐𝑝+1 ≠ 0 and 𝑐𝑝+1 is called the error
constant.
Example 1.2: Find the order and error constant of the trapezoidal method 𝑦𝑛+1 − 𝑦𝑛 = ℎ2[𝑓𝑛+1 + 𝑓𝑛 ].
Solution: 𝛼1 = 1, 𝛼0 = −1, 𝛽0 = 𝛽1 = 12
6
𝑐0 = 𝛼0 + 𝛼1 = 0, 𝑐1 = 𝛼1 − (𝛽0 + 𝛽1 ) = 0, 𝑐2 = 12𝛼1 − 𝛽1 = 0, 𝑐3 = 16𝛼1 − 12𝛽1 = −12
1
≠ 0. Hence order 𝑝 = 2
1
and error constant 𝑐3 = −12 .
Exercise 1.2: Find the order and error constant of (i) Mid-point method, (ii) Simpson’s method.
For an explicit method, the local truncation error is the difference between the theoretical solution and the
solution given by the LMM under the assumption that no previous errors have been made; for an implicit
method, the local truncation error is (approximately) proportional to this difference. If we make no such
assumption, then the error 𝑦(𝑥𝑛+𝑘 ) − 𝑦𝑛+𝑘 = 𝑒𝑛+𝑘 is the global (overall) or accumulated error. This error
involves all the truncation errors made at each application of the method. It is this error which convergence
𝑘 𝑘 𝑘
∑ 𝛼𝑗 = 0; ∑ 𝑗𝛼𝑗 = ∑ 𝛽𝑗 (1.9)
𝑗=0 𝑗=0 𝑗=0
We now introduce the first and second characteristic (generating) polynomials of the LMM (1.2) defined as 𝜌(𝜉)
and 𝜎(𝜉) respectively, where 𝜌(𝜉) = ∑𝑘𝑗=0 𝛼𝑗 𝜉𝑗 and 𝜎(𝜉) = ∑𝑘𝑗=0 𝛽𝑗 𝜉𝑗 . Hence in terms of these polynomials,
Thus, for a consistent method, the first characteristic polynomial 𝜌(𝜉) always has a root at 1. We shall call this
root the principal root 𝜉1 and the remaining roots 𝜉𝑠 , 𝑠 = 2,3, … , 𝑘 the spurious roots which arise only when the
step number of the method is greater than one. That is, when we choose to replace a first order differential
equation by a difference equation of order greater than one. The location of these spurious roots must be
carefully controlled if the method is to be convergent. Since consistency controls only the position of the principal
root and not of the spurious roots, a consistent method is not necessarily convergent.
7
Definition 1.3 (Zero-Stability)
The LMM (1.2) is said to be zero-stable if no root of the first characteristic polynomial 𝜌(𝜉) has modulus greater
than one, and every root with modulus one is simple (distinct).
The roots of 𝜌(𝜉) are in general complex, since for a zero-stable method all the roots of 𝜌(𝜉) lie in or on the unit
circle, those on the unit circle being simple. This is what is referred to as the root condition.
Zero-stability ensures that those solutions of the difference equation for 𝑦𝑛 which arise because the first order
differential equation is being replaced by a higher order difference equation are damped out in the limit as ℎ → 0.
The necessary and sufficient conditions for a LMM to be convergent are that it be consistent and zero-stable.
Quantitatively speaking, consistency controls the magnitude of the local truncation error committed at each stage
of the calculation, while zero-stability controls the manner in which this error is propagated as the calculation
proceeds; both are essential if convergence is to be achieved. Convergence is a minimal property which any
acceptable LMM must possess. Accordingly, we reject out of hand, as having no practical interest, LMMs which
Example 1.3: Investigate the consistency and zero-stability of the following methods:
Solution
convergent.
(b) 𝑦𝑛+2 − 𝑦𝑛 = ℎ3[𝑓𝑛+2 + 4𝑓𝑛+1 + 𝑓𝑛 ], 𝜌(𝜉) = 𝜉 2 − 1; 𝜌′ (𝜉) = 2𝜉; 𝜎(𝜉) = 13𝜉 2 + 43𝜉 + 13
Consistency: (i) 𝜌(1) = 1 − 1 = 0; (ii) 𝜌′̇ (1) = 2; 𝜎(1) = 13 + 43 + 13 = 2 ⇒ 𝜌′ (1) = 𝜎(1) = 2 ⇒ the method is
consistent.
8
Zero-stability: 𝜌(𝜉) = 𝜉 2 − 1 = 0 ⇒ 𝜉1 = 1, 𝜉2 = −1 ; |𝜉1 | = 1 = |𝜉2 | but 𝜉1 ≠ 𝜉2 . Hence the method is zero-
Example 1.4: Consider the following method 𝑦𝑛+2 − (1 + 𝑎)𝑦𝑛+1 + 𝑎𝑦𝑛 = ℎ2[(3−𝑎)𝑓𝑛+1 − (1 + 𝑎)𝑓𝑛 ].
(i) Find the parameter a for which the above method is consistent.
(ii) Find the range of values of the parameter a for which the above method is zero-stable.
Solution
𝜌′ (1) = 𝜎(1) = 1 − 𝑎 for any value f a. Hence the method is consistent for any value of a.
stable for −1 ≤ 𝑎 < 1. If 𝑎 ≥ 1 or 𝑎 < −1, the method will not be zero-stable (i.e. zero-unstable).
Exercise 1.3: Investigate the consistency and zero-stability of the following methods: (i) Mid-point (ii) Two-step
Adams-Moulton.
Theorem 1.3
No zero-stable LMM of step number k can have order exceeding k+1 when k is odd, or exceeding k+2 when k is
even.
A zero-stable linear k-step method which has order k+2 is called an optimal method. For an optimal method all
The highest order we can expect from a k-step method is 2k if the method is implicit, and 2k-1 if the method is
explicit. However, these maximal orders cannot, in general, be obtained without violating the condition of zero-
stability as theorem 1.3 shows. Simpson’s method is an example of a method which is both maximal and optimal.
It has step number two and order four, thus is both maximal, since It has order 2k, and optimal, since it has order
9
One-step methods (single step methods)
By a one-step method we mean a method whereby 𝑦𝑛 is the only input data to the step in which 𝑦𝑛+1 is to be
computed for 𝑛 = 0,1,12, … (that is we need just one value from the past). Examples are Euler’s method (explicit
and implicit) and Trapezoidal method. One-step methods are always self-starting. No other method is needed to
generate any input data, hence they are sometimes called self-starting methods.
Methods for which 𝜌(𝜉) = 𝜉 𝑘 − 𝜉 𝑘−1 are called Adams methods. They have the property hat all the spurious
roots of 𝜌(𝜉) are located at the origin; such methods are zero-stable. Adams methods which are explicit are called
Adams-Bashforth Methods (ABM), while the implicit ones are called Adams-Moulton Methods (AMM).
Explicit methods for which 𝜌(𝜉) = 𝜉 𝑘 − 𝜉 𝑘−2 are called Nystrom methods and implicit methods with the same
form for 𝜌(𝜉) are called generalized Milne-Simpson methods, both these families are clearly zero-stable, since
they have one spurious root −1 and the rest at the orgin.
The LMM (1.2) is said to be absolutely stable for a given ℎ̅, if for that ℎ̅, all the roots 𝑟𝑠 of the stability polynomial
𝜋(𝑟; ℎ̅) = 𝜌(𝑟) − ℎ̅𝜎(𝑟) = 0 satisfy |𝑟𝑠 | < 1, 𝑠 = 1,2, … , 𝑘, and to be absolutely unstable for that ℎ̅ otherwise. An
interval (𝛼, 𝛽) of the real line is said to be an interval of absolute stability if the method is absolutely stable for all
ℎ̅ ∈ (𝛼, 𝛽). If the method is absolutely unstable for all ℎ̅, it is said to have no interval of absolute stability.
It can be shown that every optimal LMM has no interval of absolute stability [it is the point 0 = [0,0])]. If all the
spurious zeros of the first characteristic polynomial 𝜌(𝜉) lie strictly inside the unit circle, then the method has a
non-vanishing interval of absolute stability. Again, we expect that if all the spurious zeros are situated at the
origin (that is, if the method is an Adams method), the interval of absolute stability will be substantial.
The size and shape of the region of absolute stability is important in assessing the value of a particular method
and when comparing it with other methods. We shall consider two methods of obtaining the region of absolute
stability namely the boundary locus method and Schur method. The third method is the Rout-Hurwitz criterion.
10
Boundary Locus Method (BLM)
The most usual method for finding the region of absolute stability LMM is the so called boundary locus method
ℎ̅ = 𝜌(𝑟)
𝜎(𝑟)
, 𝑟 = 𝑒 𝑖𝜃 , 0° ≤ 𝜃 ≤ 180°.
The curve is normally symmetric about the real axis. The upper half is obtained for 0° ≤ 𝜃 ≤ 180° and the mirror
image of it through the real axis completes the region of absolute stability.
Example 1.5: Find the interval of absolute stability of the two-step Adams-Moulton Method.
ℎ
Solution: The two-step AMM is given by 𝑦𝑛+2 − 𝑦𝑛+1 = 12[5𝑓𝑛+2 + 8𝑓𝑛+1 − 𝑓𝑛 ]. Hence 𝜌(𝑟) = 𝑟 2 − 𝑟 and
1
𝜎(𝑟) = 12(5𝑟 2 + 8𝑟 − 1).
𝑖𝜃 ) 12(𝑒2𝑖𝜃 −𝑒𝑖𝜃 )
The boundary locus curve is ℎ̅(𝜃) = 𝜌(𝑒
𝜎(𝑒𝑖𝜃 )
= 5𝑒 12(cos 2𝜃+𝑖 sin 2𝜃)−12(cos 𝜃+𝑖 sin 𝜃)
2𝑖𝜃 +8𝑒𝑖𝜃 −1 = 5(cos 2𝜃+𝑖 sin 2𝜃)+8(cos 𝜃+𝑖 sin 𝜃)−1 =
Rationalizing the denominator by multiplying ℎ̅(𝜃) by (5cos 2𝜃+8cos 𝜃−1)−𝑖(5sin 2𝜃+8 sin 𝜃)
(5cos 2𝜃+8cos 𝜃−1)−𝑖(5sin 2𝜃+8 sin 𝜃)
and writing
(12 cos 2𝜃 − 12cos 𝜃)(5cos 2𝜃 + 8cos 𝜃 − 1) + (12 sin 2𝜃 − sin 𝜃)(5sin 2𝜃 + 8 sin 𝜃)
𝑥(𝜃) =
(5cos 2𝜃 + 8cos 𝜃 − 1)2 + (5sin 2𝜃 + 8 sin 𝜃)2
𝑥(0°) = 0, 𝑥(180°) = −6. Thus interval of absolute stability of the 2-step AMM is [−6,0].
completed and the graph of 𝑦(𝜃) is plotted against 𝑥(𝜃). Since this graph is symmetric about the real axis, its
mirror image through this line of symmetry gives the complete region of absolute stability of the method.
Exercise 1.4: Find the interval of absolute stability of the following methods:
(ii) 𝑦𝑛+2 − 45𝑦𝑛+1 − 15𝑦𝑛 = ℎ2[2𝑓𝑛+2 + 4𝑓𝑛+1 ]. Also find the region of absolute stability for (ii).
11
Schur’s Method
The second method we shall consider is Schur’s method often referred to as Schurz criterion. Consider the
where 𝑐𝑘 ≠ 0, 𝑐0 ≠ 0. The polynomial 𝜙(𝑟) is said to be a Schur polynomial if its roots 𝑟𝑠 satisfy
1
𝜙1 (𝑟) = 𝑟[𝜙̂(0)𝜙(𝑟) − 𝜙(0)𝜙̂(𝑟)]
Clearly, 𝜙1 (𝑟) has degree at most 𝑘 − 1. Then 𝜙(𝑟) is a Schur polynomial if and only if
The interval (𝛼, 𝛽) is an interval of absolute stability if for all ℎ̅ ∈ (𝛼, 𝛽), the stability polynomial
𝜋(𝑟; ℎ̅) = 𝜌(𝑟) − ℎ̅𝜎(𝑟) is a Schur polynomial (that is if and only if |𝜋̂(0; ℎ̅)| > |𝜋(0; ℎ̅)| and 𝜋1 (𝑟; ℎ̅) is Schur).
Example 1.6: Consider the polynomial 𝜙(𝑥) = 𝑥 2 + 𝑏𝑥 + 𝑐, where 𝑏 and 𝑐 are real. Find the conditions on 𝑏
𝜙̂(0) = 1.
Now |𝜙̂(0)| > |𝜙(0)| ⇒ 1 > |𝑐| or |𝑐| < 1, that is, −1 < 𝑐 < 1. From the second condition, 𝜙1 (𝑥) must be a
Schur polynomial, that is, (1 − 𝑐 2 )𝑥 + (𝑏 − 𝑏𝑐)=0 has a root whose modulus is less than one. Thus
𝑏
(1 − 𝑐 2 )𝑥 + (𝑏 − 𝑏𝑐) = 0 ⟺ (1 + 𝑐)(1 − 𝑐)𝑥 + 𝑏(1 − 𝑐) = 0 ∴ 𝑥 =
(1+𝑐)
𝑏
And |𝑥| = |(1+𝑐) | < 1 ⇒ |𝑏| < |1 + 𝑐|. Hence the conditions to be imposed on 𝑏 and 𝑐 are that(i) |𝑐| < 1 and (ii)
|𝑏| < |1 + 𝑐|. For example, 𝑥 2 + 𝑥 + 12 is a Schur polynomial because it satisfies (i) and (ii) above.
12
Schurz’ criterion for finding the interval of absolute stability suffers a disadvantage for LMM of step numbers
greater than two. Moreover, one cannot obtain the region of absolute stability with this method.
Example 1.7: Use Schur criterion to obtain the interval of absolute stability of the method
̅ ̅
Solution: The stability polynomial is 𝜋(𝑟; ℎ̅) = 𝑟 2 − 12ℎ̅𝑟 − (1 + 3ℎ
2
). Thus 𝜋̂(𝑟; ℎ̅) = −(1 + 3ℎ
2
)𝑟 2 − 12ℎ̅𝑟 + 1 and
̅
the condition |𝜋̂(0; ℎ̅)| > |𝜋(0; ℎ̅)| is satisfied if |1 + 3ℎ
2
| < 1 ⟺ −43 < ℎ̅ < 0.
̅ ̅ ̅
Now 𝜋1 (𝑟; ℎ̅) = 1𝑟[𝑟 2 − 12ℎ̅𝑟 − (1 + 3ℎ
2
) + (1 + 3ℎ
2
)(−(1 + 3ℎ
2
)𝑟 2 − 12ℎ̅𝑟 + 1)] which has its only root at −
1
, and is
3
therefore a Schur polynomial. It follows that the interval of absolute stability is (−43, 0). Use BLM to find the
interval of absolute stability of his method and verify that 𝑟 = −13, also, use test equation).
Example 1.8: Find the interval of absolute stability of the (i) Trapezoidal method, (ii) Euler’s explicit method.
Solution: (i) 𝑦𝑛+1 − 𝑦𝑛 = ℎ2[𝑓𝑛+1 + 𝑓𝑛 ], using the test equation 𝑦 ′ = 𝜆𝑦, we have
ℎ𝜆
1+ 2
(1 − ℎ𝜆
2
)𝑥 − (1 − ℎ𝜆
2
)=0⇒𝑥= ℎ𝜆 = 1+𝑞 ⁄2
1−𝑞⁄2
, where 𝑞 = ℎ𝜆 or ℎ̅ = ℎ𝜆. By Schur’s condition |1+𝑞 ⁄2
1−𝑞⁄2
| < 1 and this
1−
2
inequality is satisfied for 𝑞 < 0. Hence the interval of absolute stability is (−∞, 0). For LMMs of step number two
(ii) 𝑦𝑛+1 − 𝑦𝑛 = ℎ𝑓𝑛 and the test equation yields 𝑦𝑛+1 − 𝑦𝑛 = ℎ𝜆𝑦𝑛 ⇒ 𝑦𝑛+1 − (1 + ℎ𝜆)𝑦𝑛 = 0 with
1 ⟺ −1 < 1 + 𝑞 < 1, that is, −1 < 1 + 𝑞; 1 + 𝑞 < 1 ⟺ (𝑞 > −2)⋀(𝑞 < 0) ⟺ −2 < 𝑞 < 0. Hence the
interval of absolute stability of Euler’s explicit method is (−2,0). Similarly, the absolute stability interval of Euler’s
All the methods for approximating the solution to initial-value problems have error terms that involve higher
derivative of the solution of the equation. If the derivative can be reasonably bounded, then the method will have
a predictable error bound that can be used to estimate the accuracy of the approximation. Even if the derivative
grows as the steps increase, the error can be kept in relative control, provided that the solution also grows in
13
magnitude. Problems frequently arise, however, when the magnitude of the derivative increases, but the solution
does not. In this situation, the error can grow so large that it dominates the calculations. Initial-value problems for
which this is likely to occur are called stiff-equations and are quite common, particularly in the study of vibrations,
chemical reactions and electrical circuits. Stiff systems derive their name from the motion of spring and mass
Stiff differential equations are characterized as those whose exact solution has a term of the form 𝑒 −𝑐𝑡 , where 𝑐 is
a large positive constant. This is usually only a part of the solution, called the transient solution; the more
important portion of the solution is called the steady state solution. A transient portion of a stiff equation will
For example, the stiff initial-value problem 𝑦 ′ = −20(𝑦 − 𝑡 2 ) + 2𝑡, 0 ≤ 𝑡 ≤ 1, 𝑦(0) = 13 has the exact solution
𝑦(𝑡) = 𝑡 2 + 13𝑒 −20𝑡 (𝑡 2 is the steady state solution while 13𝑒 −20𝑡 is the transient solution).
max |𝑅𝑒𝜆𝑖 |
𝑖=1,…,𝑚
(ii) min |𝑅𝑒𝜆𝑖 |
≫0
𝑖=1,…,𝑚
[ max |𝑅𝑒𝜆𝑖 |]
𝑖=1,…,𝑚
Where 𝜆𝑖 , 𝑖 = 1,2, … , 𝑚 are the eigenvalues of 𝐴. The ratio 𝑆 = is called the stiffness ratio.
[ min |𝑅𝑒𝜆𝑖 |]
𝑖=1,…,𝑚
𝜕𝑓1 𝜕𝑓2
𝜕𝑦1 𝜕𝑦1 −10 10 |𝐽 −10 − 𝜆 10
𝐽 = [ 𝜕𝑓 ]=[ ] , − 𝜆𝐼| = | | = (−10 − 𝜆)(−11 − 𝜆) − 90 = 0
1 𝜕𝑓2 9 −11 9 −11 − 𝜆
𝜕𝑦2 𝜕𝑦2
𝜆2 + 21𝜆 + 20 = 0 ⟺ (𝜆 + 1)(𝜆 + 20) = 0 ∴ 𝜆1 = −1, 𝜆2 = −20 (note 𝑅𝑒𝜆1 < 0, 𝑅𝑒𝜆2 < 0)
[ max |𝑅𝑒𝜆𝑖 |]
𝑆= 𝑖=1,…,𝑚
= 20
1
= 20. The system is mildly stiff (that is, marginally stiff).
[ min |𝑅𝑒𝜆𝑖 |]
𝑖=1,…,𝑚
14
15
Exercise 2.1: Find the stiffness ratio for the system:
𝑦1′ = 𝑦2
Note: stiff systems are occasionally referred to as “systems with large Lipchitz constants”.
A basic difficulty in the numerical solution of stiff system is the satisfaction of the requirement of absolute
stability. Thus several definitions, which call for the method to possess some ‘adequate’ region of absolute
stability, have been proposed. These definitions originally constructed for LMMs, are applicable to any numerical
A numerical method is said to be 𝐴-stable if its region of absolute stability contains the whole of the left-hand
Theorem 2.1
(iii) The second-order 𝐴-stable implicit method with smallest error constant is the trapezoidal method.
The restriction on order implied by (ii) in Theorem 2.1 is a severe one. In view of this, several less demanding
A numerical method is said to be 𝐴(𝛼)-stable, 𝛼 ∈ (0, 𝜋2), if its region of absolute stability contains the infinite
wedge 𝑊𝛼 = {ℎ𝜆|−𝛼 < 𝜋 − 𝑎𝑟𝑔ℎ𝜆 < 𝛼}; it is said to be 𝐴(0)-stable if it is 𝐴(𝛼)-stable for some (sufficiently
y y
Wα α
x α x
A-stability A(α)-stability
16
Note: Conventional methods such as Adams-Moulton and explicit Runge-Kutta methods suffer from severe step
size constraints imposed by stability when applied to stiff problems. Thus, to overcome this stability restriction on
the step size, numerical methods that posses infinite regions of absolute stability have been recommended for
the solution of stiff problems. The best suited are the Backward Differentiation Formulae (BDF) methods as they
3. RUNGE-KUTTA METHODS
Recall the initial-value problem (1.1). Of all computational methods for the numerical solution of this problem,
the easiest to implement is Euler’s rule, 𝑦𝑛+1 − 𝑦𝑛 = ℎ𝑓(𝑥𝑛 , 𝑦𝑛 ) = ℎ𝑓𝑛 . It is explicit and being a one-step method,
it requires no additional starting values. Its low order, however, makes it of limited practical value. LMMs achieve
higher order by sacrificing the one-step nature of the algorithm, whilst retaining linearity with respect to
𝑦𝑛+𝑗 , 𝑓𝑛+𝑗 , 𝑗 = 0,1, … , 𝑘. Higher order can also be achieved by sacrificing linearity, but preserving the one-step
nature of the algorithm. This is the philosophy behind the methods first proposed by Runge and subsequently
developed by Kutta and Heun. Runge-Kutta methods thus retain the advantages of one-step methods but, due to
the loss of linearity, error analysis is considerably more difficult than in the case of LMMs. Traditionally, Runge-
Kutta methods are all explicit, although recently, implicit Runge-Kutta methods which have improved weak
stability characteristics, have been considered. Thus a Runge-Kutta method may be regarded as a particular case
The fact that the general method (3.1) makes no mention of the function 𝑓(𝑥, 𝑦) which defines the differential
equation makes it impossible to define the order of the method independently of the differential equation, as
The method (3.1) is said to have order 𝑝 if 𝑝 is the largest integer for which
17
holds , where 𝑦(𝑥) is the theoretical solution of the ivp.
𝜙(𝑥, 𝑦, 0) ≡ 𝑓(𝑥, 𝑦)
If the method (3.1) is consistent with the ivp or simply consistent, then
𝑦(𝑥 + ℎ) − 𝑦(𝑥) − ℎ𝜙(𝑥, 𝑦(𝑥), ℎ) = 𝑦(𝑥) + ℎ𝑦 ′ (𝑥) + 𝑜(ℎ2 ) − 𝑦(𝑥) − ℎ𝜙(𝑥, 𝑦(𝑥), ℎ)
since 𝑦 ′ (𝑥) = 𝑓(𝑥, 𝑦(𝑥)) = 𝜙(𝑥, 𝑦(𝑥),0), by definition 3.2. Thus a consistent method has order at least one.
The only LMM which falls within class (3.1) is Euler’s rule which we obtain by setting
Theorem 3.1
(i) Let the function 𝜙(𝑥, 𝑦, ℎ) be continuous jointly as a function of its three arguments in the region 𝒟
(ii) Let 𝜙(𝑥, 𝑦, ℎ) satisfy a Lipschitz condition of the form |𝜙(𝑥, 𝑦 ∗ , ℎ) − 𝜙(𝑥, 𝑦, ℎ)| ≤ 𝑀|𝑦 ∗ − 𝑦| for all
points (𝑥, 𝑦 ∗ , ℎ), (𝑥, 𝑦, ℎ) in D. Then the method (3.1) is convergent if and only if it is consistent.
Note that there is no requirement corresponding to zero-stability, since no parasitic solutions can arise with a
one-step method.
𝑦𝑛+1 − 𝑦𝑛 = ℎ𝜙(𝑥𝑛 , 𝑦𝑛 , ℎ)
𝑅
𝜙(𝑥, 𝑦, ℎ) = ∑ 𝑐𝑘 𝑘𝑟
𝑠=1
𝑘1 = 𝑓(𝑥, 𝑦)
𝑟−1 (3.2)
𝑘𝑟 = 𝑓 (𝑥 + ℎ𝑎𝑟 , 𝑦 + ℎ ∑ 𝑏𝑟𝑠 𝑘𝑠 ) , 𝑟 = 2,3, … , 𝑅
𝑠=1
𝑟−1
𝑎𝑟 = ∑ 𝑏𝑟𝑠 , 𝑟 = 2,3, … , 𝑅
𝑠=1 }
18
Note that an 𝑅-stage Runge-Kutta method involves 𝑅 function evaluations per step. Each of the functions
𝑘𝑟 (𝑥, 𝑦, ℎ), 𝑟 = 1,2, … , 𝑅, may be interpreted as an approximation to the derivative 𝑦̇ (𝑥), and the function
ℎ 2 ′′ ℎ 𝑝 (𝑝)
𝑦(𝑥 + ℎ) = 𝑦(𝑥) + ℎ𝑦 ′ (𝑥) + 2!
𝑦 (𝑥) + ⋯+ 𝑝!
𝑦 (𝑥)
𝑞
where 𝑓 (𝑞) (𝑥, 𝑦) = 𝑑𝑥
𝑑
𝑞 𝑓(𝑥, 𝑦), 𝑞 = 1,2, … , (𝑝 − 1) (the subscript 𝑇 denotes ‘Taylor’).
There is a great deal of tedious manipulation involved in deriving Runge-Kutta methods of higher order;
accordingly, we shall derive only methods of order up to three and quote some well known methods of order
four.
𝑑𝑓(𝑥,𝑦) 𝜕𝑓 𝜕𝑓 𝑑𝑦 𝜕𝑓 𝜕𝑓
where 𝐹 = 𝑓𝑥 + 𝑓𝑓𝑦 , 𝐺 = 𝑓𝑥𝑥 + 2𝑓𝑓𝑥𝑦 + 𝑓 2 𝑓𝑦𝑦 (note 𝑑𝑥
= 𝜕𝑥 + 𝜕𝑦 . 𝑑𝑥 = 𝜕𝑥 + 𝑦 ′ 𝜕𝑦 = 𝑓𝑥 + 𝑓𝑓𝑦 ).
It turns out that it is possible to achieve third order with 𝑅 = 3, and thus we need derive expansions only for the
𝑘1 = 𝑓(𝑥, 𝑦) = 𝑓
𝑘2 = 𝑓(𝑥 + ℎ𝑎2 , 𝑦 + ℎ𝑎2 𝑘1 ) } (3.5)
𝑘3 = 𝑓(𝑥 + ℎ𝑎3 , 𝑦 + ℎ(𝑎3 − 𝑏32 )𝑘1 + ℎ𝑏32 𝑘2 )
For a function of two variables 𝑓(𝑥, 𝑦), the rate of change of the function can be due to change in either 𝑥 or 𝑦.
The derivatives of 𝑓 can be expressed in terms of the partial derivatives. For the expansion in the neighbourhood
1
𝑓(𝑥, 𝑦) = 𝑓(𝑎, 𝑏) + (𝑥 − 𝑎)𝑓𝑥 (𝑎, 𝑏) + (𝑦 − 𝑏)𝑓𝑦 (𝑎, 𝑏) + 2![(𝑥 − 𝑎)2 𝑓𝑥𝑥 (𝑎, 𝑏) + 2(𝑥 − 𝑎)(𝑦 − 𝑏)𝑓𝑥𝑦 (𝑎, 𝑏)
19
Now expanding 𝑘2 as a Taylor series about the point (𝑥, 𝑦), we have
1
= 𝑓 + ℎ𝑎2 (𝑓𝑥 + 𝑘1 𝑓𝑦 ) + 2![(ℎ2 𝑎22 )𝑓𝑥𝑥 + 2(ℎ2 𝑎22 𝑘1 )𝑓𝑥𝑦 + (ℎ2 𝑎22 𝑘 2 )𝑓𝑦𝑦 ] + 𝑜(ℎ3 )
1
= 𝑓 + ℎ𝑎2 (𝑓𝑥 + 𝑓𝑓𝑦 ) + 2ℎ2 𝑎22 [𝑓𝑥𝑥 + 2𝑓𝑥𝑦 + 𝑓 2 𝑓𝑦𝑦 ] + 𝑜(ℎ3 )
or
ℎ2 2
𝑘3 = 𝑓 + ℎ{𝑎3 𝑓𝑥 + [(𝑎3 − 𝑏32 )𝑘1 + 𝑏32 𝑘2 ]𝑓𝑦 } + 2
{𝑎3 𝑓𝑥𝑥 + 2𝑎3 [(𝑎3 − 𝑏32 )𝑘1 + 𝑏32 𝑘2 ]𝑓𝑥𝑦
On substituting from (3.5)-(3.7) into (3.2) the following expansion for 𝜙(𝑥, 𝑦, ℎ) is obtained:
2
𝜙(𝑥, 𝑦, ℎ) = (𝑐1 + 𝑐2 + 𝑐3 )𝑓 + ℎ(𝑐2 𝑎2 + 𝑐3 𝑎3 )𝐹 + ℎ2 [2𝑐3 𝑎2 𝑏32 𝐹𝑓𝑦 + (𝑐2 𝑎22 + 𝑐3 𝑎32 )𝐺] + 𝑜(ℎ3 ) (3.8)
We now have to match the expansions (3.4) and (3.8). Let us see what can be achieved with 𝑅 = 1,2,3 (for 𝑅 > 3,
Setting 𝑐1 = 1, (3.9) differs from the expansion (3.4) for 𝜙 𝑇 by a term of order . Thus the resulting method,
which is Euler’s rule, has order one (that is, Rung-Kutta method for 𝑅 = 1 gives Euler’s explicit rule which is the
To match the expansion (3.10) with (3.4) we must satisfy the equations
𝑐1 + 𝑐2 = 1, 𝑐2 𝑎2 = 12 (3.11)
20
This is a set of two equations in three unknowns and thus there exists a one-parameter family of solutions. Thus
there exists an infinite number of two-stage Runge-Kutta methods of order two and none of order more than
two. This lack of uniqueness is typical of all Runge-Kutta derivations. Two particular solutions of (3.11) yield well-
known methods:
(i) 𝑐1 = 0, 𝑐2 = 1, 𝑎2 = 12. The resulting method is 𝑦𝑛+1 − 𝑦𝑛 = ℎ𝑓(𝑥𝑛 + 12ℎ, 𝑦𝑛 + 12ℎ𝑓(𝑥𝑛 , 𝑦𝑛 )). This
method, originally due to Runge, is referred to as the Modified Euler Method or the Improved
Polygon Method.
𝑦𝑛+1 − 𝑦𝑛 = ℎ2[𝑓(𝑥𝑛 , 𝑦𝑛 ) + 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ𝑓(𝑥𝑛 , 𝑦𝑛 ))] is known as the Improved Euler method
For 𝑅 = 3, we can match (3.8) and (3.4) up to and including ℎ2 terms if we satisfy the following set of equations:
𝑐1 + 𝑐2 + 𝑐3 = 1
𝑐2 𝑎2 + 𝑐3 𝑎3 = 12
(3.12)
𝑐2 𝑎22 + 𝑐3 𝑎32 = 13
𝑐3 𝑎2 𝑏32 = 16 }
There are now four equations in six unknowns and there exists a two-parameter family of solutions. Two
(i) 𝑐1 = 14, 𝑐2 = 0, 𝑐3 = 34, 𝑎2 = 13, 𝑎3 = 23, 𝑏32 = 23. The resulting method
ℎ
𝑦𝑛+1 − 𝑦𝑛 = 4 (𝑘1 + 3𝑘3 )
where 𝑘1 = 𝑓(𝑥𝑛 , 𝑦𝑛 ), 𝑘2 = 𝑓(𝑥𝑛 + 13ℎ, 𝑦𝑛 + 13ℎ𝑘1 ), 𝑘3 = 𝑓(𝑥𝑛 + 23ℎ, 𝑦𝑛 + 23ℎ𝑘2 ), is known as Heun’s
ℎ
𝑦𝑛+1 − 𝑦𝑛 = 6 (𝑘1 + 4𝑘2 + 𝑘3 )
The derivation of fourth-order Runge-Kutta (also called the classical R-K) method is
ℎ
𝑦𝑛+1 − 𝑦𝑛 = 6 (𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 )
where 𝑘1 = 𝑓(𝑥𝑛 , 𝑦𝑛 ), 𝑘2 = 𝑓(𝑥𝑛 + 12ℎ, 𝑦𝑛 + 12ℎ𝑘1 ), 𝑘3 = 𝑓(𝑥𝑛 + 12ℎ, 𝑦𝑛 + 12ℎ𝑘2 ), 𝑘4 = 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ𝑘3 )
21
Example 3.1: Solve the initial-value problem 𝑦 ′ = 𝑥 + 𝑦, 𝑦(0) = 1,0 ≤ 𝑥 ≤ 0.5 with ℎ = 0.1 by
(i) Euler’s explicit method
(iv) Fourth order Runge-Kutta method (work all computations correct to 4 decimal places and compare
Solution
2.1 0.9
𝑛 = 0; 𝑦1 = 1.9𝑦0 + 1.9(𝑥1 + 𝑥0 ) = 1.1105
2.1 0.9
𝑛 = 1; 𝑦2 = 1.9𝑦1 + 1.9(𝑥2 + 𝑥1 ) = 1.2432
2.1 0.9
𝑛 = 2; 𝑦3 = 1.9𝑦2 + 1.9(𝑥3 + 𝑥2 ) = 1.4004
2.1 0.9
𝑛 = 3; 𝑦4 = 1.9𝑦3 + 1.9(𝑥4 + 𝑥3 ) = 1.5847
2.1 0.9
𝑛 = 4; 𝑦5 = 1.9𝑦4 + 1.9(𝑥5 + 𝑥4 ) = 1.7989
ℎ
(iii) Two-step Adams-Moulton method: 𝑦𝑛+2 − 𝑦𝑛+1 = 12 [5𝑓𝑛+2 + 8𝑓𝑛+1 − 𝑓𝑛 ]
12+8ℎ ℎ
∴ 𝑦𝑛+2 = (12−5ℎ) 𝑦𝑛+1 + 12−5ℎ(5𝑥𝑛+2 + 8𝑥𝑛+1 − 𝑥𝑛 − 𝑦𝑛 )
12.8 0.1
= 11.5𝑦𝑛+1 + 11.5(5𝑥𝑛+2 + 8𝑥𝑛+1 − 𝑥𝑛 − 𝑦𝑛 ), 𝑛 = 0(1)3
12.8 0.1
𝑛 = 0; 𝑦2 = 11.5𝑦1 + 11.5(5𝑥2 + 8𝑥1 − 𝑥0 − 𝑦0 ) = 1.2430
22
12.8 0.1
𝑛 = 1; 𝑦3 = 11.5𝑦2 + 11.5(5𝑥3 + 8𝑥2 − 𝑥1 − 𝑦1 ) = 1.3999
12.8 0.1
𝑛 = 2; 𝑦4 = 11.5𝑦3 + 11.5(5𝑥4 + 8𝑥3 − 𝑥2 − 𝑦2 ) = 1.5839
12.8 0.1
𝑛 = 3; 𝑦5 = 11.5𝑦4 + 11.5(5𝑥5 + 8𝑥4 − 𝑥3 − 𝑦3 ) = 1.7977
𝑛 = 0; 𝑘1 = 𝑓(𝑥0 , 𝑦0 ) = 𝑥0 + 𝑦0 = 1
ℎ ℎ
𝑘2 = 𝑓 (𝑥0 + 2 , 𝑦0 + 2 𝑘1 ) = 𝑓(0.05,1.05) = 1.1
ℎ ℎ
𝑘3 = 𝑓 (𝑥0 + 2 , 𝑦0 + 2 𝑘2 ) = 𝑓(0.05,1.055) = 1.105
ℎ ℎ
𝑘2 = 𝑓 (𝑥1 + 2 , 𝑦1 + 2 𝑘1 ) = 𝑓(0.15,1.1708) = 1.3208
ℎ ℎ
𝑘3 = 𝑓 (𝑥1 + 2 , 𝑦1 + 2 𝑘2 ) = 𝑓(0.15,1.1763) = 1.3263
ℎ ℎ
𝑘2 = 𝑓 (𝑥2 + 2 , 𝑦2 + 2 𝑘1 ) = 𝑓(0.25,1.31494) = 1.5649
ℎ ℎ
𝑘3 = 𝑓 (𝑥2 + 2 , 𝑦2 + 2 𝑘2 ) = 𝑓(0.25,1.321047) = 1.5710
ℎ ℎ
𝑘2 = 𝑓 (𝑥3 + 2 , 𝑦3 + 2 𝑘1 ) = 𝑓(0.35,1.4846) = 1.8346
ℎ ℎ
𝑘3 = 𝑓 (𝑥3 + 2 , 𝑦3 + 2 𝑘2 ) = 𝑓(0.35,1.4914) = 1.8414
23
𝑛 = 4; 𝑘1 = 𝑓(𝑥4 , 𝑦4 ) = 𝑓(0.4,1.5836) = 1.9836
ℎ ℎ
𝑘2 = 𝑓 (𝑥4 + 2 , 𝑦4 + 2 𝑘1 ) = 𝑓(0.45,1.6828) = 2.1328
ℎ ℎ
𝑘3 = 𝑓 (𝑥4 + 2 , 𝑦4 + 2 𝑘2 ) = 𝑓(0.45,1.6902) = 2.1402
Using the exact solution 𝑦(𝑥) = 2𝑒 𝑥 − 𝑥 − 1, we tabulate these results in Table 3.1(a) while the errors are in
Table 3.1(b)
Table 3.1(a): Error for the numerical solution of 𝑦 ′ = 𝑥 + 𝑦, 𝑦(0) = 1,0 ≤ 𝑥 ≤ 0.5, ℎ = 0.1
24
Exercise 3.1: Consider the initial-value problem 𝑦 ′ = −𝑦 + 𝑥 + 1, 𝑦(0) = 1,0 ≤ 𝑥 ≤ 0.5. Solve the above by
(iii) Simpson’s method, with ℎ = 0.1 (work all computations correct to 4 decimal places and compare
4. PREDICTOR-CORRECTOR METHODS
Euler’s method is crude and rarely used in practice; a simple refinement, however, leads to the modified Euler’s
method (sometimes known as Heun’s method), which is the simplest of the class of predictor-corrector methods
Let us assume that the solution has already been carried as far as 𝑥 = 𝑥𝑛 , so that the next value of 𝑦 to be
calculated is 𝑦𝑛+1 . Integration of the equation 𝑦 ′ = 𝑓(𝑥, 𝑦) between the limits 𝑥𝑛 and 𝑥𝑛+1 leads to
or
𝑥
𝑦𝑛+1 = 𝑦𝑛 + ∫𝑥 𝑛+1 𝑓(𝑥, 𝑦)𝑑𝑥 (4.1)
𝑛
Since we do not know the dependence of 𝑦 upon 𝑥, we cannot evaluate the integral unless 𝑓 happens to be a
1
𝑦𝑛+1 = 𝑦𝑛 + 2(𝑥𝑛+1 − 𝑥𝑛 )[𝑓(𝑥𝑛 , 𝑦𝑛 ) + 𝑓(𝑥𝑛+1 , 𝑦𝑛+1 )]
Occasionally, this equation can be solved explicitly for 𝑦𝑛+1 (when the original differential equation is linear).
∗
Generally, however, this is not possible, and the crude value 𝑦𝑛+1 given by Euler’s method is substituted in the
right-hand side of (4.2). The two equations used in the modified Euler’s method are then
∗
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓𝑛 (4.3)
25
∗
𝑦𝑛+1 = 𝑦𝑛 + ℎ2[𝑓𝑛 + 𝑓𝑛+1 ] (4.4)
∗ ∗ ).
where 𝑓𝑛 ≡ 𝑓(𝑥𝑛 , 𝑦𝑛 ) and 𝑓𝑛+1 ≡ 𝑓(𝑥𝑛+1 , 𝑦𝑛+1
Equations (4.3) and (4.4) are known respectively as the predictor and the corrector, since the first provides a
rough estimate of 𝑦𝑛+1 , which is improved upon by the second. In fact, the application of the corrector amounts
to a single application of a simple iterative process, and further iterations will usually improve the value of 𝑦𝑛+1
still further. However, it is generally preferable, when using predictor-corrector methods, to achieve increased
accuracy by using a smaller step length rather than by multiple iteration of the corrector. This reduces the effect
Example 4.1: Find 𝑦(0.2) if 𝑦 ′ = −𝑦𝑥, 𝑦(0) = −1 using the modified Euler method with ℎ = 0.1 (compute to four
decimal places).
Solution
𝑥
𝑓𝑛 = −𝑦𝑛 , 𝑦0 = −1, ℎ = 0.1, ⇒ 𝑥0 = 0, 𝑥1 = 0.1, 𝑥2 = 0.2
𝑛
∗
The predictor (4.3) gives 𝑦𝑛+1 = 𝑦𝑛 + 0.1 (−𝑦𝑥𝑛𝑛 ) , 𝑛 = 0,1
𝑥
𝑛 = 0, 𝑦1∗ = 𝑦0 + 0.1 (−𝑦0 ) = −1
0
(1)
The corrector (4.4) gives 𝑦𝑛+1 = 𝑦𝑛 + 0.1
2
[−𝑦𝑥𝑛𝑛 − −𝑦𝑥𝑛+1
∗ ]. Hence
𝑛+1
(2)
The second application of the corrector gives 𝑦𝑛+1 = 𝑦𝑛 + 0.1
2
[−𝑦𝑥𝑛𝑛 − −𝑥𝑛+1
(1) ] so that
𝑦𝑛+1
𝑥
𝑛 = 1, 𝑦2∗ = 𝑦1 + 0.1 (−𝑦1 ) = −0.9849
1
(1)
The first application of the corrector gives 𝑦2 = −0.9950 + 0.1 [ 0.1 + 0.9849
2 0.9950
0.2
] = −0.9798 and the second
(2)
application of the corrector gives 𝑦2 = −0.9950 + 0.1[ 0.1 + 0.9798
2 0.9950
0.2
] = −0.9798
∴ 𝑦(0.2) ≅ 𝑦2 = −0.9798.
26
Exercise 4.1: Solve the initial-value problem in Exercise 3.1 by using the predictor-corrector pair
ℎ
𝑦𝑛+2 = 𝑦𝑛+1 + [3𝑓𝑛+1 + 𝑓𝑛 ]
2
ℎ
𝑦𝑛+2 − 𝑦𝑛+1 = 12[5𝑓𝑛+2 + 8𝑓𝑛+1 − 𝑓𝑛 ]
Let us consider the numerical solution of the ivp of the first order ordinary differential equation of the form
on a given mesh 𝑎 = 𝑥0 < 𝑥1 < 𝑥2 < ⋯ < 𝑥𝑛 < 𝑥𝑛+1 < ⋯ < 𝑥𝑁 = 𝑏, where ℎ = 𝑥𝑛+1 − 𝑥𝑛 , 𝑛 = 0,1, … , 𝑁 − 1
denotes a constant step size while 𝑘 denotes the step number of he required method.
The basic assumption on 𝑓 is that it satisfies the conditions stated in Theorem 1.1, which guarantee a unique
A method used to obtain numerical values at each mesh or grid point 𝑥𝑛 is known as a discrete method. Despite
their simplicity and wide applicability, the discrete numerical integration algorithms have certain drawbacks
inherent in them. As such recent researches have yielded interesting results for continuous integration algorithms
through various approaches. It has also been observed that the continuous formulations of discrete methods tend
For example, he continuous schemes can be used for further analytical work such as differentiation, integration,
etc with ease than the discrete schemes where the latter employ extra interpolatory work, numerical
differentiation and integration for such purposes. Moreover, they provide better estimates for the global errors.
The continuous schemes above all provide approximations at all interior points unlike the discrete ones.
Since we shall derive the continuous formulation of discrete LMMs by collocation, next we define a collocation
method.
A collocation method can simply be described as a method which involves the determination of an approximate
solution in a suitable set of functions, sometimes called trial or basis functions. Oftentimes, polynomials and
rational functions could serve as bases functions. The approximate solution is required to satisfy the differential
27
equation (5.1) and its supplementary conditions at certain points in the range of interest called the collocation
points.
The collocation methods by their very nature yield continuous solutions and the principle behind multistep
collocation is to allow the collocation polynomial use information from previous points in the integration.
A point at which the solution 𝑦(𝑥) of the function is evaluated is called an interpolation point while a point at
Derivation Technique
We now consider the derivation of the multistep collocation method for constant step size and give recursive
expressions for the coefficients. The values of 𝑘 and 𝑚 are arbitrary except for collocation at the mesh points,
where 0 < 𝑚 ≤ 𝑘 + 1. Let 𝑦̅𝑛+𝑗 be approximations to 𝑦𝑛+𝑗 , where 𝑦𝑛+𝑗 ≡ 𝑦(𝑥𝑛+𝑗 ), 𝑗 = 0,1, … , 𝑘 − 1. Then a 𝑘-
𝑡−1 𝑚−1
𝑡+𝑚−1 𝑡+𝑚−1
In (5.2), 𝑥𝑛+𝑗 are 𝑡 (0 < 𝑡 ≤ 𝑘) arbitrary chosen interpolation points taken from {𝑥𝑛 , 𝑥𝑛+1 , … , 𝑥𝑛+𝑘−1 } and the
28
From the interpolation conditions (5.3), (5.4) and the expression for 𝑦̅(𝑥) in (5.2), the following conditions are
and
𝐷𝐶 = 𝐼 (5.8)
where
1 𝑥𝑛 𝑥𝑛2 … 𝑥𝑛𝑡+𝑚−1
1 𝑥𝑛+1 2 𝑡+𝑚−1
𝑥𝑛+1 … 𝑥𝑛+1
⋮ ⋮
2 𝑡+𝑚−1
𝐷= 1 𝑥𝑛+𝑡−1 𝑥𝑛+𝑡−1 𝑥𝑛+𝑡−1
…
… (𝑡 + 𝑚 − 1)𝑥̅ 𝑡+𝑚−2
0 1 2𝑥̅0 0
⋮ ⋮
[0 1 2𝑥̅𝑚−1 … (𝑡 + 𝑚 − 1)𝑥̅𝑚−1𝑡+𝑚−2
]
and 𝐼 is the identity matrix of dimension (𝑡 + 𝑚) × (𝑡 + 𝑚). The matrices, 𝐷 and 𝐶, are also of the same
dimensions. It follows from (5.8) that the columns of 𝐶 = 𝐷 −1, give the continuous coefficients 𝛼𝑗 (𝑥) and 𝛽𝑗 (𝑥).
𝑦̅(𝑥) = ∑𝑘−1
𝑗=0 𝛼𝑗 (𝑥)𝑦𝑛+𝑗 + ℎ𝛽𝑘 (𝑥)𝑓𝑛+𝑘 (5.9)
29
and it follows from (5.10) that the columns of 𝐶 = 𝐷 −1 give the continuous coefficients 𝛼𝑗 (𝑥), 𝑗 = 0,1, … , 𝑘 − 1
and 𝛽𝑘 (𝑥).
Case 𝑘 = 1.
1 𝑥𝑛 𝛼01 ℎ𝛽11
𝐷𝐶 = [ ][ ]=𝐼
0 1 𝛼02 ℎ𝛽12
1 −𝑥𝑛 𝛼 ℎ𝛽11
Now 𝐶 = 𝐷 −1 ⇒ [ ] = [ 01 ] and from (5.5), we have
0 1 𝛼02 ℎ𝛽12
Substituting the above continuous coefficients into (5.11), we obtain the following continuous method
𝑦̅(𝑥) = 𝑦𝑛 + (𝑥 − 𝑥𝑛 )𝑓𝑛+1
or
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓𝑛+1
In this method, 𝑚 = 𝑘 + 1, 𝑡 = 1, 𝑥̅𝑗 = 𝑥𝑛+𝑗 , 𝑗 = 0,1, … , 𝑘 and 𝛼0 (𝑥) = 𝛼𝑘−1 (𝑥). Then (5.2) and (5.8) become
respectively
and
30
1 𝑥𝑛+𝑘−1 2 𝑘+1 𝛼𝑘−1,1 ℎ𝛽01 … ℎ𝛽𝑘1
𝑥𝑛+𝑘−1 … 𝑥𝑛+𝑘−1
0 1 2𝑥𝑛 … (𝑘 + 1)𝑥𝑛 𝑘 𝛼𝑘−1,2 ℎ𝛽02 … ℎ𝛽𝑘2
𝐷𝐶 = =𝐼 (5.13)
⋮ ⋮ ⋮ ⋮ ⋮
𝑘 𝛼
[0 1 2𝑥𝑛+𝑘 … (𝑘 + 1)𝑥𝑛+𝑘 ] [ 𝑘−1,𝑘+2 ℎ𝛽0𝑘+2 … ℎ𝛽𝑘,𝑘+2 ]
Case 𝑘 = 1
and
Substituting these continuous coefficients into (5.14), we obtain the following continuous method
or
ℎ
𝑦𝑛+1 − 𝑦𝑛 = 2 [𝑓𝑛 + 𝑓𝑛+1 ]
In this method, 𝑚 = 𝑘, 𝑡 = 1, 𝑥̅𝑗 = 𝑥𝑛+𝑗 , 𝑗 = 0,1, … , 𝑘 and 𝛼0 (𝑥) = 𝛼𝑘−1 (𝑥). Thus (5.2) and (5.8) become
respectively
𝑘−1
and
ODEs
For the solution of the above ivp, we consider linear 𝑘-step methods of the form
𝑘 𝑘
With the LMM (6.2), we associate the linear difference operator defined by
where 𝑦(𝑥) is an arbitrary function, continuously differentiable on an interval [𝑎, 𝑏]. If we assume that 𝑦(𝑥) has
as many higher derivatives as we require, then on Taylor expanding about the point 𝑥, we obtain
where
𝑐0 = 𝛼0 + 𝛼1 + ⋯ + 𝛼𝑘
𝑐1 = 𝛼1 + 2𝛼2 + ⋯ + 𝑘𝛼𝑘
1
𝑐2 = 2!(𝛼1 + 22 𝛼2 + ⋯ + 𝑘 2 𝛼𝑘 ) − (𝛽0 + 𝛽1 + ⋯ + 𝛽𝑘 )
1
𝑐3 = 3!(𝛼1 + 23 𝛼2 + ⋯ + 𝑘 3 𝛼𝑘 ) − (𝛽1 + 2𝛽2 + ⋯ + 𝑘𝛽𝑘 )
⋮
1 1
𝑐𝑞 = 𝑞!(𝛼1 + 2𝑞 𝛼2 + ⋯ + 𝑘 𝑞 𝛼𝑘 ) − (𝑞−2)!(𝛽1 + 2𝑞−2 𝛽2 + ⋯ + 𝑘 𝑞−2 𝛽𝑘 ), 𝑞 = 3,4, …
32
Then the method has order 𝑝 if 𝑐0 = 0, 𝑐1 = 0, … , 𝑐𝑝 = 0, 𝑐𝑝+1 = 0 but 𝑐𝑝+2 ≠ 0 and 𝑐𝑝+2 is called the error
constant and 𝑐𝑝+2 ℎ𝑝+2 𝑦 (𝑝+2) (𝑥𝑛 ) is the principal local truncation error at the point 𝑥𝑛 .
The method is said to be consistent if it has order at least one. If we define the first and second characteristic
polynomials 𝜌(𝜉) = ∑𝑘𝑗=0 𝛼𝑗 𝜉𝑗 and 𝜎(𝜉) = ∑𝑘𝑗=0 𝛽𝑗 𝜉 𝑗 respectively, then the method is consistent if and only if
The polynomial 𝜌(𝜉) associated with a consistent method thus has a double root at ; this is the principal root,
The LMM (6.2) is said to be zero-stable if no root of the first characteristic polynomial 𝜌(𝜉) has modulus greater
than one, and if every root of modulus one has multiplicity not greater than two.
The family of methods (6.2)for which 𝜌(𝜉) = 𝜉 𝑘 − 2𝜉 𝑘−1 + 𝜉 𝑘−2 are frequently referred to as Stormer-Cowell
methods. The best known such methods is the optimal two-step method
ℎ2
𝑦𝑛+2 − 2𝑦𝑛+1 + 𝑦𝑛 = 12[𝑓𝑛+2 + 10𝑓𝑛+1 + 𝑓𝑛 ]
The LMM (6.2) is said to be absolutely stable for a given ℎ̅ if for all that ℎ̅, all the roots 𝑟𝑠 of the stability
An interval [𝛼, 𝛽] of the real line is said to be an interval of absolute stability if the method is absolutely stable for
Exercise 6.1: Find the order, error constant and the interval of absolute stability of the Numerov method.
2
Solution: 𝑦𝑛+2 − 2𝑦𝑛+1 + 𝑦𝑛 = ℎ12 [𝑓𝑛+2 + 10𝑓𝑛+1 + 𝑓𝑛 ], 𝛼0 = 1, 𝛼1 = −2, 𝛼2 = 1, 𝛽0 = 12
1
, 𝛽1 = 10
12
1
, 𝛽2 = 12
𝑐0 = 𝛼0 + 𝛼1 + 𝛼2 = 1 − 2 + 1 = 0
𝑐1 = 𝛼1 + 2𝛼2 = −2 + 2 = 0
1
𝑐2 = 2(𝛼1 + 4𝛼2 ) − (𝛽0 + 𝛽1 + 𝛽2 ) = 1 − 1 = 0
1 1
𝑐3 = 6(𝛼1 + 8𝛼2 ) − 2(𝛽1 + 2𝛽2 ) = 1 − 1 = 0
33
1 1 14 14
𝑐4 = 24(𝛼1 + 16𝛼2 ) − 2(𝛽1 + 4𝛽2 ) = 24−24 = 0
1 1 1 1
𝑐5 = 120(𝛼1 + 32𝛼2 ) − 6(𝛽1 + 8𝛽2 ) = 4−4 = 0
1 1 31 42 1
𝑐6 = 720(𝛼1 + 64𝛼2 ) − 24(𝛽1 + 16𝛽2 ) = 360−288 = −240
1
Hence Numerov method is of order 𝑝 = 4 with error constant 𝑐6 = −240.
𝜌(𝑟) 1
ℎ̅ = 𝜎(𝑟), ̅ =ℎ2 𝜆, 𝜌(𝑟)
𝑟=𝑒 𝑖𝜃 , 0°≤𝜃≤180°, ℎ = 𝑟 2 − 2𝑟 + 1, 𝜎(𝑟) = 12(𝑟2 +10𝑟+1)
(b) Use Schur’s method to obtain the absolute stability interval of Euler’s implicit method.
(b) Find the order and error constant of the method derived in 2(a) above.
(c) Obtain the interval of absolute stability of the method in 2(a) using the boundary locus method.
𝑦1′ = 𝑦2
34