You are on page 1of 30

Chebyshev Spectral Methods

102

C HEBYSHEV P OLYNOMIALS
R EVIEW (I)
General properties of orthogonal polynomials
Suppose I = [a, b] is a given interval. Let : I R+ be a weight
function which is positive and continuous on I
Let L2 (I) denote the space of measurable functions v such that
kvk =

Z

|v(x)| (x) dx
2

1
2

<

L2 (I) is a Hilbert space with the scalar products


(u, v) =

u(x)v(x)(x) dx
I

Chebyshev polynomials are obtained by setting


1

the weight: (x) = (1 x2 ) 2


the interval: I = [1, 1]
Chebyshev polynomials of degree k are expressed as
Tk (x) = cos(k cos1 x), k = 0, 1, 2, . . .

Chebyshev Spectral Methods

103

C HEBYSHEV P OLYNOMIALS
R EVIEW (II)
By setting x = cos(z) we obtain Tk = cos(kz) , therefore we can derive
expressions for the first Chebyshev polynomials
T0 = 1, T1 = cos(z) = x, T2 = cos(2z) = 2 cos2 (z) 1 = 2x2 1, . . .

More generally, using the de Moivre formula, we obtain


h

cos(kz) = (cos(z) + i sin(z)) ,

from which, invoking the binomial formula, we get

(k m 1)!
k [k/2]
Tk (x) = (1)m
(2x)k2m ,
2 m=0
m!(k 2m)!

where [] represents the integer part of


Note that the above expression is computationally useless one should use
the formula Tk (x) = cos(k cos1 x) instead!

Chebyshev Spectral Methods

104

C HEBYSHEV P OLYNOMIALS
R EVIEW (III)
The trigonometric identity cos(k + 1)z + cos(k 1)z = 2 cos(z) cos(kz)
results in the following recurrence relation
2xTk = Tk+1 + Tk1 , k 1,

which can be used to deduce Tk , k 2 based on T0 and T1 only


Similarly, for the derivatives we get
 1
