Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2019/ii/paper-4/39c/a/solution

Expand the unknown in Fourier modes:
By Termwise differentiation of a Fourier series,
Also,
Therefore the coefficient of on the left-hand side is
The right-hand side has coefficients
because the coefficient of each of is and the constant coefficient is one. Hence the Fourier spectral system for a cosine-modulated second derivative is
Its coefficient array is an infinite tridiagonal matrix.
For a spectral truncation, retain the modes , set
and impose the displayed coefficient equation for every . This gives an explicit -dimensional tridiagonal system. The resulting finite Fourier series automatically satisfies the periodic boundary conditions.

New to topics? Read the docs here!