Easy integral inequality

58 Views Asked by At

Let $f$ be a continuous real-valued function on $0<x<\pi$ such that $f(0)=f(\pi)=0$ and $f' \in L^2(0,\pi)$.
a) Prove that $$\int_0^{\pi}(f(x))^2 dx \leq \int_0^{\pi} (f'(x))^2 dx.$$ b) For what functions does equality hold?

Attempted solution

Let's extend $f$ to an odd function on $(-\pi,\pi)$. Then $$\int_0^{\pi}(f(x))^2 dx = \dfrac{1}{2} \int_{-\pi}^{\pi}(f(x))^2 dx = \{\text{Parseval's formula}\}=\dfrac{1}{2} \sum_{n=1}^{\infty} a_n^2$$ where $a_n = \dfrac{2}{\pi} \int_0^{\pi} f(x) \sin (nx) dx$. If $f(x) = \sum_n a_n\sin nx$ then $f'(x) = \sum na_n \cos nx$ and so $\int_0^{\pi}(f'(x))^2 dx = \dfrac{1}{2} \int_{-\pi}^{\pi}(f'(x))^2 dx = \dfrac{1}{2} \sum_{n=1}^{\infty} (na_n)^2$. We see that equality only holds if $a_n = 0, n\neq 1$ and $a_1 \neq0$, meaning $f(x) = C\sin x$.

Does this look correct and why not?