This note discusses the Fourier expansion and Discrete Fourier Transform (DFT), giving step by step derivation of the definition of DFT and its variations (e.g., the discrete sine transform). After carefully going through these elementary derivations, I feel more comfortable in using Fourier expansion in my numerical codes.
(The Fast Fourier Transform algorithm (FFT) makes the DFT fast enough to solve many real-life problems, which makes FFT be among the top algorithms that have changed the world. The FFT algorithm remained mysterious to me for many years until I read Cooley and Tukey’s original paper, which turns out to be a very concise paper and very easy to follow (details are discussed in Append. A).