Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2015/discrete-mathematics-continuous-mathematics-and-probability-resit/6/a/ii/solution

Use the period-two Fourier series convention
Away from its jumps this square wave is an odd function, so . Its Fourier sine coefficients are
Only odd Fourier harmonics remain. Therefore
The Fourier series equals away from the jumps; at a jump it gives the midpoint of the one-sided limits by Dirichlet's theorem on Fourier series. The printed definition leaves the values at the integers unspecified. Choosing finite values there consistent with period two changes neither the Fourier coefficients nor these limiting values.
Figure 1.
Odd Fourier harmonics approximate the period-two square wave and vanish at every jump
. Details.

New to topics? Read the docs here!