Integrating ODE`s in the Complex Plane-Pole Vaulting

MATHEMATICS OF COMPUTATION, VOLUME 35, NUMBER 152
OCTOBER 1980, PAGES 1181-1189
Integrating ODE's
in the Complex Plane-Pole Vaulting
By George F. Corliss
Abstract.
Most existing algorithms
ential equations
implicitly
tion is removed,
the solution
integration
in the complex
avoid singularities
ods.
We restrict
suitably
for solving initial value problems in ordinary differ-
assume that all variables are real.
can be extended
by analytic
plane of the independent
which can make the solution
our attention
modified.
variable.
difficult
examples
along a path of
This path is chosen to
or impossible
to Taylor series methods,
Numerical
If the real-valued assump-
continuation
although
for standard
other methods
are given for (a) singularities
meth-
can be
on the real axis,
(b) singularities
in derivatives
(c) singularities
near the real axis. These examples show that the pole vaulting method
its further
higher than those involved in the differential
study for some special problems
for which it is competitive
equation,
and
mer-
with standard
methods.
1. Introduction.
Nearly all existing numerical methods for solving initial value
problems in ordinary differential equations implicitly assume that all variables are
real. Normally the ability to integrate along a path in the complex plane is only of
academic interest because most problems are known to have real solutions. When
complex-valued solutions are needed, the real and imaginary parts are usually comput-
ed separately. In many problems, though, the computation of the solution is hampered by the presence of singularities
(a) on the real axis, e.g. (Painlevé equation)
y" = 6y2 +x,
(b)
y(0)=l,
/(0) = 0;
in derivatives higher than those which appear in the differential
equation,
e.g.
y' = (5/3)y/x,
y(-l)
= -l,
y(x) = xs'3;
or
(c) near the real axis, e.g.
y = -2xy2,
v(- 10) - 1/101, y{x) = 1/(1 + x2).
The technique of "pole vaulting" extends the solution to the ordinary differen-
tial equation by analytic continuation into the complex plane along a path which
avoids the troublesome singularity as shown in Figure 1. The classical theory of or-
dinary differential equations can be given in the context of complex variables [4].
Received May 29, 1979.
1980 Mathematics Subject Classification. Primary 65L05, 34A20.
Key words and phrases. Ordinary differential equations, numerical solutions, Taylor series,
numerical
analytic
continuation,
singularities
in the complex
plane, pole vaulting.
© 1980 American
Mathematical
002 5-5718/80/0000-01
1181
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
S9/S03.25
Society
1182
GEORGE F. CORLISS
We consider the ordinary differential equation (or system)
y'=f(x,y),
y(x0)=y0,
where both jc and y may be complex. We give some of the possible applications of
the pole vaulting approach and indicate its promise.
2. Analytic Continuation of Solutions to ODE's. The technique of analytic
continuation is well known in complex analysis. An analytic function is uniquely
determined by its values on any set with a limit point interior to the domain of analyticity, but the problem of determining a function /in a region from its values in a
subset of the region is an ill-posed problem. Miller [6] shows that an arbitrarily
small error in the data can introduce an arbitrarily large error in / at other points.
Analytic continuation is usually done by expanding / in a Taylor series about a
point interior to the domain of analyticity and rearranging the series. Henrici [5,
p. 170] shows that using this approach for numerical analytical continuation, by
using a truncated Taylor series, is a divergent process unless the series is shortened at
each stage by a fixed reduction factor. However, if an expression for computing
successive derivatives can be found, the divergence discussed by Henrici is no longer
present.
This is precisely the setting for the numerical solution to initial value prob-
lems in ordinary differential equations.
Standard methods are constructed to agree
with the first few terms of the Taylor series for the solution, so they can be viewed
as using derivatives computed (usually indirectly) from the differential equation to
analytically continue the solution away from the initial point. The problems considered in [5] and [6] then appear as the familiar problems of convergence and
stability which have been well studied.
This view of numerical ODE solvers as methods for analytic continuation
adds
nothing to our understanding as long as the independent variable x is real. If x is
complex, this view helps to account for the behavior of the solution observed near
poles, branch points, and essential singularities.
For example, if the path of integra-
tion circles a branch point, the computed solution may appear on a different sheet
of the Riemann surface from the desired solution.
The technique of pole vaulting may be implemented using any standard numeri-
cal method.
Taylor series or Runge-Kutta type methods require no essential modifi-
cations to be able to step in any direction in the complex plane, although some
changes may be necessary in coding and fine tuning. Multistep methods are more difficult to convert because the direction, if not the size, of the step must be changed constantly.
An implementation based on long Taylor series [1], [7] was chosen for the
examples in this paper because of the ease and accuracy with which an optimal step-
size could be determined.
Chang's Automatic Taylor Series (ATS) translator [1] was
used to produce a FORTRAN code for generating the first 30 terms of the Taylor
series for the solution.
This code was converted into a complex implementation which
used the three-term test [2] to determine the location and order of the singularity
closest to the point of expansion at each step. The length of each step of the analyLicense or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
INTEGRATING ODE'S IN THE COMPLEX PLANE-POLE VAULTING
1183
tic continuation along a prescribed path was taken as large as possible consistent with
error control demands. Thus much smaller steps were taken near a singularity. Computations were done on a Xerox Sigma 9 computer in single-precision complex arithmetic.
The three-term test was developed to estimate the location and order of a single
primary singularity by comparing the series for the solution to the series for the model
problem
v(z; a, s) = (a- z)~s,
Theorem
[2].
Let 2jlj
s ¥=0, -1, . . . .
a,- be a nonzero series such that
exists and equals L. Then
(i) if\L\ < 1, 2 a,- is absolutely convergent,
(ii) if\L\ = 1, the test fails, and
(iii) // \L\ > 1, 2 a,-diverges.
Let g be an analytic function, a,+ j := g('\x0)h'/i\
(where h := x - xQ), and
Rj := iai+ j/a,.. Then we can estimate the radius of convergence from
0)
h/Re^Rt-Rt_1,
,
and the order of the primary singularity by
(2)
s */ty(*, -/W-/
+1.
Several estimates from (1) are then compared to estimate the error in the estimate
for h/Rc.
[2] shows that the three-term test is superior to several other well-known
methods for estimating the radius of convergence of a series for many examples.
Pole vaulting is an interesting application
of this theorem.
a natural generalization of the usual paths of integration.
It can be viewed as
As implemented with the
Taylor series method, the solution is available not only at discrete points but also at
any point in some region of the complex plane containing the desired path.
This
technique promises improved speed and accuracy for some types of problems. The
remainder of this paper considers several numerical examples showing how to apply
the pole vaulting technique to problems with singularities on the real axis, with sin-
gularities in derivatives higher than those appearing in the differential equation, and
with conjugate pairs of singularities near the real axis.
3. Poles on the Real Axis. The problem of extending the solution of the
first Painlevé equation,
(3)
y" = 6y2 + x,
v(0) = l,
/(0) = 0,
beyond its first singular points (poles of order 2) on the real axis was considered by
Davis [3, p. 245]. He outlined two methods by which this can be done. The first
method of pole vaulting is specific to this equation, but the second method extended
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
1184
GEORGE F. CORLISS
the solution by analytic continuation
around the path shown in Figure 1. We will
follow the latter approach. Davis' two approaches gave y(\ .5) = 11.63 and v'O -5) =
-79.46, or y( 1.5)= 11.78 +0.11 i and /(l. 5) = -79.50 + 0.59 ^respectively. One
measure of the error is the imaginary components of these estimates, both of which
should be 0.
CO
I—I
X
>-
cr
1.20
O
en
-1-*-
S
l.C
1.5
REALAXIS
Figure 1
Pole vaulting for the Painlevè equation
We solved the Painlevè equation using 30 terms and a variable stepsize instead of
5 terms and constant steps of 0.01 used by Davis. The results are summarized in
Table I. Since the exact value of >>(1.5)is not known, the error in these computations may be estimated by the magnitude of the imaginary part of the computed solu-
tion at 1.5.
Table I
Pole vaulting for the Painlevè equation
Step
Number
X0-5 + 0.5/)
y(1.5)
Steps
y (0.5 + 0.50
>>'(1.5)
0.67?c
9
0.3462+1.2075/
-0.7405 + 3.4193 /
11.6160 + 5E-4 i
-79.4260 - 7E-3 i
0.2RC
24
0.3462 + 1.2075 /
-0.7408 + 3.4200 /
11.6136 - 1E-4 /
-79.4025 + 9E-4 i
0.01*
250
0.3289 + 1.2119/
-0.7011 + 3.4670 i
11.7796 + 0.1152 i
-79.5588 + 0.5880 i
*Davis' results using a 5 term-series.
The pole vaulting approach can also be used in conjunction with the three-term
test to accurately locate a sequence of poles. In Figure 2, the first six poles of (3)
on the negative real axis are found in 33 steps using a stepsize of 0.6RC. As a test
of the accuracy of the solution, which was being analytically continued past a sequence
of poles, these values were also computed:
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
INTEGRATING ODE'S IN THE COMPLEX PLANE-POLE VAULTING
1185
After passing 3 poles,
y(6) = 2.16 + 2.6E-4 /, v'(6) = -0.53 - 2.0E-3 /.
After passing 6 poles,
7(10.5) = 5.59 + 2.5E-3 /, y(10.5) = 23.50 + 1.8E-2 /,
where the true values must have imaginary part 0. The computed location of the
sixth pole was - 10.0679-0.0001 i
0<>0 <><î><><£00000
-12
00 000
OOOOO
0
0000
0 T
0
-2
*♦
in
0
0 -io
-8
-6
■+-X-K-«-X—*—X-'—X-'—X -4
REALAXIS
-6.84
-5.11
10.01 -8.49
-3.26
■1.22
Figure 2
Negative poles of the Painlevè equation
Since this method can vault over poles on the real axis, we ask whether it is
better to stay far away from the pole or to approach it closely before integrating
around it. y = x~2, the solution to y' —- 2y/x, y(-10) = 0.01, has no secondary
singularities like those which complicated the solution of the Painlevè equation.
A
-10
lO
-I
i-»-*—fr-
C
-10
,
10
-10
D
I—»—*—•-'
Figure 3
Possible paths of integration
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
1186
GEORGE F. CORLISS
This problem was solved along each of the four paths shown in Figure 3 using 30 terms
of the series and a variable stepsize of 0.6RC. If a fixed stepsize were used, the shortest path, A, would require the fewest steps, but if the stepsize is proportional to the
series radius of convergence, the same number of steps are required for the vaulting
part of the path regardless of how close to the pole that path is taken. As Table II
shows, paths further away from the pole require fewer steps and yield more accurate
results. Hence, any step approaching the pole on the real axis is wasted. The stepsize
on a circular path centered at the pole is constant, so a considerable savings on program overhead compared to the rectangular path is possible. For this problem, the
worst relative error for each path occurred at x = 10, and the imaginary part of .y(lO)
was typically about 5 x 10~8.
Table II
Comparison of several paths for y = x
Path
Number of
Steps
Worst Relative
Error
A
15
6.6 x 10~s
B
7
1.2 x 10_s
C
16
4.5 x 10~5
D
8
1.6 x 10-5
4. Singularities in Derivatives. We have shown that it is possible to integrate
around a pole on the real axis. For most problems of interest, however, a pole in the
solution has a physical significance, and the solution computed past that pole has no
physical relationship to the solution being computed before the pole was encountered.
If the pole vaulting technique is to be useful in practice, it must be applied to other
types of problems for which solutions exist but are difficult for standard methods to
compute.
One such class of problems has solutions with singularities in higher order derivatives not appearing in the differential equation. For example, y = f(x, y) = (5¡3)y/x,
y(- 1) = -1, has solution y = x5'3, which is defined on the entire real line, but y"
= (10/9)x~1/3 has a branch point at x = 0. The singularity at x = 0 in f(x, y) and
in y" makes this problem difficult, so we view x as a complex variable and vault
around the singularity.
Although the solution is known to be real on the entire real line, integrating
along paths similar to those shown in Figures 1 or 3 does not yield a real estimate for
the solution because the Riemann surface for y = Xs'3 has three sheets (see Figure 4).
Hence we integrated 1l/i times around x = 0 along the path shown in Figure 5 in 17
steps using a stepsize of 0.6RC. Some of the results are given in Table III.
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
INTEGRATING ODE'S IN THE COMPLEX PLANE-POLE VAULTING
1187
Figure 4
Riemann surface for xs¡3
Figure 5
Integration path for y = x5^3
Table
III
Integrating y = (5/3)y/x ltë times around x = 0
Computed Solution
-1.0
0.36 - 0.93 i
0.90 + 0.44 /
-0.96 + 0.28 /
0.52 - 0.85 i
1.0
-1.0
lErrorl
0.0
0.416 - 0.909 /
-0.960 + 0.279 /
0.839 + 0.544 /
-0.137 - 0.991 /
1.000-9 x 10-6 /
3 x 10~7
3 x 10~6
5 x 10~6
9 x 10~6
9 x 10~6
At each step of the analytic continuation, the three-term test yielded the radius
of convergence of the series with relative error at most 7 x 10-6 and the order of the
singularity with relative error at most 3 x 10-4.
Here the ability to recognize the
fractional order accurately is important because this estimate is used to determine the
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
1188
GEORGE F. CORLISS
number of sheets of the Riemann surface for the solution and hence the number of
times the singularity must be circled in order to return to the real branch of the solution.
5. Conjugate Pairs of Singularities. Another class of problems, which are costly
to solve by standard methods, contains problems with conjugate pairs of singularities
near the real axis. Very small steps are required near the singularities. For example,
[ 1] solved a celestial mechanics problem which required stepsize changes of 7 orders
of magnitude.
In this section, we consider two examples in which we vault over the
singularities without approaching them closely enough to require a substantial stepsize
reduction.
The equation y = ~2xy2, y(x0) = 1/(1 + x2,), has solution y = 1/(1 + x2) with
a pair of simple poles at x = ±i. To integrate directly from -104 to 104 using a stepsize
of 0.6RC requires 33 steps ranging in size from 6 x 103 to 6 x 10_1. The solution com-
puted in this manner has a relative error at x = 104 of 10_s, but near 0 the relative
error is nearly 100%! By contrast, integrating around a semicircle requires only 7 steps
regardless of the diameter.
Using the pole vaulting technique to integrate from -104
to 104 along a semicircle yields the largest relative error at x = 104 of 10~5. If it is
necessary to determine the behavior of the solution near x = 0, the direct path of
integration must be taken, and small steps must be used. However, if the solution near
x = 0 is not of interest, pole vaulting at a distance can yield sufficient accuracy, with
few enough large steps, to more than compensate for the additional cost of computing
in complex arithmetic.
6. Relative Merits of Pole Vaulting. We have given examples to show that a
solution to a differential
equation
can be analytically
continued
along a path in the
complex plane of the independent variable. This technique can be used (1) to extend
a solution past a pole on the real axis, (2) to avoid singularities on the real axis in
higher derivatives of the solution, or (3) to avoid taking very small integration steps
to pass between a conjugate pair of singularities.
Taylor series methods work well for
this analytic continuation because their high order yields high accuracy, and the
radius of convergence can be readily determined so that optimal length steps may be
taken. Taylor series methods can be easily adapted to any path, and since the coefficients of the series are computed at each step, the solution may readily be computed
not only at the points of expansion but also at any point within the region of convergence of the series.
The pole vaulting technique holds promise for some types of problems, but its
efficiency limits its general purpose usage. Complex arithmetic is roughly 4—8 times
as expensive as real arithmetic, so its use is justified only if the number of steps required can be substantially reduced.
Unless the stepsize used following the real axis
varies by several orders of magnitude, pole vaulting should probably not be attempted.
For the first example in Section 5, pole vaulting along a semicircle reduced the number of steps from 33 to 7, so the increased cost of complex arithmetic may be justi-
fied.
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
INTEGRATING ODE'S IN THE COMPLEX PLANE-POLE VAULTING
1189
Pole vaulting cannot be attempted without some knowledge of the location and
order of the singularities encountered. If this information is available a priori, the path
to be followed and even the radius of convergence of the series at any point may be
provided.
If this information
is not available, the estimates from the three-term test
may be used to construct the path.
In the case of branch points, the structure of the
Riemann surface must be determined so that a path may be taken which returns to the
real branch of the solution.
The pole vaulting method, using Taylor series for the analytic continuation of
the solution along a path in the complex plane, is competitive with standard ODE
solving methods for some special problems. Its use for these special applications merits
further study.
8. Acknowledgement.
The author wishes to thank Professors Y. F. Chang and
Robert Krueger for many helpful discussions of this material.
Department of Mathematics
Marquette University
and Statistics
Milwaukee, Wisconsin 5 3223
1. Y. F. CHANG, "Automatic solution of differential equations," Constructive and Computational Methods for Differential and Integral Equations (D. L. Colton and R. P. Gilbert, Eds.),
Lecture Notes in Math., Vol. 430, Springer-Verlag, New York, 1974, pp. 61-94.
2. Y. F. CHANG & G. F. CORLISS, "Ratio-like and recurrence relation tests for convergence
of series," /. Inst. Math. Appl. (To appear.)
3. HAROLD T. DAVIS, Introduction to Nonlinear Differential and Integral Equations,
Dover, New York, 1962.
4. PHILIP HARTMAN, Ordinary Differential Equations, Wiley, New York, 1964.
5. PETER HENRICI, Applied and Computational Complex Analysis, Vol. 1, Wiley, New
York, 1974.
6.
KEITH MILLER, "Least squares methods
for ill-posed problems with a prescribed bound,"
SIAM J. Math. Anal., v. 1, 1970, pp. 52-74.
7. R. E. MOORE, Interval Analysis, Prentice-Hall, Englewood Cliffs, N.J., 1966.
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use