## Section10.5Fourier Coefficients

We are now ready to find formulas for the Fourier coefficients $$a_m$$ and $$b_m\text{.}$$ Using the idea outlined at the start of Section 10.4, the coefficient of each basis element can be obtained from the “dot product” of that basis element with the original “vector”.

Let's start with the $$a_m$$ coefficients for $$m\ne0\text{.}$$ The corresponding basis elements are $$\cos\left(\frac{2\pi m x}{L}\right)\text{,}$$ so we compute

\begin{align} \cos\amp\left(\frac{2\pi n x}{L}\right) \cdot f(x)"\notag\\ \amp= \int_0^L \cos\left(\frac{2\pi n x}{L}\right) f(x) \,dx\notag\\ \amp= \int_0^L \cos\left(\frac{2\pi n x}{L}\right) \left[ ... + \sum a_m \cos\left(\frac{2\pi m x}{L}\right) + ... \right] \,dx\notag\\ \amp= 0 + \sum a_m \int_0^L \cos\left(\frac{2\pi n x}{L}\right) \cos\left(\frac{2\pi m x}{L}\right) \,dx + 0\notag\\ \amp= \sum a_m \frac{L}{2} \delta_{mn}\notag\\ \amp= \frac{L}{2} a_n\tag{10.5.1} \end{align}

where we see the squared norm of the basis function appear in the next-to-last line. In conclusion,

$$a_m = \frac{2}{L} \int_0^L \cos\left(\frac{2\pi m x}{L}\right) f(x) \,dx\tag{10.5.2}$$

where we have replaced $$n$$ by $$m\text{.}$$

### Activity10.5.1.Finding Fourier Coefficients.

Use similar reasoning to obtain the formulas

$$a_0 = \frac{2}{L} \int_0^L f(x) \,dx\tag{10.5.3}$$

and

$$b_m = \frac{2}{L} \int_0^L \sin\left(\frac{2\pi mx}{L}\right) \,f(x)\,dx\tag{10.5.4}$$

The conventional factor of $$\frac12$$ in the definition of $$a_0$$ can now be justified by noting that the factor preceding the integral in (10.5.3) is the same as the factors preceding the integrals in (10.5.2) and (10.5.4).