Show that Hardy's inequality holds iff $f=0$ alomost everywhere Reading the questions in this forum, I was interested by the Classical Hardy's inequality:
$$\int_0^{\infty}\left(\frac{1}{x}\int_0^xf(s)ds\right)^p dx\leq \left(\frac{p}{p-1}\right)^p\int_0^{\infty}(f(x))^pdx,$$
where $f\geq0$ and $f\in L^p(0,\infty)$, $p>1$.
I tried to prove that the equality holds if and only if $f=0$ a.e.. The trivial part is that $f=0$ a.e. implies the equality. 
I would like to know how to prove the converse.
 A: Generally for questions of this type you want to chase down your proof of the inequality and find where you used another inequality to see when equality can hold.  I will give an example in this case.
Suppose that $f \geq 0$ on $(0,\infty)$ and $f \in L^p, 1 < p < \infty$ and define $F(x)=\frac{1}{x} \int_0^x f(t)\,dt$. Following a suggestion in Rudin (8.14) we write $F(x)=\frac{1}{x} \int_0^x t^{-\alpha} t^{\alpha}f(t)\,dt$ for $\alpha =\frac{1}{pq}$ and apply Holder's inequality to get an upper bound of $$F(x) \leq \frac{1}{x}\left(\int_0^x t^{-\alpha q}\, dt\right)^{\frac{1}{q}}\left(\int_0^x t^{\alpha p}f^p(t)\,dt\right)^\frac{1}{p}.$$
Then after applying Fubini's theorem and doing some routine calculations (which I typed out before you closed the last question and do not want to type out again) this implies Hardy's inequality.
The only inequality we applied there is Holder's and so equality holds if and only if it holds in Holder's inequality. It is not hard to show that this is the case iff the functions used in Holder's are linearly dependent if both sides of the inequality are not zero. But, if both sides of the inequality are not zero (which is iff $f = 0$ by positivity) then this implies that $\lambda t^{\alpha p}f^p(t)=t^{-\alpha q}$ for some $\lambda$ and a.e. $t$. But no power of t is integrable on $(0,\infty)$.
