## Section16.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 16.4, the coefficient of each basis element can be obtained from the inner product, i.e. the analogue of 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{16.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{16.5.2}$$

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

### Activity16.4.Finding Fourier Coefficients.

Use similar reasoning to obtain the formulas

$$a_0 = \frac{2}{L} \int_0^L \cos\left(\frac{2\pi 0x}{L}\right)\, f(x) \,dx = \frac{2}{L} \int_0^L f(x) \,dx\tag{16.5.3}$$

and

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

Let's start with the constant term. The normalized basis element is $$\frac{1}{\sqrt{L}}\text{,}$$ so this term in the expansion should be

$$\left( \int_0^L \frac{1}{\sqrt{L}} \,f(x) \,dx \right) \frac{1}{\sqrt{L}} = \frac{1}{L} \int_0^L f(x) \,dx\text{.}\tag{16.5.5}$$

Comparison with the form of the Fourier series in the theorem (in the previous section) shows that

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

Thus, the term $$a_0/2$$ in the series correctly represents the average value of $$f$$ (on the given interval).

Proceeding similarly for the other basis elements, the term involving $$\cos\left(\frac{2\pi mx}{L}\right)$$ is

$$\left( \int_0^L \sqrt{\frac{2}{L}}\cos\left(\frac{2\pi mx}{L}\right) \,f(x)\,dx \right) \sqrt{\frac{2}{L}}\cos\left(\frac{2\pi mx}{L}\right)\tag{16.5.7}$$

and comparison with the Fourier series yields

$$a_m = \frac{2}{L} \int_0^L \cos\left(\frac{2\pi mx}{L}\right) \,f(x)\,dx\text{.}\tag{16.5.8}$$

$$b_m = \frac{2}{L} \int_0^L \sin\left(\frac{2\pi mx}{L}\right) \,f(x)\,dx\text{.}\tag{16.5.9}$$
The conventional factor of $$\frac12$$ in the definition of $$a_0$$ can now be justified by noting that the factor preceding the integral in (16.5.3) is the same as the factors preceding the integrals in (16.5.2) and (16.5.4).