Complex exponentials are periodic functions

Real sines and cosines can be expressed as complex exponentials:
$$\sin{nx}=\frac{{\rm e}^{{\rm i}nx}-{\rm e}^{-{\rm i}nx}}{2{\rm i}}\qquad{\rm and}\qquad\cos{nx}=\frac{{\rm e}^{{\rm i}nx}+{\rm e}^{-{\rm i}nx}}{2}$$ Many physical processes are periodic and can be treated as superpositions of sine or cosine functions. In addition, we have seen that many functions, even non-periodic ones, can be expanded into Fourier series, i.e. series of harmonic sine or cosine (or, more general, complex exponential) functions.

Fourier coefficients

In the pure real sine series, $$f(x)=\sum_{n=1}^{\infty}b_n\sin{\left(\frac{n\pi x}{l}\right)}\qquad,$$
substitute the sine by complex exponentials: $$=\sum_{n=1}^{\infty}b_n\frac{{\rm e}^{{\rm i}\frac{n\pi x}{l}}-{\rm e}^{-{\rm i}\frac{n\pi x}{l}}}{2{\rm i}}$$
and split the sum: $$=\sum_{n=1}^{\infty}b_n\frac{{\rm e}^{{\rm i}\frac{n\pi x}{l}}}{2{\rm i}}-\sum_{n=1}^{\infty}b_n\frac{{\rm e}^{-{\rm i}\frac{n\pi x}{l}}}{2{\rm i}}\qquad.$$
The sum of $-n$ from 1 to $\infty$ is the same as the sum of $+n$ from $-\infty$ to -1,
...so we can count the second sum backwards: $$=\sum_{n=1}^{\infty}b_n\frac{{\rm e}^{{\rm i}\frac{n\pi x}{l}}}{2{\rm i}}-\sum_{n=-\infty}^{-1}b_n\frac{{\rm e}^{{\rm i}\frac{n\pi x}{l}}}{2{\rm i}}\qquad.$$
Now that both sums are the same, we can put them together: $$=\sum_{-\infty}^{+\infty}c_n{\rm e}^{{\rm i}\frac{n\pi x}{l}}\qquad,$$
where $c_n=\begin{cases}-\frac{b_n}{2{\rm i}}&(n<0)\\0&(n=0)\\\frac{b_n}{2{\rm i}}&(n>0)\end{cases}$

Note that for the pure sine series, $c_0=0$, but in general (cosine or mixed series included) this will not be the case. In general,

the $c_n$ are found by $$c_n=\frac{1}{2\pi}\int_{-\infty}^{+\infty}f(x){\rm e}^{-{\rm i}nx}{\rm d}x$$
to expand $$f(x)=\sum_{n=-\infty}^{+\infty}c_n{\rm e}^{{\rm i}nx}\qquad.$$

Discrete Fourier series and continuous Fourier transforms

So, we need to solve an integral to find the coefficients in the Fourier series. The exponents in the series and in the integral are the same apart from the sign. This symmetry can be exploited to move from a discrete Fourier series to a continuous Fourier transform:

discrete $\rightarrow$ continuous
index variable $n$ $\rightarrow$ continuous variable $q$
Fourier coefficients $c_n$ $\rightarrow$ Fourier transform $g(q)$
$$f(x)=\sum_{n=-\infty}^{+\infty}c_n{\rm e}^{{\rm i}nx}$$ $\rightarrow$ $$f(x)=\int_{-\infty}^{+\infty}g(q){\rm e}^{{\rm i}qx}{\rm d}q$$
$$c_n=\frac{1}{2\pi}\int_{-\infty}^{+\infty}f(x){\rm e}^{-{\rm i}nx}{\rm d}x$$ $\rightarrow$ $$g(q)=\frac{1}{2\pi}\int_{-\infty}^{+\infty}f(x){\rm e}^{-{\rm i}qx}{\rm d}x$$

The set of coefficients $c_n$ depending on a discrete index varable $n$ is replaced by a continuous function $g(q)$ depending on a continuous variable $q$.
$g(q)$ is the Fourier transform of $f(x)$; $f(x)$ is the inverse Fourier transform of $g(q)$. Note the symmetry!

Fourier pairs in physics

Because of the symmetry of Fourier transform and inverse Fourier transform, many physical properties come in Fourier pairs: measure one and get the complementary one by Fourier transformation. This is an extremely useful technique and is very widespread in experimental physics. The two most common examples are spectroscopic and scattering techniques:

We can now look at some Fourier theorems and see how to predict the look of a Fourier transform without actually having to do the maths.