If $f:[0,1]\to[0,1]$ is such that $f(x) \leq 2 \int_0^x f(t) dt$, show that $f(x)=0$ on its domain From an SNS exam:

Let $f: [0,1] \rightarrow [0,1]$ such that $f(x) \leq 2 \int_0^x f(t) dt$. How can I show that $f(x)$ is identically $0$ in its domain?

My attempt: for every $t$ in $[0,1]$ consider $x_{max,t}$ such that the maximum value of $f$ in $[0,t]$ if $f(x_{max,t})$. Now, for the geometric meaning of the integral, $\int_0^t f(x)dx \leq x_{max}$ so $f(t) \leq 2x_{max,t}$. How can I conclude? 
 A: One way to proceed is to iterate the inequality.
Note that since $f(t) \leq 1$, we have that
$$ f(x) \leq 2 \int_0^x 1 dt = \frac{2^1}{1!}x = 2x.$$
Thus
$$ f(x) \leq 2 \int_0^x 2t dt = \frac{2^2}{2!}x^2 = 2x^2.$$
Iterating again shows that
$$ f(x) \leq \frac{2^3}{3!} x^3 = \frac{4}{3} x^3,$$
and more generally that
$$ f(x) \leq \frac{2^n}{n!} x^n$$
for any $n \geq 1$.
But for any $x \in [0,1]$, this tends to $0$.
A: As mentioned in the comments, this is a special case of Grönwall's inequality. One can proceed directly as follows:
Define $g:[0, 1] \to \Bbb R$ as
$$
 g(x) = e^{-2x} \int_0^x f(t) \, dt \, .
$$
Then  $g$ is non-negative with $g(0) = 0$ and decreasing:
$$
 g'(x) = e^{-2x} \left( f(x) - 2 \int_0^x f(t) \, dt \right) \le 0 \, .
$$
It follows that $g$ (and consequently $f$) is identically zero
on the interval.
Note that the upper bound for $f$ is not needed for this conclusion, only the
non-negativity.
A: hint
We have that $$\forall x,X\in[0,1]$$
$$0\le f(x)\le 1$$
and
$$f(X)\le 2\int_0^Xf(t)dt$$
if $X=x=0$ we find that
$$0\le f(0)\le 2\times 0$$
