Prove integral inequality 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?//
 A: First note:
$$\int_0^x f(x) \, \textrm{d}x = \int 1_{[0,x]}(t) f(t) \, \textrm{d}t.$$
Then:
$$\left (\int 1_{[0,x]}(t) f(t) \, \textrm{d}t \right )^2 \leq \int 1_{[0,x]}(t)^2 \, \textrm{d}t \cdot \int_0^x f(t)^2 \, \textrm{d}t.$$
By Cauchy-Bunyakovski-Schwarz.
A: It might be worth mentioning that this is really just a scaled version of the $x = 1$ case. If you change variables to $u$ where $t = xu$, then your inequality reduces to
$$\bigg(\int_0^1 f(xu)\,du\bigg)^2 \leq \int_0^1 f(xu)^2\,du$$
This is for example Jensen's inequality for $\phi(x) = x^2$. 
A: Your notation with the $x$ in the limits and the variable of integration is a bit non-standard. However, if we fix that and divide both sides by $x^2$, we get
$$
\left(\int_0^xf(t)\frac{\mathrm{d}t}{x}\right)^2\le\int_0^xf(t)^2\frac{\mathrm{d}t}{x}
$$
Which is Jensen's inequality since $\dfrac{\mathrm{d}t}{x}$ is a unit measure on $[0,x]$.
A: You can use Cauchy-Schwarz inequality as suggested by Davide. Or more elementary, we can prove it in this way:
Consider the function $g(y)=f(y)-\frac{1}{x}\int_0^xf(t)dt$ where $x>0$. Clearly we have
$$\int_0^xg^2(y)dy\geq 0.$$
On the other thand,
$$\int_0^xg^2(y)dy=\int_0^x\Big(f(y)-\frac{1}{x}\int_0^xf(t)dt\Big)^2dy=$$
$$=\int_0^x\Big[f^2(y)-f(y)\Big(\frac{1}{x}\int_0^xf(t)dt\Big)+\Big(\frac{1}{x}\int_0^xf(t)dt\Big)^2\Big]dy=$$
$$= \int_0^xf^2(y)dy-\frac{1}{x}\Big(\int_0^xf(t)dt\Big)^2\ .$$
Now the result follows by combining the above inequality and equality. 
