Assume that a function $f$ is integrable on $[0, x]$ for every $x > 0$.
Prove that for any $x > 0$, $\displaystyle\left (\int_{0}^{x}fdx \right )^2\leq x\int_{0}^{x}f^2dx$.
I have no idea how to even start this... What concept should I be using?
EDIT:
So upon the hint of using C-S inequality/using a dummy variable for clarity, I have come up with the following proof:
Let $g$ be a constant function s.t. $g=1$ for any $x >0$.
Note that $\displaystyle\ x \cdot \int_{0}^{x}f^2(t)dt = \left(\int_{0}^{x}g(t)dt \right) \cdot \left( \int_{0}^{x}f^2(t)dt \right)$.
Since we know that f and g is integrable, we can apply the Cauchy-Schwarz Inequality for integrals. The inequality states that (integral of $f \cdot g$,... etc..).
Thus, $$ \left (\int_{0}^{x}f(t)\cdot g(t)dt \right )^2 = \left (\int_{0}^{x}f(t)dt \right )^2 \leq \int_{0}^{x}g(t)dt \cdot \int_0^x f^2(t)dt=x\int_0^x f^2dt .$$
Q.E.D.
//I don't know if I should be using $t$ or $x$ here though... As a matter of fact, shouldn't the statement change to
Prove that for any $t,x>0$, [inequality] holds.
now that we use $t$? Or am I misunderstanding the use of a dummy variable?//