TITLE: Hardy's inequality again
QUESTION [6 upvotes]: How can I prove that the constant in classical Hardy's inequality is optimal?
$$\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)$.
This inequality fails for $p=1$ and $p=\infty$ ?

REPLY [6 votes]: In this form you need $p > 1.$ For the constant, take small $\epsilon > 0$ and define $$  f(x) = x^{(-1/p) - \epsilon}, \; \; x \geq 1  $$
but $$ f(x) = 0, \; 0 \leq x < 1.  $$