Show that $f$ is identically zero if $|f(x)|\leq\int_0^xf(t)dt$ 
Suppose $f:[0,1]\to\mathbb R$ is a continuous function satisfying $$|f(x)|\leq\int_0^xf(t)dt$$ for all $x\in[0,1]$. Show that $f$ is identically zero.

I note that $f(0)=0$ trivially. Then how should one proceed? Any hint is appreciated. I proceeded using the following but scrapped that as I am sure it's wrong.

Since $f$ is continuous on $[0,1]$ it must attain its bounds on $[0,1]$. Now, by mean-value theorem, there exists $c_x\in[0,x]$ such that $\int_0^xf(t)dt=f(c_x)x$. Now we have $\dfrac{|f(x)|}{x}\leq f(c_x)$. Taking $x\to0$ we have LHS is unbounded while RHS is bounded and so this is a contradiction.

The main flaw (according to me) is that I cannot say that $\dfrac{|f(x)|}{x}$ is unbounded as $x$ approaches $0$. Take for instance $f(x)=x$. So this is not a correct proof. 
 A: Hint: Since $f$ is continuous on $[0,1]$ so is $|f(x)|$. Therefore $|f(x)|$ attains its absolute maximum $M$ on $[0,1]$ at some point $c$. All you need to do is prove that $M=0$.
To do this, just observe that
$$M=|f(c)| \leq \int_0^c f(t)dt \leq \int_0^c M dt = M c \leq M $$ 
This shows that all inequalities are equalities and hence
$$\int_0^c f(t)dt = \int_0^c M dt $$
use continuity now to prove that $f(t)=M$ for all $t \in [0,c]$. 
A: This is a way different solution.
Let $F(x)=\int_0^x f(t) dt$.
The inequality $|f|\leq F$ implies both $F\geq 0$ and $$\forall x\in [0,1], F(x)=|F(x)|\leq \int_0^x |f(t)|dt\leq \int_0^x F(t) dt$$
Note that this inequality is the same as $f(x)\leq \int_0^x f(t) dt$, with a huge difference: $F$ is continuously differentiable, so we're allowed to use some calculus.
Let $g(x)=\int_0^x F(t) dt$ . We have proven that $g'-g\leq 0$.
Let $h(x)=e^{-x}g(x)$. Note that $\forall x\in [0,1], h'(x)=e^{-x}(g'(x)-g(x))$.
Hence $h'\leq 0$
Integrating from $0$ to $x$ yields $h(x)-h(0)\leq 0$, and since $h(0)=0$, $h(x)\leq 0$
This, in turn implies that $g(x)\leq 0$.
$x$ being arbitrary, we have $g\leq 0$.
Now, recall that $F\geq 0$. Hence $g\geq 0$ (by definition of $g$).
Hence $g=0$, thus $g''=f=0$ and we're done.
