Let $$ \mathcal{M} := \left\{f \in L^2([0,\pi]): \int_0^\pi f(x)\cos x dx = \int_0^\pi f(x)\sin x dx = 1\right\}. $$
Solve this problem: $$ \tag{P} \min_{\mathcal M} \int_0^\pi [f(x)]^2dx $$
Using Cauchy-Schwarz, I get $$ 1 = \langle f(x), \sin{x} \rangle \le \Vert f \Vert_2 \Vert \sin{x} \Vert_2 = \Vert f \Vert_2 \sqrt{\frac{\pi}{2}} $$ i.e. $$ \Vert f \Vert_2^2 \ge \frac{2}{\pi}, \qquad \forall f \in \mathcal M. $$
Is this correct? Now what can I do to prove that this is the minimum? I would like to find a function $f \in \mathcal{M}$ which realizes that value, but I didn't manage to find it. Can you help me?
Thanks.
If $g\in L^2([0,\pi])$ is orthogonal to $\sin(x)$ and $\cos(x)$ and $f$ is the minimum then for any $\epsilon\in \mathbb R$ $$ \langle f + \epsilon g, \sin(x) \rangle = \langle f, \sin(x)\rangle = 1\\ \langle f + \epsilon g, \cos(x) \rangle = \langle f, \cos(x)\rangle = 1 $$ So for each $\epsilon\in \mathbb R$, $f + \epsilon g$ belongs to $\mathcal M$ and $\phi(\epsilon):= \lVert f + \epsilon g \rVert ^2$ must have a minimum at $\epsilon = 0$. Since $$ \left . \frac {d\phi} {d\epsilon} \right\vert_{\epsilon = 0} = 2\langle f, g\rangle = 0 $$ $f$ is orthogonal to $g$ and therefore (because of freedom in the choice of $g$) it is a linear combination of $\sin(x)$ and $\cos(x)$. The condition $f\in \mathcal M$ allows us to determine the coefficients $$ f = \frac 2 \pi (\sin(x) + \cos(x)) $$