# Hardy's inequality again

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$ ?

-
You may want to look at this, especially Davide's answer: math.stackexchange.com/questions/83946/… – Paul Jan 15 '12 at 22:30

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.$$
To find this function, you can equate the integrands, take the $p$-th root, multiply through by $x$ and differentiate with respect to $x$. This yields a differential equation with solution $x^{-1/p}$. Then you just need to take functions in $L^p(0,\infty)$ that are arbitrarily close to that. – joriki Jan 15 '12 at 22:41
:-) ${}{}{}{}{}$ – joriki Jan 15 '12 at 23:05