Fourier series: Introduction
What is a Fourier series?
Before Fourier, Leonhard Euler had already written down the following formula: \[\tfrac{1}{2}x=\sin x - \tfrac{1}{2}\sin(2x)+\tfrac{1}{3}\sin(3x)-\tfrac{1}{4}\sin(4x)+\cdots\] But he did not mention how he had come to this formula and he had not noticed that the series is only valid for \(-\pi<x<\pi\). In the figure below are plotted the graphs of left-hand and right-hand sides when only the first four terms, or only the first sixteen terms are used. One can also observe that the approximation of the real function \(x \mapsto \tfrac{1}{2}x\) outside the interval \((-\pi,\pi)\) is not good: the approximation only works well in periodic continuation of the function \(x \mapsto \tfrac{1}{2}x\) defined on the interval \((-\pi,\pi)\) to a function for all real numbers, where you must set function values in integral multiples of \(\pi\) equal to zero.
Fourier series up to and including the fourth term (left) and the sixteenth term (on the right).
You can also use the interactive version below to get an impression of how well the function is approximated by a Fourier series.
Because all terms of the series are periodic, with a period \(2\pi\), the partial sums \( \displaystyle\sum_{k=1}^{n}\frac{(-1)^{k+1}}{k}\sin(kx)\) have this property as well. In the interval \((-\pi,\pi)\) the partial sums approximate \(x\mapsto \tfrac{1}{2}x\) better and better the function with an increasing number of terms. However, what are those weird mountain spots near the edges? The approximations seem to shoot through the edges. Only at the end of the nineteenth century attention was paid to this 'overshoot phenomenon' (also referred to as the Gibb's phenomenon) and an explanation was found, and it was proved that this only occurs in a Fourier series representing a periodic function with jump discontinuities. Maybe luck that Fourier had not noticed this phenomenon because it could have driven him away from the hypothesis that any periodic function can be approximated with an infinite sum of sines and cosines. Such infinite sum is nowadays called a Fourier series. If only sine terms are present, it is called a Fourier sine series. When, in addition to a constant, only cosines are present, we speak of a Fourier cosine series.