Differentiating the truncated Fourier expansion gives
The th Fourier coefficient of the product is the discrete convolution
Projecting the advection equation onto modes therefore gives
Thus
Equivalently, if
then
This is the Fourier spectral method for variable-coefficient advection.