TITLE: Why do Fourier Series work?
QUESTION [28 upvotes]: I would like to have an intuitive understanding of Fourier Series. I mean, I know the formulas:
$$
f(t) =\frac{a_0}{2}+\sum_{n=1}^\infty a_n\cos(n\pi tL)+\sum_{n=1}^\infty b_n \sin(n\pi tL)
$$
And given a Wave, I know how to do the calculations, however, I have no idea why this formula works besides the fact it sums an infinity of sines and cosines.
How did Fourier arrive at this formula? And what's it meaning? I would be thankful if one could give me a brief explanation or point me reference material.
Thanks in advance

REPLY [9 votes]: Whenever this topic comes up, I find a lot of conjecture that reverses the order of the History of this subject. Some real History can be found in Dieudonne's "A History of Functional Analysis". I'll summarize part of what is found there.
Fourier was looking at Heat Conduction. He was fascinated by Heat. And he was able to come up with a macroscopic theory of heat by deducing how this mysterious substance "heat" would flow. He ended up with the classical Fourier heat equation for temperature:
$$
                   \frac{\partial u}{\partial t}= k\nabla^{2}u.
$$
He then proceeded to solve such equations by inventing what is now called the Method of Separation of Variables. This was no doubt motivated in part by considering earlier known separated expressions for the displacements of a vibrating string. But the novel idea of proposing separated solutions $u(x,t)=T(t)X(x)$, dividing by $TX$ to separate the variables, and concluding the existence of a separation parameter was Fourier's. This was Fourier's method, and it led to new results. The method was proposed in almost the same form as it is taught today.
Separated solutions of the vibration problem for the string were known to Fourier and others, and had been proposed decades before Fourier's work. And the integral orthogonality conditions of the trigonometric functions were even known to hold. The integral orthogonal conditions were one way to isolate the constant coefficients in the solution, assuming the  initial displacement was known. However, people believed that these conditions imposed restrictions on what initial data could be used. It was not proposed that a general function could be expanded in a trigonometric series. Fourier made an amazing leap for the time by postulating that the trigonometric expansions would have to hold for every initial (mechanical) function. And that was a radical departure from the accepted Mathematical thought on the subject at the time. It was so radical that it kept his original treatise on Heat Conduction from being published for almost two decades. Lagrange, Poisson, and others fought him on this idea. After all, how could a series of analytic functions be anything but analytic; so they could not imagine piecewise functions being expanded in this way, even if they were joined continuously.
The idea that every function could be so expanded was motivated in part by Fourier's unwarranted, but unrelenting faith in his model of heat, and the idea that separated solutions must be fully general. This was new territory, and he was challenging accepted thought on the subject. In page after page of amazingly detailed identities, he showed that expansions of common functions really did work out. He even showed how to expand $cos$ in a series of $sin$ functions, resulting in power series of odd powers for $cos$, at least over part of the interval; this addressed another objection. He showed that discontinuous cases could be handled, and that convergence would be to the mean of the left- and right-hand limits. Fourier had to fight to get others to believe that he might be correct in his belief that such expansion could be general.
Many still unfairly accuse Fourier of not having been precise at all. To Fourier's credit, the Dirichlet kernel integral expression for the truncated trigonometric Fourier series was in Fourier's original work. But because that worked was banned from publication for so long, Dirichlet was credited with this first general proof of convergence under conditions of smoothness. Actually, according to experts, it appears that Fourier's discussion of convergence using the Dirichlet integral was sound and predated Dirichlet's proof by decades.
Addressing the expansion issues was a major driving force behind rigorous Mathematics. At the time of Fourier, the following did not exist

The notion of a general function beyond explicit formulae
The Riemann integral, measures, and Lebesgue integration
The definition of real numbers
General notions of convergence
Methods for studying PDEs
Inner product space or Cauchy-Schwarz inequality
Norms and topology
Stokes and Divergence Theorems

Historians credit the desire to resolve Fourier's many conjectures as a major driving force behind the development of modern rigorous Mathematics. I think that anyone who studies these methods and sees that they work has to be puzzled and ask, "Why?" Maybe the answer is Spectral Theory, or Group Theory, or Operator Algebras, or Real Analysis, or Complex Analysis. All of these answers have something to do with it, and all of these subjects were directly and profoundly influenced by the general study of Fourier expansion.