# Fourier series coefficients proof

Can somebody help me understanding the fouries series coefficients?

I know that if we have:

$$f(t) = \sum_{n=1}^N A_n \sin(2\pi nt + Ph_n) \tag{where Ph_n = phase}$$

And because of the $\sin(a+b)$ formula: $$f(t) = \sin(2\pi nt + Ph) = \sin(2\pi nt )\cos(Ph_n) + \cos(2\pi nt )\sin(Ph_n)$$ Then:

$$\sum_{n=1}^N A_n \sin(2\pi nt + Ph) = \sum_{n=1}^N (A_n\sin(2\pi nt )\cos(Ph_n) + A_n\cos(2\pi nt )\sin(Ph_n))$$ And by definition: $$a_n = A_n\cos(Ph_n)$$ $$b_n = A_n\sin(Ph_n)$$ Then:

$$f(t) = \sum_{n=1}^N A_n \sin(2\pi nt + Ph) = \sum_{n=1}^N (a_n\sin(2\pi nt ) + b_n\cos(2\pi nt ))$$ Where does the $A_n$ in the first formula come from? Could somebody explain me where does the $\frac{a_0}{2}$ in the formula below come from? $$f(x) = \frac{a_0}{2}+\sum_{n=1}^\infty (a_n \cos(nx) + b_n \sin(nx))$$

And the most important:

How can I proof the formulas for the $a_n$ and $b_n$ coefficients?

Starting with $$f(x) = \frac{a_0}{2}+\sum_{n=1}^\infty [a_n \cos(nx) + b_n \sin(nx)],$$ to find the $b_n$, multiply both sides of the equation by $\sin(mx)$ for an arbitrary but fixed positive integer $m$, and integrate from $x=0$ to $x=\pi$. Using the fact that $$\int_0^\pi \sin(nx)\sin(mx)\,dx=\begin{cases}0, &n\not=m,\\ {\pi\over 2}, &n=m,\end{cases}$$ you get $b_m={2\over \pi}\int_0^\pi f(x)\sin(mx)\,dx$ for each $m=1,2,\dots$ Since $m$ was arbitrary, you can change this to an $n$ and get the formula for the coefficients for the sine terms.
A similar argument for the cosine terms establishes the formula for the $a_n$. Here, use the fact that $$\int_0^\pi \cos(nx)\cos(mx)\,dx=\begin{cases} 0, &n\not=m,\\ {\pi\over 2}, &n=m,\end{cases}$$ which leads to $$a_n={2\over \pi}\int_0^\pi f(x)\cos(nx)\,dx, \quad n=0,1,2,\dots$$
Note: The only purpose of the factor ${1\over 2}$ on the $a_0$ term is so that the formula for $a_0$ will match the pattern of the formula for $n=1,2,\dots$
• and what about the $\frac{a_0}{2}$ – user108425 Nov 29 '13 at 2:19
• Just take $n=0$ in the cosine part of the argument above and it gives you the formula for $a_0$ (note that the index starts at $n=0$ there). – JohnD Nov 29 '13 at 2:22
• @Mark yes, every term in the series integrates out to be zero except for the one term where the summation index equals the (fixed) value of $m$, and in that case that term integrates to be $\pi/2$. – JohnD May 26 '15 at 3:40