Spectral Methods PDF
Spectral Methods PDF
Lu Yixin
Outline
1 Basic principles
Problem formulation
Various numerical methods
Various spectral methods
How to choose trial functions
3 Summary
Basic principles Two illustrative examples of spectral methods Summary The end
Problem formulation
Lu = f , in Ω
u = g, on ∂Ω.
Problem formulation
∀n ∈ 0, . . . , N, (ψn , R) = 0
Basic principles Two illustrative examples of spectral methods Summary The end
Wave equation
∂u
= M(u).
∂t
Consider the domain (0, 2π) with periodic boundary conditions.
The approximate solution u N is represented as
N/2
X
u N (x, t) = ak (t)φk (x).
−N/2
Basic principles Two illustrative examples of spectral methods Summary The end
Weak formulation
In general,
∂u N
6= M(u N ).
∂t
The approximation is obtained by selecting a set of test
functions ψk and requiring that
2π
∂u N
Z
[ − M(u N )]ψk (x)dx = 0, (1)
0 ∂t
Trigonometric polynomials:
φk (x) = eikx ,
1 −ikx
ψk (x) = 2π e .
∂u ∂u
− = 0,
∂t ∂x
i.e.,for
∂u
M(u) = ,
∂x
condition (1) becomes
Z 2π N/2
1 ∂ ∂ X
[( − ) al (t)eilx ]e−ikx dx = 0,
2π 0 ∂t ∂x
−N/2
Basic principles Two illustrative examples of spectral methods Summary The end
dak
− ikak = 0, k = −N/2, . . . , N/2.
dt
The initial conditions are:
Z 2π
ak (0) = u(x, 0)ψk (x)dx.
0
Basic principles Two illustrative examples of spectral methods Summary The end
k p ak (t) → 0 as k → ∞
Chebyshev polynomials:
Tk (x) = cos(k cos−1 x), for k = 0, 1, . . . .
The first few Chebshev polynomials are
T0 (x) = 1
T1 (x) = x
T2 (x) = 2x 2 − 1
...
Tn+1 (x) = 2xTn (x) − Tn−1 (x).
Basic principles Two illustrative examples of spectral methods Summary The end
∂u ∂ 2 u ∂2u
− = 0, i.e., M(u) =
∂t ∂x 2 ∂x 2
on (−1, 1) with homogeneous Dirichlet boundary conditions,
u(−1, t) = 0, u(1, t) = 0.
φk (x) = Tk (x), k = 0, 1, . . . , N,
∂u N
− M(u N )|x=xj = 0, j = 1, . . . , N − 1. (2)
∂t
u N (−1, t) = 0, u N (1, t) = 0.
u N (xk , 0) = u(xk , 0), k = 0, . . . , N.
Basic principles Two illustrative examples of spectral methods Summary The end
πj
xj = cos( ).
N
Note that
πjk
φk (xj ) = cos(
).
N
We can apply Fast Fourier Transform (FFT) to evaluate
M(u N )|x=xj .
Basic principles Two illustrative examples of spectral methods Summary The end
. . . where
2 kπ 2
bk (t) = sin( )Jk (π)e−π t
ck 2
with
2, k = 0,
ck =
1, k ≥1
Since Jk (π) is decaying rapidly, the truncated series converges
at an exponential rate. A well-designed collocation method will
do the same.
Basic principles Two illustrative examples of spectral methods Summary The end
where
2, k = 0 or N
ck =
1, 1≤k ≤N −1
Basic principles Two illustrative examples of spectral methods Summary The end
where
(1) (1)
aN+1 (t) = 0, aN (t) = 0,
(1) (1)
c k ak (t) = ak +2 (t) + 2(k + 1)ak +1 (t), k = N − 1, . . . , 0,
and
(2) (2)
aN+1 (t) = 0, aN (t) = 0,
(2) (2) (1)
c k ak (t) = ak +2 (t) + 2(k + 1)ak +1 (t), k = N − 1, . . . , 0.
Basic principles Two illustrative examples of spectral methods Summary The end
(2)
The coefficients ak depend linearly on the nodal values ul ;
thus, there exists a matrix DN2 such that
N N
∂2uN X (2) πjk X
2
(t)|x=xj = ak (t) cos = (DN2 )jl ul (t).
∂x N
k =0 l=0