[Math] Origin of coefficients of fourier series

calculusfourier series

I was wondering how we derive these formulas, and why we have a separate formula for $a_0$?
All I know from advanced engineering mathematics text book are following formulas but where do they come from?

$$a_0 = \frac{1}{2L} \int_{-L}^{L} f(x) dx,~~~~a_n = \frac{1}{L} \int_{-L}^{L} f(x) \cos{\frac{n\pi x}{L}}dx,~~~~b_n = \frac{1}{L} \int_{-L}^{L} f(x) \sin{\frac{n\pi x}{L}} dx$$

I found the proof somewhere on net!

for some function with some properties we have:
$$
\int _0 ^Tf(x)dx = \int_\alpha ^{\alpha + T}f(x)dx
$$

and now we have(suppose that $L = \pi$):
$$
f(x) = a_0 + \sum _{n=1}^{\infty}(a_n\cos(nx) + b_n\sin(nx))
$$

If we Integrate from $[-\pi, \pi]$ from above we have:
$$
\int_{-\pi}^{\pi}f(x)dx = \int_{-\pi}^{\pi}a_0 + \sum _{n=1}^{\infty}\int_{-\pi}^{\pi}(a_n\cos(nx) + b_n\sin(nx))
$$
the sum goes to zero and finally we have:
$$
\int_{-\pi}^{\pi}f(x)dx = 2\pi a_0
$$

for $a_n$ we multiply the general form with $\cos(nx)$ for $b_n$, $\sin(nx)$ comes to play, this method is due to Euler and is named Euler formulas, And also fourier him self did it this way!

Best Answer

Note that $a_0$ doesn't really have a separate formula:

If you plug in $n=0$ into $a_n$ you get the same integral.

For an intuition as to why these formula are what they are, say you wanted to calculate a Fourier series for $\cos(nx$). You know that all the coefficients except for $b_n$ must be zero. So how do you make that happen? You use the fact that: $$\int_{-\pi}^\pi \cos(nx)\cos(mx)dx=0 \ \ \bigg| \ \ m\neq n$$ $$\frac{1}{\pi}\int_{-\pi}^\pi \cos(nx)\cos(mx)dx=1 \ \ \bigg| \ \ m= n=0$$

Doing the same thing for $\sin$, you'll see that only way you can get the coefficients to be consistent with $f(x)=\cos(nx)$ or $f(x)=\sin(nx)$ is to choose the formula's you brought up.

Related Question