<<

. 24
( 136 .)



>>

2πj
j = 0, 1, . . . , N ’ 1, (5.8)
xj = ;
N

the trigonometric interpolant to f (x) can be written as

N ’1
f (x) ≈ (5.9)
f (xj ) Cj (x)
j=0
5.3. TRIGONOMETRIC INTERPOLATION 101




Figure 5.2: Schematic of a spatially periodic interval with nodes and a typical Fourier car-
dinal function.


where the cardinal functions are
N (x ’ xj ) (x ’ xj )
1
Cj (x) ≡ (5.10)
sin cot
N 2 2

Just like the terms of the Whittaker sinc series, all the cardinal functions (5.10) are iden-
tical in shape, and differ only in the location of the peak. This shape similarity of all the
trigonometric cardinal functions, regardless of whether xj is in the middle or near the end-
points of [0, 2π], is a reminder that for periodic functions, there are in effect no endpoints. A
spatially-periodic interval can always be conceptualized as a ring, rather than a line seg-
ment (Fig. 5.2).
The same is emphatically not true for polynomial interpolation of a non-periodic func-
tion. Elementary courses in numerical analysis stress that centered ¬nite difference approxi-
mations are much more accurate than one-sided approximations. This implies that, all other
things being equal, Lagrangian interpolation will give much more accurate approxima-
tions to df /dx (and to f (x) itself) at the center of the interval than at the endpoints where
the approximation is completely one-sided. This is exactly what happens with an even grid
spacing in the Runge example ” good accuracy near the center of the interval and diver-
gence in the regions of mostly one-sided approximations near the ends of the interval.
Chebyshev interpolation gives very uniform approximation over the whole interval [-1,
1] because it compensates for the one-sided approximation near the endpoints by increas-
ing the density of the grid near the endpoints. We have the symbolic relationship


(near x ≈ ±1) [Small h; One-Sided] ←’ [Large h; Centered] (near x ≈ 0)
CHAPTER 5. CARDINAL FUNCTIONS
102

For periodic functions with a uniform grid, however, we have the accuracy of a fully-
centered approximation even at the endpoint x = 0. Although the grid point values to the
left of the origin (x ∈ [’π, 0]) are outside the interval of approximation, they are equal to
the corresponding values of f (x) on x ∈ [π, 2 π], which is part of our grid. Consequently,
the cardinal functions for trigonometric interpolation on an evenly spaced grid have the
same shape for each point on the grid. Because of this uniformity of shape, the accuracy of
the approximation is uniform over the whole interval.
An analytical way to show the close relationship between the trigonometric cardinal
functions and the sinc functions is to Taylor expand the cotangent in (5.10), which gives
2
sin [N (x ’ xj )/2] [x ’ xj ]
1’ + O [x ’ xj ]4 (5.11)
Cj (x) =
N (x ’ xj )/2 12
N (x ’ xj ) [x ’ xj ]2 [x ’ xj ]4
1’ ’
= sinc (5.12)
+ ...
2 12 720
Near its peak, the trigonometric cardinal function is indistinguishable from Whittaker™s
cardinal function, and differences appear only on the fringes where Cj (x) has decayed to
a rather small amplitude. Fig. 5.1 illustrates the sinc function, the trigonometric cardinal
function, and (lower left) the small difference between them. The maximum pointwise
absolute error in the approximation
N (x ’ xj )
Cj (x) ≈ sinc (5.13)
2
is never worse than 0.05 even for N = 6; for larger N , the error falls as O(1/N ). There
is clearly an intimate relationship between sinc series on x ∈ [’∞, ∞] and trigonometric
interpolation on x ∈ [0, 2π].
An analytical expression of this kinship is the identity:
1
C0 (x; h) ≡ (5.14)
sin(N x) cot( x / 2 )
2N

x ’ 2πm
sinc
=
h
m=’∞

In words, the trigonometric cardinal function is the result of duplicating an in¬nite
number of copies of the sinc function, spacing them evenly over all space, and summing
as shown schematically in Fig. 5.3.
For comic relief, Fig. 5.1 [lower right] shows the graph of the cardinal function for
Lagrangian polynomial interpolation at the same grid points. The sinc function and the
trigonometric cardinal function both decay away from their peak so that f (xj ) for some
particular j has a smaller and smaller in¬‚uence as we move away from x = xj . In contrast,
the Lagrangian cardinal function is much larger near the endpoints than at x = π, the one
grid point where it differs from 0. The value of f (x) at that one point has a much larger
in¬‚uence away from that point than in its neighborhood. This makes no sense at all and is
another manifestation of the Runge phenomenon.
The trigonometric cardinal function has the alternative complex representation
N/2
1 1
Cj (x) ≡ exp[i k(x ’ xj )] (5.15)
N ck
k=’N/2

where ck = 1 except for k = ±N ; c’N/2 = cN/2 = 2. Although the appearance of (5.15) is
wildly different from (5.10), the two de¬nitions are in fact equivalent.
5.3. TRIGONOMETRIC INTERPOLATION 103




Figure 5.3: Top: the trigonometric cardinal function, shown over three periods. Bottom
three panels: three copies of the Whittaker cardinal function which are added, together
with similar copies spaced evenly over all space, to give the trigonometric cardinal function
shown at the top.


Since the approximation (5.9) is identical with the trigonometric interpolant SN (x), we
can use the cardinal functions directly to solve differential equations without explicitly using
the truncated Fourier series form at all. A linear differential equation Lu = f (x), becomes
the matrix problem


