Numerische Mathematik
Numer. Math. 48, 383-389 (1986)
9 Springer-Verlag1986
A- and B-Stability for Runge-Kutta Method...
7 downloads
346 Views
257KB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Numerische Mathematik
Numer. Math. 48, 383-389 (1986)
9 Springer-Verlag1986
A- and B-Stability for Runge-Kutta Methods Characterizations and Equivalence* E. Hairer Section de math6matiques 2-4, rue du Li~vre, Case postale 240, CH-1211 Gen6ve24, Switzerland
Summary. Using a special representation of Runge-Kutta methods (Wtransformation), simple characterizations of A-stability and B-stability have been obtained in [9, 8, 7]. In this article we will make this representation and their conclusions more transparent by considering the "exact RungeKutta method". Finally we demonstrate by a numerical example that for difficult problems B-stable methods are superior to methods which are "only" A-stable.
Subject Classifications: AMS(MOS): 65L20; CR: G.1.7.
1. Introduction For the numerical solution of the system
y'=f(x,y),
y(xo)=y o
(1.1)
we consider m-stage (implicit) Runge-Kutta methods m
g i = y o + h ~. aijf(Xo+Cjh, gj), j=l
i= 1..... m,
Yl = y o + h ~ blf(Xo+Cih, gi),
(1.2a)
(1.2b)
i=1
which are of order at least one. It is well-known that for stiff equations (1.1) the integration scheme must possess good stability properties. Let us shortly recall two of the most important stability concepts. The oldest one - A-stability - has been introduced in the classical paper of Dahlquist [4]. It is related to the scalar equation y ' = 2 y and requires the *
Talk, presented at the conference on the occasion of the 25th anniversary of the founding of
Numerische Mathematik, TU Munich, March 19-21, 1984
384
E. Hairer
boundedness of the numerical solution (for every stepsize h>0) whenever Re2<__0. For Runge-Kutta methods the numerical solution is given by Y,+I =R(h2)y,, where the stability function R(z) is a rational function. In this case A-stability is equivalent to ]R(z)]< 1
for Rez <0.
(1.3)
To get more insight into the numerical solution of non-linear differential equations, Dahlquist [5] proposed to consider equations (1.1) that satisfy Re ( f ( x , y) - f ( x , z), y - z } <0
(1.4)
for some inner product. This condition expresses that for any two solutions y(x), z(x) the distance Ily(x)-z(x)41 is non-increasing when x is growing. A Runge-Kutta method is called B-stable (Butcher [2]), if condition (1.4) implies IbYl-ziLl < Liyo-ZolI for any two numerical solutions. We first consider the "exact Runge-Kutta method" (Sect. 2) and investigate a very natural transformation. This leads to a new interpretation of the Wtransformation (Sect. 3). We then recall the most important results from [8-10] (Sect. 4) and, finally, we give an instructive numerical experiment (Sect. 5).
2. The "Exact Runge-Kutta Method"
For notational convenience let us put Xo=0 and h = 1. If we then replace the finite weighted sums in (1.2) by the integrals, which they approximate, we arrive at the socalled "exact Runge-Kutta method" x
y(x) = Yo + I f(s, y(s)) ds,
(2.1 a)
0 1
y(1) = Yo + I f ( x, y(x)) d x. o
(2.1 b)
Clearly, the exact solution of (1.1) satisfies (2.1). In order to avoid the integrals in (2.1) it is natural to expand the functions y(x) and f(s,y(s)) with respect to the basis of (shifted) Legendre polynomials:
Le.(x)
y(x)-
,>=o
(2.2)
f(s, y(s)) ~ 2 • P,(s). n_>_O
Recall that, by definition, the Legendre polynomials P~(x) are orthonormal with respect to 1
(f,, g) = I f ( x ) g(x) d x. 0
Inserting the expressions (2.2) into (2.1 a) we obtain x
Z ;.e.(x)=yo eo(X)+ Ef.le.(s)ds n>=O
n>0
0
(2.3)
A- a n d B - S t a b i l i t y for R u n g e - K u t t a M e t h o d s
385
and by using the integration formulas (cf. [10], p. 211) x
SP,(s)ds=~.+IP,+I(x)-~,P._I(x),
n>l,
0 x
~Po(s)ds=~l Pl(X)+89
'
~,-
o
1 2l/4n 2 - 1
we arrive at (2.4a)
where the infinite matrix ~ .... t is given by
f~ ) 9
--~2.
The equation (2.1b) now simply reads Y(1)=y0 +fo.
(2.4b)
In the next section we try to find a similar representation for the "finite" Runge-Kutta method (1.2).
3. A new Interpretation of the W-Transformation
In the following we treat only R u n g e - K u t t a methods with positive weights b i and distinct c i and we again assume x 0 =0, h = 1. Instead of the functions (2.2) we consider - for a given R u n g e - K u t t a m e t h o d - the polynomials g(x) and f ( x ) (of degree m - l ) that interpolate the values gz and f(ci, gi) (i=1 .... ,rn), respectively. We then write them as m--1
m-1
g ( x ) = ~ ~,,p,(x),
/(x)=
n=O
~f,p,(x),
(3.1)
n=O
where the polynomials p,(x) (of degree n - 1) are o r t h o n o r m a l with respect to ( f , g)~ = ~ bJ(ci) g(ci).
(3.2)
i=1
Because of g(cz)=g i it follows from (3.1) that (gl, .-., g,,)T = W (~,~....
, gin-
1) T
(3.3)
386
E. Hairer
where the matrix W is given by
w=IP~
I .
(3.4)
\PO('Cm)"'" Pro-i(Cm)/ (This transformation W has been introduced in [9, 10] for the study of Bstable Runge-Kutta methods). If we insert (3.3) and an analoguous relation for f; into (1.2) we obtain the transformed Runge-Kutta method
( gOI
1 /~
/fO ~
-, ----'"o+ fo t:",0//§ Vo- ',)' yl=Yo +fo .
(3.5b)
Here the matrix ~r is given by
= W- 1AW- 89 e T,
(3.6)
where the entries of A are the coefficients aij of (1.2) and e 1=(1, 0. . . . . 0) T. A comparison of (3.5) with (2.4) makes it plausible that "the better b' approximates y .... t the higher is the order of the method". Indeed, the following result has been given in [9].
Theorem 1. Let the quadrature formula 0/.,.
Y~---
-(1 0
0 \
(b i >
0 and distinct ci) be of order p. If
k = [ ( p - 1)/23,
~karbitrary
-~k
~k ~
(3.7)
(erl~Ckel= 0 for p even),
then the Runge-Kutta method, whose coefficients bl, ci are given by the quadrature formula and aij by (3.6), is of order p. [] 4. A-Stability, B-Stability and their Equivalence We show in this section that the use of the transformed Runge-Kutta method (3.5) leads to simple characterizations of A- and B-stability in terms of the matrix ~#.
A-Stability For the test equation y ' = A y it holds f,=2g,,. After a short calculation, using the representation (3.5), we obtain YI R(2)Yo where =
A- and B-Stabilityfor Runge-KuttaMethods
l+89
R(z)= 1 - 89
'
387 0(z) =ze~(l - z y ) - ' e,.
(4.1)
A well-known property of the M6bius-transform implies that A-stability (i.e. condition (1.3)) is equivalent to Re0(z)<0
for Rez<0.
(4.2)
Suppose now that the matrix ~, is given by (3.7)9 In this case the function 0(z) can be written as (use Cramer's rule and the Laplace expansion formula) Z
~'2 Z 2
~'2
Z2
0(Z)=l~+[-~-zl gl J q - _ . . . +(~k~ +l ~ k
2Z
Z 0k(),
Ok(Z) = ze~(l -- Z~Ck)- 1el ,
(4.3a) (4.3 b)
and the A-stability condition (4.2) becomes equivalent to Re0R(Z) <0
for Rez<0.
(4.4)
For a detailed proof of these statements we refer to I-8]. The idea of using continued fractions can already be found in Varga [11]. B-Stability
It has been proved independently by Burrage-Butcher [1] and Crouzeix [3] that (under the assumption bi>O and ci distinct) B-stability of (1.2) is equivalent to BA + AT B - b b r >=O (4.5) where B=diag(b l .... ,b,,) and b=(b 1.... ,bin)T. In order to simplify this condition, the W-transformation has been introduced in [9]. Indeed, using W r B W =identity (orthonormality of p,(x)) we have W r ( B A + A T B - b b r ) W = y + ~ r and (4.5) is seen to be equivalent to ~+~r_>0.
(4.6)
If the matrix ~ is given by (3.7), this condition becomes (49
yk + y r >=o
which is a simple characterization of B-stability in terms of the parametermatrix Ya. The Equivalence
There exists an interesting relation between the above two characterizations: Lemma 2 [8]. The rational function l nt-O~lZ-t-...-t-~m_k_ l z m - k - 1
O~(z)=z. l+&z+.. 9 + t ~~ . , - k
z "-k
(4.8)
388
E. H a i r e r
satisfies (4.4), /f and only if there exists an (m-k)-dimensional matrix ~r such that (4.3b) and (4.7) hold. This l e m m a is the key for the p r o o f of T h e o r e m 3 (Equivalence of A- and B-stability, [8]). To every A-stable Runge-
Kutta method there exists a B-stable one, which has the same order and the same stability function.
5. A N u m e r i c a l E x p e r i m e n t
We consider a one-parameter family of 3-stage R u n g e - K u t t a methods. Its coefficients b i, c i are those of the Simpson-rule and the aij are given via (3.6) by
o Y=
21/5
1
? = 1/6,
c~fl = - 1/36
0~
where e > 0 is a free parameter. This family of R u n g e - K u t t a methods has the following properties: (i) it is of order 4 for all ~ (by T h e o r e m 1); (ii) it is A-stable for all e (because of (4.4)) and its stability function l + 89 z R(z) = 1 - 2 z + 7 z 2 -~g6 z3
is even independent of ~. (iii) because of (4.7) the m e t h o d is B-stable only for ~ + fl=0, i.e. c~= 1/6. We apply this m e t h o d for various a to the differential equation (cf. [6]) 0
U(x)y, -
-
U(x) =
.
--slnx
cosx!
]
(5.1)
with initial value Y0 = ((~2 + e)/(2~2 + 2e + 1), 1) r. This initial value lies already on the s m o o t h solution. The R K - m e t h o d above is implemented with the usual stepsize-strategy, where the absolute local error - estimated by Richardson extrapolation - is kept smaller than a given tolerance TOL. In Fig. 1 the n u m b e r of function evaluations, which are needed to compute the solution for g = 10 -6 over the interval [0,2hi, is plotted against logl0(~ ) for three different values of T O L . If we plot the c o m p u t e r time against logl0(~ ) we obtain the same picture. The second figure (Fig. 2) shows the contractivity factor [Jyl - z~ [I/l[Yo - Zo l[ (Y0 - Zo is an eigenvector of the jacobian corresponding to the eigenvalue - l / e ) for several realistic stepsizes. Both figures illustrate that the methods perform worse if the p a r a m e t e r ~ is chosen far from ~ = 1/6 (B-stable). K. D e k k e r has pointed out to the author that the m e t h o d above is BSI-stable
A- and B-Stability for Runge-Kutta Methods
389
2000.
2.
1.
1500.
~ 6
ooo.
O.
\
TOL=IO-j.
/
I. h=O08~
2.
V
/
3. 500.
L ~ TEl = O. I I I I I I I ~ -3. -2. - 1. I
[
4. I
I
t
I
O.
Fig. l. Number of function evaluations
~
J
t.
5. -3.
i
i
t
i
J
-2.
i
i
i
i
I
-1.
i
i
i
i
I
i
I
O.
i
i
1.
Fig. 2. Loglo (contractivity factor)
for c~e(]/~/18, l / 6 / 1 2 ) (cf. [6] for the d e f i n i t i o n of BSI-stability). It t u r n s o u t t h a t the m i n i m a of the curves (Fig. 1 a n d Fig. 2) lie w i t h i n this interval.
References 1. Burrage, K., Butcher, J.C.: Stability criteria for implicit Runge-Kutta methods. SIAM J. Numer. Anal. 16, 46-57 (1979) 2. Butcher, J.C.: A stability property of implicit Runge-Kutta methods. BIT 15, 358-361 (1975) 3. Crouzeix, M.: Sur la B-stabilit6 des m6thodes de Runge-Kutta. Numer. Math. 32, 75-82 (1979) 4. Dahlquist, G.: A special stability problem for linear multistep methods. BIT 3, 27-43 (1963) 5. Dahlquist, G.: Error analysis for a class of methods of stiff non-linear initial value problems. Numerical Analysis, Dundee 1975. Springer Lect. Notes Math. 506, 60-74 (1975) 6. Dekker, K., Verwer, J.G.: Stability of Runge-Kutta methods for stiff nonlinear differential equations. Amsterdam: North-Holland 1984 7. Hairer, E.: Constructive characterization of A-stable approximations to exp(z) and its connection with algebraically stable Runge-Kutta methods. Numer. Math. 39, 247-258 (1982) 8. Hairer, E., Tiirke, H.: The equivalence of B-stability and A-stability. BIT 24, 520-528 (1984) 9. Hairer, E., Wanner, G.: Algebraically stable and implementable Runge-Kutta methods of high order. SIAM J. Numer. Anal. 18, 1098-1108 (1981) 10. Hairer, E., Wanner, G.: Characterization of non-linearly stable implicit Runge-Kutta methods. Numerical Integration of Differential Equations and Large Linear Systems. Bielefeld 1980. Springer Lect. Notes Math. 968, 207-219 (1982) 11. Varga, R.S.: On high order stable implicit methods for solving parabolic partial differential equations. J. Math. Phys. 40, 220-231 (1961) Received May 18, 1984/October 26, 1984