TITLE: proving that continuous function smaller than integral is identically zero
QUESTION [6 upvotes]: $f : [0,1] \to \mathbb{R}$ is continuous and $f \geq 0$. There is $C>0$ with $|f(x)| < C \int_{0}^{x} |f(t)| dt$ for all $x \in [0,1]$. (so $f(0)=0$)
Is it true that $f = 0$? or is there any counterexamples?
Thanks.

REPLY [5 votes]: Yes, this is well-known, but I'll write a proof because I don't like the Wikipedia proof in differential form. 
Suppose $f$ is nonzero somewhere. Let $a=\inf\{x:f(x)\ne 0\}$ and $b=a+\frac{1}{ 2C}$. Let $m=\max_{[a,b]}|f|$. By the assumption,
$$
m\le C\int_0^{b}|f(t)|\,dt = C\int_a^{b}|f(t)|\,dt \le C m(b-a)=\frac{m}{2}
$$
a contradiction.