178
4. Series-Expansion Methods
where h*(x) denotes the complex conjugate of h(x).1 As an examplc, note that
for integer values of n and m,
ifm i= n;
ifm = n,
which is just the well-known orthogonality condition for two Fourier modes . Using this orthogonality relation and setting J(t/!) = cßt/!/ßx, with c constant, reduces (4.9) to (4.13).
If the ordinary differential equation (4.13) is solved analytically (in practical
applications it must be computcd numerically), solutions have the form ak(t) =
exp(-ickt) . Thus, in the absence of time-differencing errors, the frequency of
the kth Fourier mode is identical to the correct value for the continuous problem
w = ck. The spectral approximation does not introduce phase speed or amplitude
errors-even in the shortest wavelengths! The ability of the spectral method to
correctly capture the amplitude and phase speed of the shortest resolvable waves
is a significant advantage over conventional grid-point methods, in which the spatial derivative is approximated by finite differences, yet surprisingly, the spectral
method is not necessarily a good technique for modeling short-wavelength disturbances. The problem lies in the fact that it is only those waves retained in the
truncated series expansion that are correctly represented in the spectral solution.
If the true solution has a great deal of spatial structure on the scale of the shortest
wavelength in the truncated series expansion, the spectral representation will not
accurately approximate the true solution .
The problems with the representation of short-wavelength features in the spectral method are illustrated in Fig. 4.1, which shows ten grid-point values forrning a
2ßx-wide spike against a zero background on a periodic domain with a uniforrnly
spaced grid. Also shown is the curve defined by the truncated Fourier series passing through those ten grid-point values. The Fourier series approximation to the
2ßx spike exhibits large oscillations about the zero background state on both
sides of the spike. Now suppose that the data in Fig. 4.1 represent the initial condition for a constant-wind-speed advection problem. The over- and under-shoots
associated with the Fourier approximation will not be apparent at the initial time
if the data are sampled only at the points on the discrete mesh. If time-differencing
errors are neglected, the grid-point values will also be exact at those subsequent
times at which the initial distribution has translated an integral number of grid
intervals. The grid-point values will, however, reveal the oscillatory error at in1Multiplicationby the complex conjugate ensures that if g(x) = a(x) + i b(x ) with a and b real,
then
4. Series-Expansion Methods
where h*(x) denotes the complex conjugate of h(x).1 As an examplc, note that
for integer values of n and m,
ifm i= n;
ifm = n,
which is just the well-known orthogonality condition for two Fourier modes . Using this orthogonality relation and setting J(t/!) = cßt/!/ßx, with c constant, reduces (4.9) to (4.13).
If the ordinary differential equation (4.13) is solved analytically (in practical
applications it must be computcd numerically), solutions have the form ak(t) =
exp(-ickt) . Thus, in the absence of time-differencing errors, the frequency of
the kth Fourier mode is identical to the correct value for the continuous problem
w = ck. The spectral approximation does not introduce phase speed or amplitude
errors-even in the shortest wavelengths! The ability of the spectral method to
correctly capture the amplitude and phase speed of the shortest resolvable waves
is a significant advantage over conventional grid-point methods, in which the spatial derivative is approximated by finite differences, yet surprisingly, the spectral
method is not necessarily a good technique for modeling short-wavelength disturbances. The problem lies in the fact that it is only those waves retained in the
truncated series expansion that are correctly represented in the spectral solution.
If the true solution has a great deal of spatial structure on the scale of the shortest
wavelength in the truncated series expansion, the spectral representation will not
accurately approximate the true solution .
The problems with the representation of short-wavelength features in the spectral method are illustrated in Fig. 4.1, which shows ten grid-point values forrning a
2ßx-wide spike against a zero background on a periodic domain with a uniforrnly
spaced grid. Also shown is the curve defined by the truncated Fourier series passing through those ten grid-point values. The Fourier series approximation to the
2ßx spike exhibits large oscillations about the zero background state on both
sides of the spike. Now suppose that the data in Fig. 4.1 represent the initial condition for a constant-wind-speed advection problem. The over- and under-shoots
associated with the Fourier approximation will not be apparent at the initial time
if the data are sampled only at the points on the discrete mesh. If time-differencing
errors are neglected, the grid-point values will also be exact at those subsequent
times at which the initial distribution has translated an integral number of grid
intervals. The grid-point values will, however, reveal the oscillatory error at in1Multiplicationby the complex conjugate ensures that if g(x) = a(x) + i b(x ) with a and b real,
then
