Math 660-Lecture 17: Spectral methods: Fourier pseduo-spectral method

Spectral accuracy of Fourier pseudo-spectral method

The spatial accuracy of Fourier pseudo-spectral method is usually O(hm) ∀m > 0 for smooth functions and O(cN ) for analytic functions. This is known as the spectral accuracy. We aim to understand why we have such spectral accuracy

1 Aliasing formula

We now consider the effect of sampling. Suppose we discretize the space with step h and xj = jh. Let’s recall the semi-discrete Fourier Transform of v, given by ∞ X −iξxj vˆ(ξ) = h vje . j=−∞ Note that this is different from the semi-discrete transform we have used in the von-Neumann analysis. The only difference is that we don’t have the extra √1 here. This extra constant doesn’t 2π matter.

2 Theorem 1. Suppose u ∈ L (R) and has a first derivative with bounded variation. Let vj = u(xj). vˆ(ξ) is the semi-discrete Fourier transform of v and uˆ(ξ) is the Fourier Transform of u. Then, for any ξ ∈ [−π/h, π/h), we have ∞ X vˆ(ξ) = uˆ(ξ + 2πj/h). j=−∞ Comment: This aliasing formula is related to the Nyquist sampling the- orem in signaling processing. We now consider the aliasing formula for functions defined on the torus. Recall that the DFT is defined by

N X −ikxn vˆk = vne n=1 Theorem 2. Suppose u is a good periodic function on [0, 2π) such that its converges to u. Let vj = u(xj). Then, the DFT of v and

1 Fouerier series of u are related by

∞ X vˆk = N uˆk+mN , k = −N/2 + 1,...,N/2. m=−∞ Note that here we used a different scaling for DFT compared with semi-discrete Fourier Transform and the Fourier series for functions on the torus. That’s why we have the extra N = 2π/h here. For the functions defined on R, we have Corollary 1. With the same notations, we have the following claims for any ξ ∈ [−π/h, π/h): • If u has p−1 continuous derivatives and are in L2 for some p ≥ 1 and a pth derivative of bounded variation, then

|uˆ(ξ) − vˆ(ξ)| = O(hp+1).

• If u has infinitely many continuous derivatives in L2, then

|uˆ(ξ) − vˆ(ξ)| = O(hm), ∀m > 0.

• If u can be analytically extended to |Im(z)| < a such that there exits a constant C independent of y ∈ (−a, a), ku(· + iy)kL2 ≤ C, then |uˆ(ξ) − vˆ(ξ)| = O(e−π(a−)/h), ∀ > 0.

Proof. We can estimate that X h Z |uˆ(ξ) − vˆ(ξ)| ≤ |uˆ(ξ + 2πj/h)| ∼ |uˆ(ξ)|dξ 2π j6=0 |ξ|>π/h

R 1 p+1 In the first case, we have Ch |ξ|>π/h |ξ|p+1 dξ = O(h ). The other cases follow similarly.

For the periodic case, we then have the following corollary:

(p−1) (j) (j) Corollary 2. Suppose u ∈ C ([0, 2π], C), u (0) = u (2π) for j = (p) 0, 1, . . . , p − 1 and that u is piecewise continuous. Let vˆk be the DFT of its sampling and uˆk be its Fourier series coefficients. Then, 1 |uˆ(k) − vˆ | = O(N −p) = O(hp). N k

2 2 The spectral accuracy

Using the aliasing formula, it’s not hard to find the spectral accuracy results. For the semi-discrete Fourier transform, supposew ˆ(ξ) = (ik)νvˆ(ξ) for ξ ∈ [−π/h, π/h) and vj = u(xj). Then, we have the following theorem: Theorem 3. For any ξ ∈ [−π/h, π/h): • If u has p − 1 continuous derivatives and are in L2 for some p ≥ ν + 1 and a pth derivative of bounded variation, then (ν) p−ν |wj − u (xj)| = O(h ).

• If u has infinitely many continuous derivatives in L2, then (ν) m |wj − u (xj)| = O(h ), ∀m > 0.

• If u can be analytically extended to |Im(z)| < a such that there exits a constant C independent of y ∈ (−a, a), ku(· + iy)kL2 ≤ C, then (ν) −π(a−)/h |wj − u (xj)| = O(e ), ∀ > 0.

Similarly, we have (p−1) (j) (j) Theorem 4. Suppose u ∈ C ([0, 2π], C), u (0) = u (2π) for j = (p) 0, 1, . . . , p − 1 and that u is piecewise continuous. Let vˆk be the DFT of ν its sampling and uˆk be the Fourier series coefficients. Suppose wˆ = (ik) vˆ and ν ≤ p − 1. Then, (ν) p−ν |wj − u (xj)| = O(h ). The proof follows easily from the aliasing formulas. We would like to omit here.

3 for 1D second order el- liptic equations

(In Sec. 1.1 of Johnson). Consider the elliptic equation −(a(x)u0)0 + c(x)u(x) = f(x), x ∈ (0, 1), u(0) = u(1) = 0. (D) where a(x) ≥ a > 0 and c(x) ≥ 0. • In the book, the problem is a special case, −u00 = f. Since there’s no big difference from that equation, let’s use this more general form.

3 3.1 Minimization of Energy and variational form (weak for- mulation) The equation corresponds to an energy Z 1 1 Z 1 1 Z 1 F (u) = a(x)u0(x)2dx + cu2dx − f(x)u(x)dx. 0 2 0 2 0 It’s easy to show using the variational principle or principle of virture work that the elliptical equation is the problem min F (u), u(0) = u(1) = 0 (M) u From this energy form, we take the variation and have Z 1 Z 1 Z 1 a(u, v) = a(x)u0(x)v0(x)dx + cuvdx = f(x)v(x)dx, 0 0 0 where v = δu. This is the weak formulation of the differential equation. The variational problem can be derived easily formally: we multiply any test function v with v(0) = v(1) = 0 and integrate. The variational problem is convenient since it can be used for equations like −(au0)0 + bu0 + cu = f, yielding Z 1 Z 1 Z 1 Z 1 a(x)u0(x)v0(x)dx + bu0vdx + cuvdx − f(x)v(x)dx = 0 0 0 0 0 1 0 where c− 2 b ≥ 0 is required. Note that the second term can also be changed R 1 0 R 1 0 to − 0 buv dx − 0 b uvdx which doesn’t really matter. 1 0 Assume that a, b, c are continuous and a(x) ≥ a > 0, c − 2 b ≥ 0. The weak form (or variation formulation) of −(au0)0 + bu0 + cu = f is: 1 Find u ∈ H0 such that Z 1 Z 1 Z 1 Z 1 a(x)u0(x)v0(x)dx + bu0vdx + cuvdx − f(x)v(x)dx = 0 (V ) 0 0 0 0 1 for all v ∈ H0 , where Z 1 1 n 0 2 2 o H0 = (v ) + v dx < ∞, v(0) = v(1) = 0 0 is the space in which the weak formulation make sense. 1 In Mathematics, H0 is a kind of Sobolev spaces (Read Sec. 1.5 for more details). The H1 norm is defined to be s Z 1 0 2 2 kvkH1 = (v ) + v dx. 0

4 Remark 1. If the solutions are nice enough, then (D), (M) and (V ) are equivalent. If the data are not smooth enough, (D) may not have classical solutions but (V ) or (M) may still have solutions. These solutions will then be called the weak solutions of the PDE.

5