Source: https://www.roe.ac.uk/japwww/teaching/fourier/fourier1314.pdf