Is it possible to have simultaneously $\int_I(f(x)-\text{sin} x)^2 dx\leq \frac{4}{9}$ and $\int_I(f(x)-\text{cos} x)^2 dx\leq \frac{1}{9}$? 
Let $I=[0,\pi]$ and $f\in L^2(I)$. Is it possible to have simultaneously $\int_I(f(x)-\sin x)^2 dx\leq \frac{4}{9}$ and $\int_I(f(x)-\cos x)^2 dx\leq \frac{1}{9}$?

I don't understand what this problem asked to do. By "possible", does it ask to give an example for $f\in L^2(I)$ so that this is true or does it ask to show that this is not true for some $f\in L^2(I)$? Can anyone please help me to understand it?
 A: Hints: 


*

*What is $\int_I (\sin(x)-\cos(x))^2\; dx$?  

*Triangle inequality

A: Does there exist an $f$ so that 
$$||f - \sin x||_2 \le \sqrt{\frac{4}{9}}=\frac{2}{3}\\
  ||f - \cos x||_2 \le \sqrt{\frac{1}{9}}=\frac{1}{3}$$
? Like in euclidian geometry: $\ f$  exists if and only if 
$$||\sin x- \cos x||_2 \le \frac{2}{3}+\frac{1}{3}=1$$
$\tiny{\text{the two balls must intersect.}}$
But we calculate
$$||\sin x- \cos x||_2^2= \int_0^{\pi} (\sin x - \cos x)^2 = \int_0^{\pi} (1 - \sin 2 x)=\pi$$
so $||\sin x- \cos x||_2= \sqrt{\pi} > 1$. No, such an $f$ does not exist.
A: Brute force:
One approach is to pick $f$ such that $(f(x)-\cos x)^2+(f(x)-\sin x)^2$ is
minimized for all $x$. If this $f$ results in
$\int_I ((f(x)-\cos x)^2+(f(x)-\sin x)^2)dx > { 5 \over 9}$ then we know
that no such function exists.
Let $L$ be the line $L = \{(t,t)\}$. Note that distance from $(x,y) $ to $L$
is given by $\sqrt{{1 \over 2} (x-y)^2}$.
Hence $\|(\alpha -\cos x, \alpha - \sin x)\|^2 \ge {1 \over 2} (\sin x - \cos x)^2$.
It follows that for any function $f$, we have
$\|(f(x) -\cos x, f(x) - \sin x)\|^2 \ge {1 \over 2} (\sin x - \cos x)^2$.
Integrating gives
$\int_0^\pi \|(f(x) -\cos x, f(x) - \sin x)\|^2 dx \ge { \pi \over 2}$.
