Science:Math Exam Resources/Courses/MATH307/December 2010/Question 06 (e)/Solution 1

From UBC Wiki

The true Fourier coefficients as in part (a) are given by

which we can approximate with a left Riemann sum over N points to get

where . Compare this to the discrete Fourier transform coefficients defined by

and comparing the expressions we see that . The discrete Fourier coefficients can be computed in Matlab using the command fft. Therefore, in Matlab, we need to sample over say 100 points and use fft,

   N = 100;
   x = linspace(0,1,N);
   C = fft(x);

Since are the discrete Fourier coefficients, then the actual Fourier coefficients are given by (where in Matlab we arbitrarily chose that N=100).

The discrete Fourier coefficients are periodic with period and so frequencies and are indistinguishable. Particularly this means that modes , will be indistinguishable to modes since they differ by period . These negative modes are relevant because they are the complex conjugates to modes and will therefore have the same amplitudes meaning that if a mode on has a high amplitude then so too will its complex conjugate affecting the result on . From part (a) we see that for the function , the amplitudes satisfied and that the highest amplitudes are for integers closest to zero. Therefore, negative modes slightly less than zero have the opportunity to create the biggest errors on modes slightly greater than . Conversely, the modes will only be affected by modes smaller than which for functions that behave like will have small amplitudes on that region and thus create small errors. The amplitudes are therefore most accurate for frequencies .