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