Pseudospectral Methods

poster.jpg

One of the many things I learnt from my nonlinear physics project is the pseudospectral method. I’m going to try explaining this method the way I understand it.

Any function can be expressed as an infinite sum of the set of basis functions:

f(x) = \sum c_n \phi_n(x)

For the purpose of an example, if we take the polynomial basis of order 2, then the function can be approximated as

f(x) \approx p(x) = c_0  + c_1 x + c_2 x^2

The coefficients can be solved for by building a system of equations. The three unknowns require three points on the interval where we know the exact value of the function. Let these three points be x0, x1 and x2 and the value of the function at these points be b0, b1 and b3.

b_i = f(x_i)

The system of equations is now,

eqnarray.jpg

written compactly as \small{b = Ax}

The system can be solved by inverting the matrix A, which is of complexity \small{\mathcal{O}(N^3)}. The function p(x) is an interpolating polynomial in the interval of interest. As you can see, using a higher order polynomial quickly becomes prohibitively expensive.

Instead of picking the polynomial basis, you can pick any other basis. The Chebyshev basis is commonly used. A friend of mine picked the Fourier-Bessel basis. Depends on the application.

Fourier basis

The Fourier basis is fundamental to linear systems theory. Linear operators become diagonal in the Fourier basis. This fact comes handy in numerical schemes such as exponential integrators, where you’ll have to take the exponential of a matrix.

The second advantage falls out of the uncertainty principle. Increasing the number of modes in the Fourier domain is equivalent to shrinking the spacing between steps in the space domain. This leads to an exponential convergence in the number of points required as opposed to the usual polynomial convergence with finite differences.

The third key point in the use of the Fourier basis is that the FFT lets us do the equivalent of a matrix inversion in \small{\mathcal{O}(N \log N)}. This is very fast.

Summary

In summary, three random facts come together to form a beautiful theory:

  • The FFT is much faster than a matrix inversion.
  • Linear operators are diagonal in the Fourier basis.
  • Exponential convergence of spectral methods.

Hope you enjoyed reading this post as much as I enjoyed writing it.

Possibly related:

2 Responses to “Pseudospectral Methods”

  1. Kamil Kisiel Says:

    Really cool. Your blog posts are always full of interesting and thought provoking material.

    By the way, I’m back in Vancouver in 2 weeks… kind of looking forward to being back at school again.

  2. ganesh Says:

    Hey Kamil,

    I’ll be great to see you again! Can’t believe how fast time flies by. The weather has turned to shit today though, but hopefully it’s much better later.

Leave a Reply