In my introductoion to pde book (asmar, p. 559), DFT (discrete fourier transform) is explored.
The DFT uses fourier transform theorems to "estimate the result" of a fully computed fourier transform. I suggest you use Fourier when possible though it isn't "the fastest".
Learning the basics of DFT may involve lessons of using Fourier generalized functions, band width limit, and convolution and how used with pde. It is just using limitations and tricks to estimate (or extrapolate) the full computation. If you don't need all that: you can do well enough using the Mathematica built in functions for DFT or FFT as they show examples how to use or just pick N for the Fourier (iteration limit) that "is accurate enough" for you but also quick enough.
The integer parameters involve (for example, sum limits, things that are by definition integer).
Mathematica Help for Fourier (details) shows the formula to be used and where a,b will be used (i'm using 12.0 I assume you are). It will "literally" be used as seen to estimate the "full sum of the normal Fourier".