Orthogonal Rational Functions On A Semi-Infinite Interval
Orthogonal Rational Functions On A Semi-Infinite Interval
By applying a mapping to the Chebyshev polynomials. we define a new spectral basis: the
“rational Chebyshev functions on the semi-infinite interval,” denoted by 7X,(y). Continuing
earlier work by the author and by Grosch and Orszag, we show tha? these rational functions
inherit most of the good numerical characteristics of the Chebyshev polynomials:
orthogonality, completeness, exponential or “infinite order” convergence, matrix sparsity for
equations with polynomial coefficients, and simplicity. Seven numerical examples illustrate
their versatility. The “Charney” stability problem of meteorology, for example, is solved to
show the feasibihty of applying spectral methods to a semi-infinite atmosphere. For functions
that are singular at both endpoints, such as K,(y), one may combine rational Chebyshev
functions with a preliminary mapping to obtain a single, exponentiaily convergent expansion
on y E [O, cc]. Finally, we successfullygeneralize the WKB method to obtain, for the Jo Bessel
function, an amplitude-phase approximation which is convergent rather than asymptotic and
is accurate not merely for large y but for all y, even the origin. 0 1987 Academic press, 1~.
1. INTR~DUCTI~~J
where L is a constant map parameter and the three coordinates are related by
y=L(l +x)/(1-x), x=(Y--L)l(Y+L) (1.2)
y = L cot2(t/2), t = 2 arccot( [ y/L] ‘j2). (1.3)
It may seem a little pretentious to introduce a new symbol for functions which
are merely the Chebyshev polynomials in disguise. However, the Chebyshev
polynomials in x are themselves the images of the terms of a Fourier cosine series
under the map x = cos(t). In both cases,the change-of-coordinates alters the shape
and properties of the basis set so profoundly that it is probably best to regard the
result of the mapping as a new species, deserving its own symbol.
Even so, the connection with the Fourier cosine functions is nonetheless very
important both for analyzing convergence, as done in the Appendix, and also for
writing practical computer programs, To avoid confusion as we leap from one coor-
dinate to another, we shall adopt the convention that y E [O, co] is the argument of
the TL,( y), x E [ - 1, 11 is the argument of the ordinary Chebyshev polynomials,
and t E [O, rc] (‘9” for “trigonometric”) is the argument of the cosines. We are free
to calculate in whichever of these three coordinates is most convenient.
We shall refer to the TL,(y) as the “rational Chebyshev functions on a semi-
infinite interval”; Table I lists the explicit form of the first nine functions for L = 1.
The graphs shown in Fig. 1 apply for any L if we replace y by (y/L); varying L
alters the width of the functions without changing their shape. Because the depen-
dence on L is so simple and also for notational simplicity, we shall often suppress
the map parameter by writing TL,( y) [instead of the more correct TL,( y; L)] and
by setting L = 1 in some figures and tables.
By merely changing the variable in the usual orthogonality integral for the
cosines, one can show that the rational Chebyshev functions are orthogonal:
j-k m=n=O
s
m mn(y;
0
L) mz(.Y; LW2/l:(y+ Lw2]) dy=
I0,
742,
mfn
m=n>O.
TABLE I
n W,(Y)
(y4-28y3+70y2-28y+l)/(yf1)4
(y5-45y4+210y3-210y2+45y- l)/(y+ 1)5
( y6 - 66y5 + 495y4 - 924y3 + 495y2 - 66y + I)/( y + 1)”
(y7-91p+ lOOly5- 3003y4+ 3003y3 - 1001y* + 9ly- l)/(y f 1)7
(y’- 120~’ + 1820y6-8008~~ + 12870y4-8008y3 + 1820y2- 120~ + l)/(y + 1)8
RATIONAL CHEBYSHEV SERIES 65
TABLE II
Transformations of Derivatives for the Mapping y = L cot*(t/2) which Converts a Rational-Chebyshev
Series in Z,(y) into a Fourier Cosine Series in cos(nt). L Is a Constant, the “Map Parameter,” uY=
{ -sin3(f/2)/[L cos(2/2)]j u,, uYY= {sinS(t/2)/(2t2 cos3(t/2))(2cos(z/2) sin(f/2) u,,+ [3 - 2 sin*(t/2)]u,)
-
%Y
- 8 sin4 12 cos sin3 4 sin4
i-20 sin2 -18cossin -4 sin2
-1.5 [ xsin7(r/2)/j4L3 cos5(r/2)})
%
- 48 sin6 88 cos sin’ 48 sin6 - 8 cos sin5
+ 168sin4 -232~0s sin3 - 120 sin4 + 8 cos sin3
-210 sin* + 174 cos sin + 72 sin’
+105 [ x sin9/{8L4 cos7}]
%
-384 sin’ 800 cos sin’ 560 sin8 -160cossin’ -16sina
f1728 sin6 -2960~0s sin5 -2080 sin6 + 400 cos sin’ + 32 sin6
-3024 sin“ +39OOcos sin3 +2660 sin4 - 240 cos sin3 - 16 sin4
+2520 sin* -195Ocos sin -1140sinZ
-945 1:x sin”/{ 16L5 co?/]
%
3840 sin’0 -8768 cossin9 - 7200 sin” +272Ocos sin’ +480 sinlo - 32 cos5sin5
-21120 sins f41536cos sin’ $34800 sin* -10240~0s sin7 -1680sin’
+47520 sin6 - 76808 cos sins - 65040sin6 + 13160cos sin5 + 1920 sin6
-55440 sin4 +67440 cos sin3 + 56160sin4 -5640~0s sin3 - 720 sin4
+34650 sin2 - 25290cos sin - 18720sin*
-10395 [x(-l)sin13/{32L6cosi1}]
Note. The term [ x sinq/{2”LP cos’}] denotes that all entries in the table for the previous derivative
must be multiplied by this common factor. Note also that all sines and cosines in the table have
arguments of (t/2), not f.
RATIONAL CHEBYSHEV SERIES 67
the main program may still use the physical coordinate y, however: Table IfI is a
FQRTRAN fragment that shows the trigonometric argument t can be entirely con-
fined to a single subroutine with just eight executable statements (wbicb eva~~~~es
the TE,( y) and its derivatives at a given y).
The pseudospectral grid in y is simply the image under the ma ping of an evenly
spaced Fourier grid
ti = 7c(2i+ 1)/(2N + 2), i = o,..., N (a.21
yi = L d(tJ2). (2.31
TABLE III
SUBROUTINE BASIS(A’, Y, L, TL, TLY, TtYY)
C A FORTRAN subroutine for computing the rational Chebyshev
c functions.
C INPUT: N (> = 0, the degree of the basis function)
c Y (on interval [0, Infinity])
c L (map parameter)
c OUTPUT: TL, TLY, TLYY are the,Nth Chebyshev functions
c and their first two derivatives.
c Tis the trigonometric argument (on interval [O, pi]).
REAL L
T= 2. * ACOT(SQR( Y/L))
TL = COS(FLOAT(N)*T)
C Derivatives of cos (Nt) with respect to t:
PT= -FLOAT(N) * SIN(FLOAT(N)*T)
PTi”= -FLOAT(N)*FLQAT(N) * TL
C Conversion of t-derivatives into x-derivatives
C=COS(T/Z.)
S = SIN( T/2.)
TLY = -PT*S*S*S/(L*C)
TLYY = (2.*C*S*PTT+ (3. - 2.*S*S)* PT) * (S**5/(2.*L*L*C**3))
RETURN
END
68 JOHN P. BOYD
If k is the highest degree of the trigonometric polynomials that appear in the dif-
ferential equation (after clearing denominators), then (2.11)--and the orthogonality
of the sines and coefficients-imply that the Galerkin’s matrix will be banded in the
sensethat
H,=O if /i-j1 > k. (2.12)
sparse matrix and the programmer intends to exploit the bandedness. ~tberwisej
the pseudospectral algorithm is simpler to program and easier to adapt from one
differential equation to another. All the numerical examples given SnSection 5 were
solved pseudospectrally.
3. BOUNDARY CONDITIONS:
IMPLICIT VERSUSEXPLICIT, NATURAL VERSUSESSENTIAL
5. NUMERICAL EXAMPLES
In this section, we discuss seven problems, which subdivide into a simple boun-
dary value problem, three eigenproblems, and three expansions of known functions.
If numerical analysis is an art and not merely a science, it is hoped that this art
show will illustrate the little tricks that are important in a~~li~atio~s.
Example One: K1 Bessel Boundary Value Problem
where K,(y) is the usual “imaginary” Besselfunction. This boundary value problem
requires two slight modifications to the standard procedures explained earlier.
First, if the problem is posed on the interval YE: [yo, 00 ] instead of [O, m], then
we merely generalize (1.3) to
y = yo + L cot2(t/2), bj,if)
where in the present casey. = I. Since this is merely a translation by a constant, the
derivative formulas given in Table II are unchanged.
The second modification is that when the basis includes { TLo,..., TL,), the
collocation grid is changed to
which is the same form as (2.2) except that there are only N points on the interior
of [O, n]. N rows of the matrices H and f are given by (2.6) and (2.7), but the last
row is altered to
0.0
0.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Y
FIG. 2. A comparison of numerical solutions with N= 6 (six interior collocation points plus the
boundary condition) for Example One, whose exact solution is K,(y). Exact solution [solid], L=O.25
[dotted], L= 1.25 [solid], and L = 6.25 [dashed] are shown. Note that the exact solution and the
approximation with map parameter = 1.25 are graphically indistinguishable, so both are shown as the
solid curve.
by a factor of 25, certainly confirms his assertion. The numerical solution for
L = 1.25 is indistinguishable from the exact solution to within the thickness of the
curve, but the approximations for L five times smaller and five times larger also
have small absolute errors: no worse than 0.01 for the former and 0.015 for
L = 6.25.
No comparison is made with Boyd’s formulas [3] for predicting the optimum L
becausethese are asymptotic formulas for large N-and we only need N= 6 for this
problem.
Example Two: Whittaker’s Equation Eigenproblem
The differential equation
where Lf, is the associated Laguerre polynomial of first order and degree n. Because
the differential equation is singular at both endpoints, an unmodified TL,(y) basis,
as is appropriate for “natural” boundary conditions at both y = 0 and y = co, gave
exceptionally accurate results.
One special difficulty with eigenvalue problems (whether on an unbounded inter-
val or not) is that N basis functions will never give enough resolution to even
RATIONAL CHEBYSHEV SERIES 73
FIG. 3. The number of “good” eigenvalues for the Whittaker eigenvalue equation for iv= 10 as a
function of map parameter L. A “good” eigenvalue is arbitrarily defined to be one which is within 0.05 of
the exact eigenvalues.
74 JOHN P. BOYD
" i 2 4 8 16 32 64 128256515
L (Map parameter)
FIG. 4. Same as Fig. 2 but for N=40.
” IO 20 30 40 50 60 70
N
FIG. 5. The number of “good” eigenvalues as a function of N with L = 0.8N for the Whittaker eigen-
value problem.
RATIONAL CHEBYSHEV SERIES 75
e exact eigensolutions
u= 1, a=0 (5.123)
u = e-‘L,( y), A E n + 1, n 3 0, an integer, (5.12bj
where the L,,(y) are the usual Laguerre polynomials. This problem is clearly a close
cousin of the previous example, and the boundary conditions are “natural” at bot
endpoints. However, excluding the trivial eigenvaiue (A = 0), numerical solutions o
(5.11) were extremely disappointing: with L = 4 an N= 30, only one eigenvalue
was even close, and the approximation was the complex conjugate pair
Thus, the form of the differential equation forces both solutions to vanish as y -+ co.
When no boundary constraints are applied, i.e., when the boundary condition at
infinity is treated as natural, the numerical solution is still able to dist~~~~~s
between the two solutions and converge to the one which is decaying ex~on~~tia~~y
rather than algebraically with y-but just barely. Imposing the explicit constraint
U(KI ) = 0 will be quite useless since both solutions satisfy this condition.
The difficulty can be cured by introducing the new unknown.
w(y) E eY’“u(y) g5.15)
which satisfies the differential equation
Most of the principles that apply to the standard eigenproblems above must be
discarded. The only physically relevant mode is the unstable one, that is, the mode
with a complex phase speed c. The matrix has real eigenvalues, too, but [12]
explains why these should be ignored.
The unstable modes have branch points (“critical levels”) for complex y which
move closer and closer to the real interval y E [0, W] when r tends to either 0 or 1.
To track the instability in these limits, one must use the special mapping tricks
explained in Boyd [S]. Fortunately, the most interesting modes are those that grow
most rapidly since they will leave their more slowly amplifying brethren behind and
dominate the weather. For strongly unstables waves, we can obtain good accuracy
with small N and no special tricks.
The boundary condition at infinity [the top of the atmosphere] is “natural,” but
(5.18) must be explicitly imposed. Curiously, the fact that the eigenvalue appears in
the boundary condition actually simplifies life because the result of applying a
pseudospectral discretization to both the differential equation and boundary
condition can still be written in the standard form
Aa = cBa, (5.19)
not involve c, then the square matrix B would have a row of zeros, so before apply-
ing the QZ algorithm, a preprocessing step to reduce the problem to standard form
would be necessary [18].
The derivative in the boundary condition, however, does require special treat-
ment because Table II gives
where t = 2 arccot( [y/L] ‘1’). Unfortunately, both sin(nt) and cos(1/2) vanish at
t = 71,which corresponds to y = 0. Thus, to follow the strategy of transforming from
y to the trigonometric argument t, we must apply Wopital’s rule [or equivalently,
Taylor expand the vanishing functions and then take the ratio] to obtain
dTL,/dy lyzo = -2n2 cos(nn)/L. (521)
It then follows that the elements of the last rows of A an are given by
A, = TL,(O) = cos( jz) and B, = -dTL,/dy(O) as given by (5.21).
For Y= 0.5 (near the r of maximum growth rate), the exact phase speed for ihe
one unstable mode is
000
2 4 8 16
FIG. 5. The errors in the real part (left half of each pair) and imaginary part (right half) of the eigcn-
value c for the “Charney” problem for I = 0.5 with N = 10, plotted as a function of map parameter L,.
78 JOHN P. BOYD
Second, since EO(lz)is unbounded as Iz-+ co, we apply the TL,(y) expansion to
1 Parenthetically, we note a couple of minor errors in [13]: the first entry in column one of Table II
should be 1.11059... instead of 1.1059..., and also the claim that 1-” E [0,0.731 J should be replaced by
CO,2.9241. All other expressions in [13] are correct.
RATIONAL CHEBYSHEV SERIES
7025
-u
020
015/j
0. IO
0.05
0.00 I
012345
J
n
FIG. 7. The absolute values of the coefficients of the rational Chebyshev expansion of the ground
state of the quantum quartic oscillator. The argument of the T&,(y) is y = /I’j3, where 1 is the “coupling
constant” of the oscillator and the function expanded is the ground state eigenvalue divided by (I + i.“j)
so that the TL, series is applied to an fly) which is bounded as y + m3.
TABLE IV
n ati
0 0.491194
1 0.093215
2 0.091423
3 -0.011715
4 -0.004460
5 0.00285 1
6 - 0.000334
7 -0.000360
8 0.000206
9 -0.000014
10 - 0.000037
11 0.000020
12 -0.00ooo1
13 - o.OcOOo4
14 0.000002
581/70/l-6
80 JOHN P. BOYD
that the decay, although exponential with n, is slower than that of exp(-pn) for
any positive pi Figure 8 graphs the logarithm of the error bound (obtaine
adding up the absolute values of all the neglected coefficients) for (5.30). For a
series whose terms decrease like those of a geometric series (the usual case for a
Chebyshev expansion on x E [ - 1, l]), the graph would asymptote to a straight
line. When the series has only “subgeometric” convergence a defined in [4], the
graph should flatten for large n so that the slope approaches
Nonetheless, Fig. 8 approximates a straight line. If one has good eyesight, one
can detect that the slope is slowly decreasing as n increases--but for n = 24, B
approximation is already accurate to better than five decimal places and t
deviation from a straight line is still small. The concept of ““geometric” versus
“‘subgeometric” convergence is an asymptotic notion. Figure 8 shows that sometimes
the distinction between the two is detectable only for such large 12as to have no
practical significance. [Table VIII of Boyd [ 131 makes the same point.] It also
implies that the mapping treatment of a singularity as weak as y2 log(y) is
unnecessary unless one wants more than five decimal places.
This series differs from the other six examples in that we do not actually use the
2X,(y). However, the desired expansion interval is semi-infinite, and this example
does illustrate the way in which different mappings can be combined to deal with
the simultaneous problems of (i) a logarithm at an endpoint and (ii) an u~bou~de
interval.
Example Seven: Amplitude and Phase Expansions of Bessel Fwxtion JO(y)
The Besselfunction J,(y) can be approximated by a power series in y for small y
and by a divergent asymptotic series of the form
4d~) - wbyV2 {[II - 91~28~2) + ow)j COS(~ - z/4j
+ [-1/(8y)+Q(yd3)1 sin(y-n/4)). (5.31)
0 4 8 16 20 24
n
FIG. 8. A plot of the logarithm (base 10) of the error bound E, (obtained by summing the absolute
values of ail coefkients with n>N) versus N for the function yK,(y) as computed using the arcsinh-
exponential mapping with L = 1.
82 JOHN P. BOYD
Since no finite sum of basis functions can possibly hope to uniformly approximate
an irz@zite number of oscillations on y E [O, co], it is obvious that for this example,
the rational Chebyshev series and all other direct spectral approximations will fail
miserably.
The remedy is to define a modified f(v) with a multiplicative factor that
eliminates the leading square root in (5.13) and then compute two separate expan-
sions for the functions P(y) and Q(y) in
TABLE V
n P” Qn
0 1.10499 0.112125
1 -0.422833 -0.158486
2 0.157614 0.060126
3 -0.055648 -0.016579
4 0.017623 0.003121
5 - 0.004784 - 0.000308
6 0.001132
7 -0.000258
8 0.000060
9 -0.000013
10 o.oOOoO3
RATIONAL CHEBYSHEV SERIES 83
an expression like (5.34a) can always be converted into (5.33) through elementary
trigonometry, so we shall refer to approximations in either form as “am~l~tu
phase” expansions.) This pair of equations is equivalent to
u(y) = (CL2
+ [u Y]y, (5.35)
which gives us a unique, explicit expression for the amplitude. We can expand this
as a IL!&(Y) series through either a matrix multiplication or a Fast Fourier Trans-
form after evaluating a(Y) at the usual interpolation points (2.3).
The fatal flaw is that if we define E to be their ~e~t~rbat~o~ parameter, the
Krylov-Bogoliubov amplitude function has an O(E) part which oscillates for all real
Y. For our present f(Y), one can show from (5.31) that
flv) = f P,Kz(Y),
?I=0
where
yj = L cot2(tJ2),
tj=n(2i+1)/(2M+2N+4), i=O,..., N+M+l (5.39)
are the usual rational Chebyshev interpolation points. This gives a simple set of
linear equations to determine the unknown coeffcients {Pn> and {Q,>. (Note that
an approximation in the form u = a(y) cos(4[y]) depends nonlinearly on the
(6, so (5.38) is preferable.) Taking M= N = 8 gave a maximum absolute err
y E [0, 02] of only 0.00002.
Unfortunately, increasing M and N gave no improvement even in 16-
precision because the set of linear equations is ill-conditioned. The wo~~~~,
however, is that the interpolation method works at all. Although we can rigorously
justify the pseudospectral method for a given non-oscillatory f(y) [by usin
84 JOHN P. BOYD
--._ ------
0.01 “-r-+++ l--Lb-__
0.0 I.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0
Y
FIG. 9. The amplitude (solid line) and phase (dashed) in the amplitude-phase approximation to
f(r) = (1 +JJP* Jo(v).
RATIONAL CHEBYSHEV SERIES 85
6. SUMMARY
y making a change-of-coordinate, we have shown that Chebyshev poIy~omiaIs
(or eq~~va~e~tly,a Fourier cosine series) can be appl to a semi-infinite interval as
tirst suggested by Grosch and Orszag [2]. By explo g the mapping
nection between Fourier cosine series and the new basis functions deli
rational Chebyshev functions Z!&(y), we are able to fill in the gaps of
In the Appendix, we display the “equiconvergence” contours in the complex
plane. In the body of the text, we discuss the issues of natural versus essential boun-
dary co tions, banded Galerkin matrices, and explain how the 2&(y)-in con-
trast to guesre functions-can be applied to bounded functions with asymptotic
expansions in inverse powers of y as 4’ 4 03.
The seven numerical examples illustrate the possibilities. The Cba~~ey
merical weather prediction, which usesmixed spectral-elite
ical harmonics in the horizontal, fourth order differences i
can instead employ pure pseudospectral codes by using the TL., in h
success of the uniform amplitude-phase expansion for Jo(y) shows
possible to replace the WKB method by an approximation which is ~~~~~~~~~~
than asymptotic and which can be applied for a2.ly, not just when y is large.
retical work is needed to put such “‘double expansions” on a firm
tion, we have not discussed condition numbers, the eigenvalue spec-
ditioning” methods for pseudospectral matrix problems. In one
-conditioned iterative procedures are unnecessary (most of the
calculations in article took less than five seconds on an
dimensions, the best choice of pre-conditioner is still a resea
ordinary Chebyshev expansions [16J.
Similarly, we have avoided the important ic of time-stepping algorithms com-
bined with EL,(y) series for the spatial coo nates. As emphasized by Tre~e~~e~l
and Trummer [I191, the eigenvalue spectr of the first d&vat& operator is
poorly understood even for ordinary Chebyshev polynomials. At
know how to predict whether a pseudospectral representatio of a di~eKe~tia1
operator will have complex eigenvalues (which could cause time-step
~~StabiIi~y)even for a self-adjoint equation; the examples above show only that th,e
spectrum is sometimes purely real-and sometimes not.
Clearly, orthogonal rational functions offer many topics for future researc
etheless, the examples and analysis given here show that these mapped Chebyshev
polynomials are an extremely effective tool for solving difhcult problems on a semi-
infinite interval.
where p is the largest possible positive constant such that the interior of the strip
(but not its boundary) contains no singularities of the function f(t). Although we
are usually interested in evaluating a function only for real t, (A.l) is of con-
siderable practical importance because the asymptotic rate at which the Fourier
coefticients decrease with n is directly related to the width of the strip of the
convergence via
a, - I: l(VW, n-+co, (A.21
where the empty [ ] denote functions that vary more slowly than S-H and where
161= ep. (A.3)
Thus, the wider the strip of convergence, the faster the rate at which the Fourier
coefficients decrease.This motivates the following.
Knowledge of p(y,, yi) determines the asymptotic behavior of the TL, series via
(A.2) and (A.3). When the location of the singularities of f(y) are known in
advance, either becausef(y) itself is known or because it satisfies a linear differen-
tial equation with coefficients whose singularities are known, then one can evaluate
(A.4) for each branch point or pole, and the smallest p so obtained determines the
region of convergence. Figure 10 shows the contours of p(y) in the complex
y-plane.
One can directly trace these contours by defining
srsinh(p) (A.7)
and then solving the equation (with L = 1 for simplicity)
y?[ -s4] + 2y?[2 - s4 - 2s2(.? + 1) yr - s4yf]
+s”(y,+ 1)” { -4y,-?(y,+ 1)Z) =o (A.81
RATIONAL CHEBYSHEV SERIES
-2 0 2
Re(y)
FIG. 10. The equiconvergence contours in the upper half of the complex y-plane for the rationai
Chebyshev functions on the semi-infinite interval. The map parameter L = I; only the upper half-plane is
shown becausethe curves in the lower half-plane are the reflection with respect to the real y-axis of those
for Im(y) > 0.
ACKNOWLEDGMENT
REFERENCES