# Fourier series simplification

I want to show that $$\frac{1}{\pi} \int_{-\pi}^{\pi} f(x)g(x)dx = \frac{a_0\alpha_0}{2} + \sum_{n=1}^{\infty} (a_n\alpha_n + b_n\beta_n)$$ where $f,g: [-\pi,\pi] \to \mathbb{R}$ are integral functions and that the Fourier series of $f$ and $g$ are uniformly convergent to $f,g$ respectively.

$a_0,a_n,b_n,\alpha_0,\alpha_n,\beta_n$ are the fourier coefficients of $f,g$ respectively.

I thought we could simply expand the LHS, simplify, and then show equality. I start by multiplying $f(x)g(x)$ via their respective Fourier series.

$$a_0\alpha_0 + a_0(\sum_{n=1}^{\infty} \alpha_n\cos(nx) + \beta_n\sin(nx))+\alpha_0(\sum_{n=1}^{\infty} a_n\cos(nx) + b_n\sin(nx)) + (\sum_{n=1}^{\infty} \alpha_n\cos(nx) + \beta_n\sin(nx))(\sum_{n=1}^{\infty} a_n\cos(nx) + b_n\sin(nx))$$

How do I simplify this? Because we have uniform convergence, we can switch the places of the Sigma and Integral symbols yeah? Even then though..

You know that

$$f(x) = \frac{a_0}{2} + \sum_{n = 1}^\infty (a_n \cos(nx) + b_n\sin(nx)), \quad x \in [-\pi,\pi].$$

So

$$\int_{-\pi}^\pi f(x)g(x)\, dx = \frac{a_0}{2}\int_{-\pi}^\pi g(x)\, dx + \sum_{n = 1}^\infty \left(a_n \int_{-\pi}^\pi \cos(nx)g(x)\, dx + b_n \int_{-\pi}^\pi \sin(nx)g(x)\, dx\right).$$

This step is justified by the uniform convergence assumptions given in the problem. By definition of the Fourier coefficients $\alpha_n$ and $\beta_n$, we have

$$\pi \alpha_0 = \int_{-\pi}^\pi g(x)\, dx,$$

$$\pi \alpha_n = \int_{-\pi}^\pi \cos(nx)g(x)\, dx,\quad n \ge 1$$

and

$$\pi \beta_n = \int_{-\pi}^\pi \sin(nx)g(x)\, dx,\quad n \ge 1.$$

Therefore

$$\int_{-\pi}^\pi f(x)g(x)\, dx = \frac{\pi a_0\alpha_0}{2} + \sum_{n = 1}^\infty (\pi a_n\alpha_n + \pi b_n \beta_n),$$

or

$$\int_{-\pi}^\pi f(x)g(x)\, dx = \frac{a_0 \alpha_0}{2} + \sum_{n = 1}^\infty (a_n \alpha_n + b_n \beta_n).$$

• This helped greatly. Thanks. – fourier.Me Mar 12 '15 at 21:09

