TITLE: Real world application of Fourier series
QUESTION [53 upvotes]: What are some real world applications of Fourier series? Particularly the complex Fourier integrals?

REPLY [2 votes]: Example of solving a partial differential equation with separation of variables and the Fourier series
This application was mentioned at https://math.stackexchange.com/a/579457/53203 but I'd like to give it a bit more emphasis and a high level motivation.
This application is important not only for practical reasons (PDEs are important for physics obviously), but it also has particular historical relevance as it is apparently what initially motivated Fourier, so we can imagine that it will be simple and intuitive.
I will be skipping over a few minor details, but the full derivation can be found here: https://en.wikipedia.org/wiki/Heat_equation#Solving_the_heat_equation_using_Fourier_series This technique is called separation of variables.
What we will find out is that solving the heat equation is equivalent to calculating the Fourier transform of the initial condition $F$.
Consider the heat equation for a one dimensional rod of length $L$:
$$
\frac{\partial f(t, x)}{\partial t} = \frac{\partial^2 f(t, x)}{\partial x^2}
$$
with boundary conditions:
$$
f(t, 0) = 0 \\
f(t, L) = 0
$$
and known initial condition:
$$
f(0, x) = F(x)
$$
The method of separation of variables starts with a guess that the solution has the form:
$$
f(t, x) = T(t)X(x)
$$
thus "separating" $t$ and $x$.
Trying a solution of this form is just a guess, and initially we have no reason to be sure it will work out.
By plugging the guess that into the equations, and doing simple manipulations, we determine that $T$ and $X$ can be any solution of:
$$
T(t) = - \frac{n \pi}{L} \frac{d T(t)}{dt} \\
X(x) = - \frac{n \pi}{L} \frac{d^2 X(x)}{dx^2}
$$
where $n$ is an integer $n > 0$. This means that picking $n = 1$ gives one possible $X$ and $T$ (we could call them $X_1$ and $T_1$), $n = 2$ give another one, and so one.
These are just simple ordinary differential equations that we know how to solve! Given the boundary conditions, the solutions are:
$$
T(t) = e^{-\frac{n^2 \pi^2 t}{L^2}}  \\
X(x) = \sin \left(\frac{n\pi x}{L}\right)
$$
We could then plug those back in the equation to confirm that our separation of variables guess does give possible answers.
Because the equation is linear, multiplying a solution by a constant or adding two solutions together is another solution, so we reach a general solution form of:
$$
f(x,t) = \sum_{n = 1}^{\infty} D_n \sin \left(\frac{n\pi x}{L}\right) e^{-\frac{n^2 \pi^2 \alpha t}{L^2}}
$$
where we are free to chose the constants $D_n$. If each $D_n$ is chosen, we have a specific solution.
But remember that for $t = 0$, we must have $F(x) = f(0, x)$, and therefore we have to chose those $D_n$ such that:
$$
F(x) = \sum_{n = 1}^{\infty} D_n \sin \left(\frac{n\pi x}{L}\right)
$$
which is basically the Fourier series decomposition of $F(x)$!
Therefore, all we need to do to solve the differential equation is calculate the weights $D_n$  of the Fourier series of the initial condition, and then just plug them into the general $f(x,t)$ formula and we are done!
Completeness
A big question that comes up then is that of completeness: can we approximate any initial condition $F$ well enough by just a bunch of sines? If we couldn't, then this approach wouldn't be very useful!
But luckily the answer is yes for a very wide class of functions that satisfies most of our needs.
I think in $L^p$ this is guaranteed by Carleson's theorem:

"Every function can be represented as a Fourier series"?
Proving that the Fourier Basis is complete for C(R/$2*\pi$ , C) with $L^2$ norm

Other PDEs
Previously, we discussed the heat equation. But separation of variables and the Fourier transform can be used solve other very important PDEs as well, which makes this method even more important. E.g.:

wave equation: see https://web.archive.org/web/20200621205928/https://courses.maths.ox.ac.uk/node/view_material/1720 section 4.4.1 "Application of Fourier series".
In that case, due to the second time derivative, we have two functions for the initial condition: position and speed of each point. And it turns out that for the solution we have to take the Fourier transform of each separately. Neat!

Schrodinger equation in cartesian coordinates: analogous to the heat equation, since we have a time derivative of order 1. For example, for a quantum free particle, the solution is a sum of complex exponentials.

2D Laplace equation: see https://web.archive.org/web/20200621205928/https://courses.maths.ox.ac.uk/node/view_material/1720 5.2.1 "Application of Fourier series"

3D Laplace equation and the Schrodinger equation of the hydrogen atom in polar coordinates: in this case, separation of variables can also be used (twice in a row!), see e.g.: https://en.wikipedia.org/wiki/Spherical_harmonics#Laplace's_spherical_harmonics but they serve as an example that "you don't always get a Fourier series" out. But you get something a bit analogous, with associated legendre polynomials rather than sines and cossines: https://en.wikipedia.org/wiki/Associated_Legendre_polynomials



when solving a 2D wave equation in spherical coordinates, we have another well known case where you don't get a Fourier series, but rather Bessel functions with an analogous motivation.