User:IMB2007/FourierSeries

Consider the function f given by $$ f(x) = x $$ for x from −π to π. Next extend this function to the entire real line i.e. $$ (-\infty,\infty),$$ by repeating it in either direction. The new function, which we will also call f, is called the "sawtooth wave" or "sawtooth function". Clearly, it is periodic of period $$2\pi$$.

Note that this (infinitely extending) periodic function f is not continuous (it breaks every $$2\pi$$ units; however, it nonetheless has a Fourier expansion. This is given by:


 * $$f(x)=a_0 + \left[\sum_{n=1}^{\infty}a_n\sin\left(nx\right)\right] $$


 * $$=2\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n} \sin(nx), \quad \ \mathrm{for \ all\ }x\in [-\pi,\pi].$$

The first five terms of this expansion will look like:


 * $$ f(x) = (-1)^2 2\sin(x) + (-1)^32/2\sin(2x) + (-1)^42/3\sin(3x) + (-1)^52/4\sin(4x) + (-1)^62/5\sin(5x) $$
 * $$= 2\left[\sin(x) - 1/2\sin(2x) + 1/3\sin(3x) - 1/4\sin(4x) + 1/5\sin(5x)\right]$$

As one begins to add, these ("pure tone") sine terms, the sum on the right hand side above begins to look more and more like the saw-tooth function, although, clearly, it is still an approximation. See the diagram below for an animation.



The next diagram shows the sum of the first 25 terms. Notice that even though the approximation is continuous, in contrast to the original sawtooth wave which has breaks, it looks like a pretty good approximation.

Square Wave


A square wave is a basic kind of non-sinusoidal waveform encountered in electronics and signal processing. An ideal square wave alternates regularly and instantaneously between two levels. Square waves are universally encountered in digital switching circuits and are naturally generated by binary (two-level) logic devices.

In contrast to the sawtooth wave, which contains $$\sin(nx)$$ terms for all n, the square wave contains only terms for odd values of n.

Using Fourier series we can write an ideal square wave as an infinite series of the form
 * $$ x_{\mathrm{square}}(t) = \frac{4}{\pi} \sum_{k=1}^\infty {\sin{\left ((2k-1)t \right )}\over(2k-1)} = \frac{4}{\pi}\left[\sin(t)+{1\over3}\sin(3t)+{1\over5}\sin(5t) + ...\right]$$