Hardy's Inequality for Integrals

We will show $$\left(\int_0^\infty \left| \frac1x \int_0^x f(t) \, dt\right|^p \, dx \right)^{1/p} \le \frac p{p-1} \left(\int_0^\infty |f(x)|^p \, dx \right)^{1/p}. \tag 1$$ Notice $$ \frac1x \int_0^x f(t) \, dt = \int_0^1 f(x t) \, dt .$$ Apply Minkowski's inequality (integral version) to the left hand side of (1), to see it is bounded above by $$ \int_0^1 \left(\int_0^\infty |f(xt)|^p \, dx \right)^{1/p} \, dt = \int_0^1 t^{-1/p} \, dt \left(\int_0^\infty |f(x)|^p \, dx \right)^{1/p} .$$


Dualize - it becomes $$ \left(\int_0^\infty |F(x)|^p \, dx\right)^{1/p} \le p \left(\int_0^\infty |f(x)|^p \, dx \right)^{1/p} $$ where $$ F(x) = \int_x^\infty \frac{f(t)}t \, dt $$ W.l.o.g. $f(x) \ge 0$, and w.l.o.g. $F(x) \to 0$ as $x \to \infty$. $$ |F(x)|^p = - p \int_x^\infty F'(t) |F(t)|^{p-1} \, dt $$ Substitute this into the LHS of the first inequality, and reverse the order of integration $$ - p \int_0^\infty F'(t) |F(t)|^{p-1} \int_0^t \, dx \, dt = p \int_0^\infty f(t) |F(t)|^{p-1} \, dt \le p \|f\|_p \|F\|_p^{p-1} $$ where the last inequality is Hölder. Now assume $\|F\|_p$ is finite, and divide both sides by $\|F\|_p^{p-1} $.


Let $p\in (1,+\infty)$ and $q$ its conugate exponent, that is, the real number $q$ such that $\frac 1p+\frac 1q=1$. Let $f\colon (0,+\infty)\to\mathbb R\in L^p(0,+\infty)$ and $F(x)=\frac 1x\int_{\left]0,x\right[}f(t)dt$. Then $F\in L^p(0,1)$ and $\lVert F\rVert_{L^p}\leq q\lVert f\rVert f_{L^p}$.

Pick $0<\alpha<\frac 1q$, we will specifie it later. We start using Hölder inequality \begin{align*} |xF(x)|&=\left|\int_{\left]0,x\right[}f(t)t^{\alpha}t^{-\alpha}dt\right|\\\ &\leq \left(\int_{\left]0,x\right[}\left| f(t) t^{\alpha}\right|^pdt\right)^{\frac 1p} \left(\int_{\left]0,x\right[}t^{-q\alpha}\right)^{\frac 1q}\\\ &=\left(\int_{\left]0,x\right[}\left| f(t)\right|^p t^{p\alpha}dt\right)^{\frac 1p} \left(\frac 1{1-q\alpha}x^{1-q\alpha}\right)^{\frac 1q}\\\ &=(1-q\alpha)^{-\frac 1q}\left(\int_{\left]0,x\right[}\left| f(t)\right|^p t^{\frac 1{q}}dt\right)^{\frac 1p}x^{\frac 1q-\alpha}, \end{align*} hence \begin{align*} |F(x)|&\leq (1-q\alpha)^{-\frac 1q}\left(\int_{\left]0,x\right[}\left| f(t)\right|^p t^{p\alpha}dt\right)^{\frac 1p}x^{\frac 1q-\alpha -1}\\\ &=(1-q\alpha)^{-\frac 1q}\left(\int_{\left]0,x\right[}\left| f(t)\right|^p t^{p\alpha}dt\right)^{\frac 1p}x^{-\alpha -\frac 1p} \end{align*} and $$|F(x)|^p\leq (1-q\alpha)^{-\frac pq}\int_{\left]0,x\right[}\left| f(t)\right|^p t^{p\alpha}dt x^{-p\alpha-1}.$$ Integrating and using Fubini's theorem, we get

\begin{align*} \int_{(0,+\infty)}|F(x)|^pdx&\leq (1-q\alpha)^{-\frac pq}\int_{(0,\infty)}\int_{(0,x)} \left| f(t)\right|^p t^{p\alpha}x^{-p\alpha-1}dtdx\\\ &=(1-q\alpha)^{-\frac pq}\int_{(0,+\infty)}\int_{(t,+\infty)}\left| f(t)\right|^p t^{p\alpha}x^{-p\alpha-1}dxdt\\\ &=(1-q\alpha)^{-\frac pq}\int_{(0,+\infty)}\left| f(t)\right|^p t^{p\alpha}\left(\int_{(t,+\infty)}x^{-p\alpha-1}dx\right)dt, \end{align*} thus $$\int_{(0,+\infty)}|F(x)|^pdx \leq(1-q\alpha)^{-\frac pq}\int_{(0,+\infty)}\left|f(t)\right|^p t^{p\alpha}\frac 1{p\alpha}t^{-p\alpha}dt$$ and finally $$\int_{(0,+\infty)}|F(x)|^pdx\leq (1-q\alpha)^{-\frac pq}(p\alpha)^{-1}\int_{(0,+\infty)}\left| f(t)\right|^p dt.$$ Now, we pick $\alpha:=\frac 1{pq}<\frac 1q$, to get $$(1-q\alpha)^{-\frac pq}(p\alpha)^{-1} =(1-\frac 1p)^{-\frac 1q}q= q^{\frac pq}q=q^{1+p\left(1-\frac 1p\right)}=q^p,$$ which gives $\lVert F\rVert_{L^p}\leq q\lVert f\rVert_{L^p}$.

This question deals with the case of the best constant.