dx
dz
d
d
sin(kz)
= (cos(kz)
,
Tk0 = (cos(kz))
=k
dz
dx
dz
dz
sin(z)

which, upon using trigonometric identities, yields


0
0
Tk+1
Tk1
2Tk =

, k > 1,
k+1 k1

Chebyshev Spectral Methods

105

C HEBYSHEV P OLYNOMIALS
R EVIEW (IV)
Note that simply changing the integration variable we obtain
Z 1

f (x)(x) dx =

Z
0

f (cos ) d

This also provides an isometric (i.e., normpreserving) transformation

= u(cos )
u L2 (I) u L2 (0, ), where u()
Consequently, we obtain
(Tk , Tl ) =

Z 1

Tk Tl dx =

cos(k) cos(l) d =

ck kl ,
2

where
ck =

if k = 0,

if k 1

Note that Chebyshev polynomials are orthogonal , but not orthonormal

Chebyshev Spectral Methods

106

C HEBYSHEV P OLYNOMIALS
R EVIEW (V)
The Chebyshev polynomials Tk (x) vanish at the points x j (the Gauss points )
defined by


x j = cos

(2 j + 1)
, j = 0, . . . , k 1
2k

There are exactly k distinct zeros in the interval [1, 1]


Note that 1 Tk 1; furthermore the Chebyshev polynomials Tk (x) reach
their extremal values at the points x j (the GaussLobatto points)
x j = cos


j
, j = 0, . . . , k
k

There are exactly k + 1 real extrema in the interval [1, 1].

Chebyshev Spectral Methods

107

C HEBYSHEV P OLYNOMIALS
N UMERICAL I NTEGRATION F ORMULAE (I)
Fundamental Theorem of Gaussian Quadrature The abscissas of the
N-point Gaussian quadrature formula are precisely the roots of the
orthogonal polynomial for the same interval and weighting function.
The GaussChebyshev formula (exact for u P2N1 )

u(x)(x) dx =
N
1

Z 1

(2 j1)
2N

u(x j ),

j=1

with x j = cos
(the Gauss points located in the interior of the
domain only)
Proof via straightforward application of the theorem quoted above.

Chebyshev Spectral Methods

108

C HEBYSHEV P OLYNOMIALS
N UMERICAL I NTEGRATION F ORMULAE (II)
The GaussRadauChebyshev formula (exact for u P2N )
Z 1

u(x)(x) dx =

"

u(0 ) + 2 u( j ) ,
2N + 1
j=1
N

with j = cos
(the GaussRadau points located in the interior of the
domain and on one boundary, useful e.g., in annular geometry)
2 j
2N+1

Proof via application of the above theorem and using the roots of the polynomial
QN+1 (x) = TN (a)TN+1 (x) TN+1 (a)TN (x) which vanishes at x = a = 1

The GaussLobattoChebyshev formula (exact for u P2N )


Z 1

u(x)(x) dx =

"

u(0 ) + u(N ) + 2
2N + 1

N1

u(j )

j=1

with j = cos
(the GaussLobatto points located in the interior of the
domain and on both boundaries)
j
N

Proof via application of the theorem quoted above.

Chebyshev Spectral Methods

109

C HEBYSHEV P OLYNOMIALS
N UMERICAL I NTEGRATION F ORMULAE (III)
The GaussLobattoChebyshev collocation point are most commonly used
in Chebyshev spectral methods, because this set of point also includes the
boundary points (which makes it possible to easily incorporate the boundary
conditions in the collocation approach)
Using the GaussLobattoChebyshev points, the orthogonality relation for
the Chebyshev polynomials Tk and Tl with 0 k, l N can be written as

(Tk , Tl ) =
Tk Tl dx =
N
1
Z 1

where

ck = 1

1
ck

T
(

)T
(

)
=
kl ,
cj k j l j
2
j=0
N

if k = 0,
if 1 k N 1,
if k = N

Note similarity to the corresponding discrete orthogonality relation obtained


for the trigonometric polynomials

Chebyshev Spectral Methods

110

C HEBYSHEV A PPROXIMATION
G ALERKIN A PPROACH (I)
Consider an approximation of u L2 (I) in terms of a truncated Chebyshev
series un (x) = N
k=0 uk Tk (x)
Cancel the projections of the residual RN = u uN on the N + 1 first basis
function (i.e., the Chebyshev polynomials)
(RN , Tl ) =

Z 1

uTl uk Tk Tl
k=0

dx = 0, l = 0, . . . , N

Taking into account the orthogonality condition expressions for the


Chebyshev expansions coefficients are obtained
2
uk =
ck

Z 1

uTk dx,

which can be evaluated using, e.g., the GaussLobattoChebyshev


quadratures.
Question What happens on the boundary?

Chebyshev Spectral Methods

111

C HEBYSHEV A PPROXIMATION
G ALERKIN A PPROACH (II)
Let PN : L2 (I) PN be the orthogonal projection on the subspace PN of
polynomials of degree N
For all and such that 0 , there exists a constant C such that
ku PN uk, < CN e(,) kuk,

where

2
2
e(, ) =

3
2

for > 1,
for 0 1

Philosophy of the proof:

1. First establish continuity of the mapping u u,


where u()

= u(cos()),
from the weighted Sobolev space Hm (I) into the corresponding periodic
Sobolev space H pm (, )
2. Then leverage analogous approximation error bounds established for the
case of trigonometric basis functions

Chebyshev Spectral Methods

112

C HEBYSHEV A PPROXIMATION
C OLLOCATION A PPROACH (I)
Consider an approximation of u L2 (I) in terms of a truncated Chebyshev
series (expansion coefficients as the unknowns) un (x) = N
k=0 uk Tk (x)
Cancel the residual RN = u uN on the set of GaussLobattoChebyshev
collocation points x j , j = 0, . . . , N (one could choose other sets of collocation
points as well)
N

u(x j ) =

uk Tk (x j ),

j = 0, . . . , N

k=0

Noting that Tk (x j ) = cos k cos1 (cos(


u j , u(x j ) we obtain

uj =

uk cos(k

k=0

j
N ))

j
= cos(k N
) and denoting

j
), j = 0, . . . , N
N

where U and U
The above system of equations can be written as U = T U,
are vectors of grid values and expansion coefficients.

Chebyshev Spectral Methods

113

C HEBYSHEV A PPROXIMATION
C OLLOCATION A PPROACH (II)
In fact, the matrix T is invertible and


k
j
2
[T 1 ] jk =
cos
, j, k = 0, . . . , N
c j ck N
N

Consequently, the expansion coefficients can be expressed as follows


2
uk =
ck N



k j
1
2
u
cos
=
j
N
ck N
j=0 c j

  k j  
1
i
c j u j e N , k = 0, . . . , N
j=0

Note that this expression is nothing else than the cosine transforms of U
which can be very efficiently evaluated using a cosine FFT
The same expression can be obtained by
multiplying each side of u j = N
k=0 uk Tk (x j ) by

Tl (x j )
cj

summing the resulting expression from j = 0 to j = N


using the discrete orthogonality relation

Nj=0 c1j Tk ( j )Tl ( j ) =

ck
2 kl

Chebyshev Spectral Methods

114

C HEBYSHEV A PPROXIMATION
C OLLOCATION A PPROACH (III)
Note that the expression for the Discrete Chebyshev Transform
2
uk =
ck N



1
k j
c j u j cos N , k = 0, . . . , N
j=0

can also be obtained by using the GaussLobattoChebyshev quadrature to


approximate the continuous expressions
2
uk =
ck

Z 1

uTk dx, k = 0, . . . , N,

Such an approximation is exact for u PN


Analogous expressions for the Discrete Chebyshev Transforms can be
derived for other set of collocation points (Gauss, GaussRadau)

Chebyshev Spectral Methods

115

C HEBYSHEV A PPROXIMATION
C OLLOCATION A PPROACH (IV)
As was the case with Fourier spectral methods, there is a very close
connection between collocationbased approximation and interpolation
Discrete Chebyshev Transform can be associated with an interpolation
operator PC : C0 (I) RN defined such that (PC u)(x j ) = u(x j ), j = 0, . . . , N
(where x j are the GaussLobatto collocation points)
Let s >

1
2

and be given and 0 s. There exists a constant C such that


ku PC uk, < CN 2s kuks,

for all u Hs (I).


Philosophy of the proof changing the variables to u()

= u(cos()) we
convert this problem to the problem already studied for in the context of the
Fourier spectral methods

Chebyshev Spectral Methods

116

C HEBYSHEV A PPROXIMATION
C OLLOCATION A PPROACH (V)
Relation between the Galerkin and collocation coefficients, i.e.,
2
uek =
ck

Z 1

2
uck =
ck N

u(x)Tk (x)(x) dx,

k = 0, . . . , N



k j
1
c j u j cos N ,
j=0

k = 0, . . . , N

e
Using the representation u(x) =
l=0 ul Tl (x) in the latter expression and
invoking the discrete orthogonality relation we obtain

uck =

2
ck N

"

uek c j Tk (x j )Tl (x j )

l=0

j=0

2
ck N

2
+
ck N

= uek

uek

l=N+1

"

c j Tk (x j )Tl (x j )

j=0

uekCkl

l=N+1

where
N

N
1
1
Ckl = Tk (x j )Tl (x j ) =
cos
c
c
j
j
j=0
j=0

ki
N

cos

li
N

1
=
2




 
k+l
kl
1
c j cos N i + cos N i
j=0

Chebyshev Spectral Methods

117

C HEBYSHEV A PPROXIMATION
C OLLOCATION A PPROACH (VI)
Using the identity
N

cos

j=0

pi
N

N + 1,
= 1
[1 + (1) p ]
2

if p = 2mN, m = 0, 1, 2, . . .
otherwise

we can calculate Ckl which allows us to express the relation between the
Galerkin and collocation coefficients as follows
uck

= uek +

ck

uek+2mN

m=1

m=1

2mN>Nk

2mN>N+k

uek+2mN

The terms in square brackets represent the aliasing errors . Their origin is
precisely the same as in the Fourier (pseudo)spectral method.
Aliasing errors can be removed using the 3/2 approach in the same way as
in the Fourier (pseudo)spectral method

Chebyshev Spectral Methods

118

C HEBYSHEV A PPROXIMATION
R ECIPROCAL R ELATIONS

expressing the first N Chebyshev polynomials as functions of x k , k = 1, . . . , N


T0 (x) = 1,
T1 (x) = x,
T2 (x) = 2x2 1,
T3 (x) = 4x3 3x,
T4 (x) = 8x4 8x2 + 1

which can be written as V = KX , where [V ]k = Tk (x), [X]k = xk , and K is a


lowertriangular matrix
Solving this system (trivially!) results in the following reciprocal relations
1 = T0 (x),
x = T1 (x),
1
[T0 (x) + T2 (x)],
2
1
x3 = [3T1 (x) + T3 (x)],
4
1
x4 = [3T0 (x) + 4T2 (x) + T4 (x)]
8

x2 =

Chebyshev Spectral Methods

119

C HEBYSHEV A PPROXIMATION
E CONOMIZATION OF P OWER S ERIES
Find the best polynomial approximation of f (x) = ex on [1, 1]
Construct the (Maclaurin) expansion
1
1
1
ex = 1 + x + x2 + x3 + x4 + . . .
2
6
24

Rewrite the expansion in terms of Chebyshev polynomials using the


reciprocal relations
ex =

81
9
13
1
1
T0 (x) + T1 (x) + T2 (x) + T3 (x) +
T4 (x) + . . .
64
8
48
24
192

Truncate this expansion and translate the expansion back to the x k


representation
Truncation error is given by the magnitude of the first truncate term; Note
that the Chebyshev Expansion coefficients are much smaller than the
corresponding Taylor expansion coefficients !
How is it possible the same number of expansion terms, but higher
accuracy?

Chebyshev Spectral Methods

120

C HEBYSHEV A PPROXIMATION
S PECTRAL D IFFERENTIATION (I)
First, note that Chebyshev projection and differentiation do not commute,
d
i.e., PN ( du
dx ) 6= dx (PN u)
Sequentially applying the recurrence relation 2Tk =
K

0
Tk+1
k+1

0
Tk1
k1

k1
Tk0 (x) = 2k
Tk12p (x), where K =
2
p=0 ck12p
1

we obtain


Consider the first derivative


u0N (x) =

uk Tk0 (x) =

k=0

uk

(1)

Tk (x)

k=0

where, using the above expression for Tk0 (x), we obtain the expansion
coefficients as
(1)
uk

2
=
ck

p=k+1

(p+k) odd

(1)

and uN = 0

pu p , k = 0, . . . , N 1

Chebyshev Spectral Methods

121

C HEBYSHEV A PPROXIMATION
S PECTRAL D IFFERENTIATION (II)
Spectral differentiation can thus be written as
U,

U (1) = D
(1)
(1)
is an
where U = [u0 . . . , uN ]T , U (1) = [u0 . . . , uN ]T , and D
uppertriangular matrix with entries deduced via the previous expression

For the second derivative


u00N (x) =

uk Tk (x)
(2)

k=0
(2)
uk

1
=
ck

p=k+2

(p+k) even

(2)

(2)

and uN = uN1 = 0

p(p2 k2 )u p , k = 0, . . . , N 2

Chebyshev Spectral Methods

122

C HEBYSHEV A PPROXIMATION
D IFFERENTIATION IN P HYSICAL S PACE (I)
(p)

Determine the Chebyshev approximation to a derivative uN based on the


nodal values of uN (needed for the collocation approach with nodal values as
unknowns)
(p)
uN (x j ) =

d jk

(p)

uN (x j ), j = 0, . . . , N

k=0

The differentiation matrix [d (p) ] jk can be determined as follows


1. use the expression uk =

2
ck N

Nj=0 c1j u j Tk (x j ) to eliminate uk from

(p)
uN (x j ) =

uk Tk

(p)

(x j ), j = 0, . . . , N

k=0

(p)

2. express Tk (x j ) and Tk (x j ) in terms of trigonometric functions using


Tk = cos(kz)
3. apply classical trigonometric identities to evaluate the sums
4. return to the representation in terms of Tk (x j )

Chebyshev Spectral Methods

123

C HEBYSHEV A PPROXIMATION
D IFFERENTIATION IN P HYSICAL S PACE (II)
(1)

Expressions for the entries of d jk at the the GaussLobattoChebyshev


collocation points
c j (1) j+k
=
,
c k x j xk
xj
(1)
,
djj =
2(1 x2j )
(1)
d jk

(1)
d00

(1)
dNN

0 j, k N, j 6= k,
1 j N 1,

2N 2 + 1
,
=
6

Thus
U (1) = DU

Chebyshev Spectral Methods

124

C HEBYSHEV A PPROXIMATION
D IFFERENTIATION IN P HYSICAL S PACE (III)
(2)

Expressions for the entries of d jk at the the GaussLobattoChebyshev


collocation points (U (2) = D(2)U)
(2)
d jk

2
(1) j+k x j + x j xk 2
=
,
ck
(1 x2j )(x j xk )2

(N 2 1)(1 x2j ) + 3

1 j N 1, 0 k N, j 6= k

(2)
djj

(2)
d0k

2 (1)k (2N 2 + 1)(1 xk ) 6


=
,
3 ck
(1 xk )2

(2)
dNk

2 (1)N+k (2N 2 + 1)(1 + xk ) 6


=
,0 k N 1
3
ck
(1 + xk )2

(2)
d00

(2)
dNN

3(1 x2j )2

1 j N 1,
1kN

N4 1
=
,
15

Note that
(2)
d jk

d j p d pk

p=0

(1) (1)

Chebyshev Spectral Methods

125

C HEBYSHEV A PPROXIMATION
G ALERKIN A PPROACH
Consider an elliptic boundary value problem
u00 + au0 + bu = f ,

in [1, 1]

u + u 0 = g

x = 1

+ u + + u 0 = g +

x=1

Chebyshev polynomials do not satisfy homogeneous boundary conditions,


hence standard Galerkin approach is not directly applicable.
The Chebyshev basis can be modifies, for instance the following function
satisfy the homogeneous Dirichlet boundary conditions u(1) = 0
k (x) =

Tk (x) T0 (x) = Tk 1,

k even

Tk (x) T1 (x),

k odd

However, thus constructed basis {k } is no longer orthogonal

Chebyshev Spectral Methods

126

C HEBYSHEV A PPROXIMATION
TAU M ETHOD (I)
The Tau method consists in using a Galerkin approach in which explicit
enforcement of the boundary conditions replaces projections on some of the
test functions
Consider the residual
RN (x) = u00N + au0N + buN f ,

where uN (x) = N
k=0 uk Tk (x)
Cancel projections of the residual on the first N 2 basis functions
N

(RN , Tl ) =

k=0

(2)
(1)
uk + auk + buk

Z

Tk Tl dx

Z 1

f Tl dx, l = 0, . . . , N 2

Thus, using orthogonality, we obtain


(2)
(1)
uk + auk + buk = fk , k = 0, . . . , N 2

where fk =

R1

f Tk dx

Chebyshev Spectral Methods

127

C HEBYSHEV A PPROXIMATION
TAU M ETHOD (II)
The above equations are supplemented with
N

(1)k ( k2 )uk = g

k=0
N

(1)k (+ + + k2 )uk = g+

k=0

Note that Tk (1) = (1)k and Tk0 (1) = (1)k+1 k2


(2)

(1)

Replacing uk and uk by their respective representations in terms of uk we


obtain the following system
AU = F

where U = [u0 , . . . , uN ]T , F = [ f0 , . . . , fN2 , g , g+ ] and the matrix A is


obtained by adding the two rows representing the boundary conditions (see
2 + aD
+ bI.
above) to the matrix A1 = D
When the domain boundary is not just a point (e.g., in 2D/3D), formulation
of the Tau method becomes somewhat more involved

Chebyshev Spectral Methods

128

C HEBYSHEV A PPROXIMATION
C OLLOCATION M ETHOD (I)
Consider the residual
RN (x) = u00N + au0N + buN f ,

where uN (x) = N
k=0 uk Tk (x)
Cancel this residual at N 1 GaussLobattoChebyshev collocation points
located in the interior of the domain
u00N (x j ) + au0N (x j ) + buN (x j ) = f (x j ), j = 1, . . . , N 1

Enforce the two boundary conditions at endpoints


uN (xN ) + u0N (xN ) = g
+ uN (x0 ) + + u0N (x0 ) = g

Chebyshev Spectral Methods

129

C HEBYSHEV A PPROXIMATION
C OLLOCATION M ETHOD (II)
Consequently, the following system of N + 1 equations is obtained
N

(d jk

(2)

(1)

+ ad jk )uN (x j ) + buN (x j ) = f (x j ), j = 1, . . . , N 1

k=0

uN (xN ) +

dNk uN (xk ) = g
(1)

k=0

+ uN (x0 ) + +

d0k uN (xk ) = g+
(1)

k=0

which can be written as AcU = F where [Ac ] jk = [Ac0 ] jk ,


j, k = 1, . . . , N 1 with Ac0 given by
Ac0 = (D2 + aD + bI)U

and the boundary conditions above added as the rows 0 and N of A c


Note that the matrix corresponding to this system of equations may be poorly
conditioned, so special care must be exercised when solving this system for
large N.

Chebyshev Spectral Methods

130

C HEBYSHEV A PPROXIMATION
NONCONSTANT COEFFICIENTS AND NONLINEAR
EQUATIONS
When the equations has nonconstant coefficients, similar difficulties as in the
Fourier case are encountered (related to evaluation of convolution sums)
Consequently, the collocation (pseudospectral) approach is preferable
following the guidelines laid out in the case of the Fourier spectral methods
Assuming a = a(x) in the elliptic boundary value problem, we need to make
the following modification to Ac :
A0c0 = (D2 + D0 + bI)U,
(1)

where D0 = [a(x j )d jk ], j, k = 1, . . . , N
For the Burgers equation t u + 12 x u2 2x u we obtain at every time step
(I t D(2) )U n+1 = U n t DW n ,

where [W n ] j = [U n ] j [U n ] j ; Note that an algebraic system has to be solved at


each time step

Chebyshev Spectral Methods

131

E PILOGUE D OMAIN D ECOMPOSITION


Motivation:
treatment of problem in irregular domains
stiff problems
Philosophy partition the original domain into a number of subdomains
{m }M
m=1 and solve the problem separately on each those while respecting
consistncy conditions on the interfaces
Spectral Element Method
consider a collection of problem posed on each subdomain m
L um = f
um1 (am ) = um (am ),

um (am+1 ) = um+1 (am+1 )

Transform each subdomain m to I = [1, 1]


use weak formulation and a separate set of Nm orthogonal polynomials
to approximate the solution on every subinterval
boundary conditions on interfaces provide coupling between problems on
subdomains

You might also like