(5.16)
Lu = f


where the matrix elements are given by


≡ u (xj ) j = 0, 1, . . . , N ’ 1 (5.17)
uj
≡ f (xi ) i = 0, 1, . . . , N ’ 1 (5.18)
fi
≡ i, j = 0, 1, . . . , N ’ 1 (5.19)
Lij [LCj (x)]|x=xi



Because the cardinal functions are so simple, it is easy to evaluate their derivatives.
Thus, introducing a generalization of the usual Kronecker δ-function notation as in Stenger
CHAPTER 5. CARDINAL FUNCTIONS
104

(1981), we ¬nd
(5.20)
Cj (xi ) = δij
±
 0 i=j
(1)
Cj,x (xi ) ≡ (5.21)
δij = (xi ’xj )
 1 i+j
i=j
2 (’1) cot 2
± 2
 ’ (2N6 +1) i=j
(2)
Cj,xx (xi ) ≡ δij = (5.22)
 (’1)i+j+1
1 i=j
2 sin2 [(xi ’xj )/2]

where δij is the usual Kronecker δ-function and where the subscript x denotes x-differentiation.
Thus, a general second order differential operator such as
‚ ‚
L ≡ a2 (x) (5.23)
+ a1 (x) + a0 (x)
‚x2 ‚x

is represented by a matrix L whose elements are simply
(2) (1)
(5.24)
Lij = a2 (xi ) δij + a1 (xi ) δij + a0 (xi ) δij
Non-periodic problems can always be transformed into a periodic problem on x ∈ [0, π]
by the Chebyshev-to-Fourier mapping. Since we need only the cosine terms, rather than
a general Fourier basis, we can still apply (5.8) “ (5.24) except that we drop all grid points
such that xj > π. The explicit boundary conditions
[“Dirichlet boundary conditions”] (5.25)
u(’1) = u(1) = 0
become transformed into u(0) = u(π); we simply omit the cardinal functions corresponding
to those two points. (In the original non-periodic coordinate, these cardinal functions are
polynomials.)
Thus, in the cardinal function basis, it is just as easy to solve problems with Dirichlet
boundary conditions as to solve those with boundary conditions of periodicity. Unlike
the algorithm where the spectral coef¬cients of the equivalent Chebyshev series are the
unknowns, it is not necessary to solve a matrix problem with two rows reserved to impose
(5.25) nor is it necessary to form new basis functions which are linear combinations of
Chebyshev polynomials. The cardinal function representation makes Dirichlet boundary
conditions a snap.2
Appendix F lists properties of trigonometric cardinal functions both for a general Fourier
series and for the special cases when the solution can be expanded in a Fourier cosine series
or a Fourier sine series. The only complication with the two special cases is that the deriva-
tive of a cosine series is a sine series, so the matrix of the second derivatives of the cosines at
the grid points is the product of the ¬rst derivative sine matrix with the ¬rst derivative co-
sine matrix. Assembling the differentiation matrices to all orders is quite trivial, however,
as long as this is kept in mind.


5.4 Cardinal Functions for Orthogonal Polynomials
It is quite easy to construct cardinal functions for general orthogonal polynomials. Recall
that the grid points are the zeros of φN +1 (x). Thus, φN +1 (x) is similar to what we need
2 Neuman boundary conditions, that is to say, conditions on the derivative of u at the boundaries, require re-
(1)
serving two rows of the matrix for these conditions using the δij matrix elements. The cardinal function repre-
sentation, however, is still just as easy to use as the truncated Chebyshev series.
5.4. CARDINAL FUNCTIONS FOR ORTHOGONAL POLYNOMIALS 105

except that it vanishes at all the grid points, and we want it to differ from 0 at x = xj . In
the vicinity of the j-th root, Taylor expansion gives
2
φN +1 (x) ≈ φN +1 (xj ) + φN +1,x (xj )(x ’ xj ) + O [x ’ xj ] (5.26)

Since the ¬rst term on the right in (5.26) is 0, one can eliminate the root at x = xj and
normalize the value of the cardinal function to 1 at x = xj by de¬ning

φN +1 (x)
Cj (x) ≡ [Cardinal Function] (5.27)
φN +1,x (xj )(x ’ xj )

where subscript x denotes x-differentiation. This prescription works for Chebyshev poly-
nomials of the ¬rst and second kinds, Legendre polynomials, Laguerre functions, Hermite
functions, etc.
As noted in Chapter 4, a useful alternative grid consists of the extrema of a basis function
together with the endpoints, the “Lobatto” grid. The cardinal functions for this are

(1 ’ x2 ) φN,x (x)
Cj (x) ≡ (5.28)
j = 0, . . . , N
[(1 ’ x2 ) φN,x (xj )]x (x ’ xj )
j

where we have assumed that the endpoints are at x = ±1. As in (5.26), the numerator is a
function of x while, except for the linear factor of (x ’ xj ), all the terms in the denominator




C8



C7




C6




C5




Figure 5.4: Cardinal functions for the Legendre pseudospectral method on an 8-point Lo-
batto grid. The grid point associated with each cardinal function is solid; the other grid
points are marked by open circles. Only the cardinal functions associated with positive x
are shown since those for negative x are just the re¬‚ections of those illustrated.
CHAPTER 5. CARDINAL FUNCTIONS
106

<<

. 24
( 136 .)



>>