Spectral Methods in MATLAB

Spectral methods are powerful tools for the computation of eigenvalues of differential and integral operators and their generalizations for strongly nonsym-metric problems, pseudospectra. Indeed, it was Orszag's 1971 computation of the critical Reynolds number R = 5772.22 for eigenvalue instability of plane Poiseuille fluid flow, a problem we shall discuss in Chapter 14, that did as much as anything to establish spectral methods as an important tool in scientific computing [Ors71]. Perhaps the reason why spectral methods are so important for eigenvalue computations is that these are applications where high accuracy tends to be crucial.
So far in this book we have seen two examples of eigenvalue calculations. Program 8 (p. 38) solved the harmonic oscillator problem
by a Fourier spectral method, taking advantage of the exponential decay of the eigenfunctions to replace the real line
by the periodic interval [ ? L, L]. Program 15 (p. 66) solved the even simpler problem
by a Chebyshev spectral method that imposed the homogeneous Dirichlet conditions explicitly. In this chapter, we will develop such methods further with the aid of four additional examples. In eachcase we apply spectral ideas via matrices rather than the FFT, since it is so convenient to take advantage of the standard powerful algorithms for matrix eigenvalue and generalized eigenvalue problems embodied in the MATLAB commands eig and eigs.
Our four examples and the special features they illustrate can be summarized as follows:
| Program 21: | Mathieu equation, | periodic domain; |
| Program 22: |