I am surprised nobody mentioned the brute force method. Assume that $a_0=\alpha_0$, only to ease typing. Then just expand $f$ and $g$ in the integral: $$\begin{split} \frac{1}{\pi}\int_{-\pi}^\pi f(x)g(x)\, dx &= \sum_{n, n'=1}^\infty \frac{a_n\alpha_{n'}}{\pi}\int_{-\pi}^\pi\cos(nx)\cos(n'x)\, dx + \sum_{n, n'=1}^\infty \frac{b_n\beta_{n'}}{\pi}\int_{-\pi}^\pi \sin(nx)\sin(n'x)\,dx \\ &+ \sum_{n,n'=1}^\infty \frac{a_n\beta_{n'}}{\pi}\int_{-\pi}^\pi \cos(nx)\sin(n'x)\, dx + \sum_{n, n'=1}^\infty \frac{b_n\beta_{n'}}{\pi}\int_{-\pi}^\pi\sin(nx)\cos(n'x)\, dx. \end{split}$$ Now use the addition formulas for sine and cosine: \begin{align} \cos(nx)\cos(n'x)&= \frac{1}{2}\left[ \cos((n+n')x) + \cos((n-n')x)\right] \\ \sin(nx)\sin(n'x)&=\frac{1}{2}\left[ \cos((n-n')x)-\cos((n+n')x)\right] \\ \cos(nx)\sin(n'x)&=\frac{1}{2}\left[\sin((n+n')x)+\sin((n-n')x)\right]. \end{align} to evaluate \begin{align} \frac{1}{\pi}\int_{-\pi}^\pi\cos(nx)\cos(n'x)\, dx&=\delta_{n n'}\\ \frac{1}{\pi}\int_{-\pi}^\pi\sin(nx)\sin(n'x)\, dx&=\delta_{n n'}\\ \frac{1}{\pi}\int_{-\pi}^\pi\cos(nx)\sin(n'x)\,dx&=0. \end{align} (Deltas are the Kronecker symbol: $\delta_{nn'}=1$ if $n=n'$ and $0$ otherwise). Substituting it into the big formula above gives the result.

Sure, this method is not elegant. But sometimes it might be the only thing one can do. For example, this method allows us to compute $$\int_{-\pi}^\pi f(x)g(x)\cos(x)\, dx.$$

• You did not include the cross terms, which (yes) are orthogonal over the interval of interest, in the first line. Just curious ... – Mark Viola Mar 12 '15 at 21:50
• @Dr.MV: Yes I did. The indices $n$ and $n'$ are different and independent. – Giuseppe Negro Mar 12 '15 at 22:06
• You're missing terms that are of the type $\sin nx \cos n'x$. These integrate to zero, but why not show that? – Mark Viola Mar 12 '15 at 22:20
• @Dr.MV: Of course you are right. I did not show that because I forgot. :-) Editing – Giuseppe Negro Mar 12 '15 at 22:54
• In that case, +1! – Mark Viola Mar 13 '15 at 18:43

I'll use the complex Fourier-Series to help. Letting {$f_n$} and {$g_n$} be the Fourier coefficients for $f$ and $g$ respectively reveals

$$\int_{-\pi}^{\pi} f(x)g(x)dx=\int_{-\pi}^{\pi} \sum_{n=-\infty}^{\infty} f_ne^{i n x} g(x)dx$$Uniform convergence permits

$$=\sum_{n=-\infty}^{\infty} f_n\int_{-\pi}^{\pi} g(x) e^{i nx} dx$$ $$=2\pi \sum_{n=-\infty}^{\infty} f_ng_{-n}$$since the integral defines the Fourier coefficients for $g(x)$, modulo a sign change in the exponent. Thus, we have $$\frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)g(x)dx=\sum_{n=-\infty}^{\infty} f_ng_{-n}$$which can be easily manipulated to obtain the desired result.

To that end, using the series representations, it easy to show that $f_0=\frac12 a_0$, $g_0=\frac12\alpha_0$, and for $n\ge1$

$$f_n=\frac12(a_n-ib_n)$$and

$$g_n=\frac12(\alpha_n-i\beta_n)$$

Thus, we have

$$\frac{1}{\pi}\int_{-\pi}^{\pi} f(x)g(x)dx=2\left(\sum_{n=-\infty}^{\infty} f_ng_{-n}\right)$$

$$=2\left(f_0g_0+\sum_{n=1}^{\infty} \left(f_ng_{-n}+f_{-n}g_n\right)\right)$$

$$=2\left(\frac12 a_0 \frac12 \alpha_0\right) + 2 \sum_{n=1}^{\infty} \left( \frac12 (a_n-ib_n) \frac12 (\alpha_n +i \beta_n)+\frac12 (a_n+ib_n)\frac12 (\alpha_n-i \beta_n) \right)$$

$$=\frac12 a_0 \alpha_0 + \sum_{n=1}^{\infty} (a_n\alpha_n+b_n\beta_n)$$

• Oh, I didn't even think about applying the complex Fourier-Series. Thank you. – fourier.Me Mar 12 '15 at 21:09
• My pleasure! I'll add some more. – Mark Viola Mar 12 '15 at 21:10
• An "up vote" is most appreciated. – Mark Viola Mar 12 '15 at 21:46
• I hope the added section helps. All is complete and I believe that this way is the better way to go. – Mark Viola Mar 13 '15 at 21:01