How do I prove $f=0$ almost everywhere?

During one of the problems in Rudin I was asked to show $f=0$ a.e. Here $f$ satisfies this condition:

$$f(x)=\frac{1}{x}\int^{x}_{0}f(t)dt$$ almost everywhere and is in $L^{p}(0,\infty)$. So constant functions would not work. I tried to prove by contradiction, and a few imaginary counter-examples' failure convinced me this is true. But what is a good way of proving this statement? Since we know $f\in L^{p}$ I am thinking about using Holder's inequality, but in our case it is difficult to apply (since the other side is larger ). We can assume $f\in C_{c}(0,\infty)$ since this is dense in $L^{p}$, but I still do not know how to prove this statement.

-
Show that $f$ must be uniformly bounded. Then notice that you can solve a differential equation separating variables setting $G(x)=\int_0^xf(t)\mathrm d t$. You come up with something like $G'(x)=\frac{\mathrm d G}{\mathrm d x}=\frac 1x G(x)$ –  uforoboa Dec 27 '12 at 12:07
This is a good hint. Let me think about it. –  Bombyx mori Dec 27 '12 at 12:35
@uforoboa: Can you give me a hint how to show $f$ must be uniformly bounded (almost everywhere)? –  Bombyx mori Dec 27 '12 at 15:43
I see. If $f$ is continuous then I can show this. Now we have $D(\log[G(x)])=1/x$, which gives $log[G(x)]=\log[x]$, so $G[x]$ can only be a constant, and hence $f=0$ almost everywhere. –  Bombyx mori Dec 27 '12 at 15:48

From Hardy's Inequality for Integrals conclude that the $L_p$ norm of $f$ is zero. This implies $f$ is zero a.e.

-
Thanks a lot for the nice proof! –  Bombyx mori Dec 27 '12 at 20:13

Let us put

$$F'(x)=f(x)\Longrightarrow \int_0^xf(t)dt=F(x)-F(0)\Longrightarrow$$

$$F'(x)=f(x)=\frac{1}{x}\int_0^xf(t)dt=\frac{F(x)-F(0)}{x}\Longrightarrow$$

$$\int\frac{dF}{F(x)-F(0)}=\int\frac{dx}{x}\Longrightarrow\log|F(x)-F(0)|=\log|x|+K\Longrightarrow$$

$$F(x)=C_1x+C_2\ldots.$$

But then I get $\,f\,$ is a constant...

-
$f\in L^{k}(0,\infty)$, so this cannot hold. –  Bombyx mori Dec 27 '12 at 13:32
Indeed...so apparently my first assumption about the existence of $\,F\,$ s.t. $\,F'=f\,$ cannot be...ok, I shall erase in a while my answer. –  DonAntonio Dec 27 '12 at 13:37
derivative of a function of bounded variation exists almost everywhere.maybe something can be done with this –  Koushik Dec 27 '12 at 14:10
I see. This could work since we can pass from $L^{k}$ to $C_{c}$, then this holds for $C_{c}$ means $f$ can only be constant almost everywhere, which would then imply the $L^{p}$ case is impossible unless the constant is 0. –  Bombyx mori Dec 27 '12 at 15:05

$f(x)=\frac{1}{x}\int^{x}_{0}f(t)dt$, so $xf(x)=\int^{x}_{0}f(t)dt$. Differentiating, $f(x)+x f'(x) = f(x)$, so $x f'(x) = 0$. Therefore $f'(x) = 0$ (except at $0$), so $f(x)$ is a constant. Since the only possible constant is $0$, we are done.

-
$f(x)$ can be nowhere differentiable, though. –  Bombyx mori Dec 27 '12 at 19:31
I don't agree with the comment. The function $g(x) = \int_0^x f(t)dt$ is differentiable everywhere, and so $f$ is itself a.e. differentiable (or, more strongly, it's a.e. equal to a function h which is differentiable except possibly at 0). –  user29743 Dec 27 '12 at 19:38
@countinghaus:This is only true if $f(t)$ is absolutely continuous, I think in general you only have a mean value estimate available. –  Bombyx mori Dec 27 '12 at 19:48
Oh, OK! I didn't think things through before. –  user29743 Dec 27 '12 at 19:50