Pythagorean Integral Inequality The question is to show that, given $f$ is a non-negative Riemann integrable function over an interval $[a,b]$, such that $\int_a^b f=1$, then we have that
$$\left(\int_a^b f(x) \cos(x)\right)^2+\left(\int_a^b f(x) \sin(x)\right)^2\leq 1$$
And I cannot think of the correct trick here.
With the Cauchy-Schwartz inequality, I have gotten that
$$\left(\int f \cos\right)^2+\left(\int f \sin\right)^2\leq \int f^2\int \cos^2+\int f^2\int \sin^2=\int f^2\int 1=(b-a)\int f^2$$
Which gives me almost the inequality I want, but how can I then argue about the value of $\int f^2$ working out properly? Or is my approach going completely up the wrong tree?
 A: It might be a bit overkill, but if you know a bit about Lebesgue theory, using Jensen's inequality on $f(x) \mathrm dx$ (since $\int f = 1$ and $f \geq 0$) you can conclude. I guess that this version of Jensen's inequality remains accessible when only knowing about Riemann integration :

Let $f, g$ be two continuous real functions defined on $(a, b)$ such that $\int_a^b f(x) \mathrm d x = 1$ and $f$ is non-negative, and $\varphi$ a continuous convex function defined over $\mathbb R$. Then,
$$ \varphi\left(\int_a^b g(x) f(x) \mathrm d x\right) \leq \int_a^b  \varphi \circ g(x) f(x) \mathrm d x.$$

Here, where $\varphi$ is the square function and $g = \cos$ or $\sin$,
$$\left(\int_a^b \cos x f(x) \mathrm d x \right)^2 \leq \int_a^b \cos^2 x f(x) \mathrm d x \quad \textrm{and} \quad \left(\int_a^b \sin x f(x) \mathrm d x \right)^2 \leq \int_a^b \sin^2 x f(x) \mathrm d x. $$
Then,
$$\left(\int_a^b \cos x f(x) \mathrm d x \right)^2 + \left(\int_a^b \cos x f(x) \mathrm d x \right)^2 \leq \int_a^b (\cos^2 x + \sin^2 x) f(x) \mathrm d x = 1.$$
