# Showing that the system $\{\cos nx\}_{n=1}^{\infty}$ is complete in $L_2[0,\pi]$ by using even and odd functions

functional-analysishilbert-spacesinner-productsnormed-spacesperiodic functions

Trying to show that the system $$\cos nx$$ is complete in $$L_2[0,\pi]$$, I am following a proof that $$(\sin nx)_n$$ is a complete system, in a book by Eidelman who currently teaches this course, and there it states:

For $$\overline{f}(x) = \begin{cases} f(x), & \text{if 0\le n\le \pi} \\ -f(x), & \text{if -\pi\le n< 0} \end{cases}$$ it holds that $$\int_{-\pi}^{\pi}{\overline{f}(x)dx}=0$$, and because $$\overline{f}(x)$$
is odd, $$\int_{-\pi}^{\pi}{\overline{f}(x)\cos(nx)dx}=0$$. Later it's shown that $$\int f(x)\sin nx=0$$ in a similar manner, using the fact that an element that is orthogonal to a system is zero when the system is complete.

I am having trouble simply understanding why $$\int_{-\pi}^{\pi}{\overline{f}(x)dx}=\int_{-\pi}^{0}{-{f}(x)dx}+\int_{0}^{\pi}{{f}(x)dx}=0$$

• Isn't $$\int_{-\pi}^{0}{-{f}(x)dx}=\int_{0}^{\pi}{{f}(x)dx}$$?

I don't feel comfortable approaching him with little things, even if there might have been a typo in their book. I could really use a hand here.

The course is "Introduction to Hilbert Space and Operator Theory", just to make it clear what Mathematical tools are used.

Edit:
I overlooked that $$\int_{-\pi}^{0}{-{f}(x)dx}=\int_{0}^{\pi}{{f}(-x)dx}$$.

You have quoted the definition of $$\overline f (x)$$ wrongly. Your definition does not make sense because $$f(x)$$ is not defined when $$x <0$$. The correct defintion should be $$\overline{f}(x) = \begin{cases} f(x), & \text{if 0\le x\le \pi} \\ -f(-x), & \text{if -\pi\le x< 0} \end{cases}$$. With this definition I believe you can see why $$\int_{-\pi}^{\pi} \overline f(x)dx=0$$.