# Hardy's inequality

Hardy's inequality is an inequality in mathematics, named after G. H. Hardy.
Its discrete version states that if $a_{1},a_{2},a_{3},\dots$ is a sequence of non-negative real numbers, then for every real number p > 1 one has
    $\sum _{n=1}^{\infty }\left({\frac {a_{1}+a_{2}+\cdots +a_{n}}{n}}\right)^{p}\leq \left({\frac {p}{p-1}}\right)^{p}\sum _{n=1}^{\infty }a_{n}^{p}.$
If the right-hand side is finite, equality holds if and only if $a_{n}=0$ for all n.
An integral version of Hardy's inequality states the following: if f is a measurable function with non-negative values, then
    $\int _{0}^{\infty }\left({\frac {1}{x}}\int _{0}^{x}f(t)\,dt\right)^{p}\,dx\leq \left({\frac {p}{p-1}}\right)^{p}\int _{0}^{\infty }f(x)^{p}\,dx.$
If the right-hand side is finite, equality holds if and only if f(x) = 0 almost everywhere.
Hardy's inequality was first published and proved (at least the discrete version with a worse constant) in 1920 in a note by Hardy. The original formulation was in an integral form slightly different from the above.

## Statements
### General discrete Hardy inequality

The general weighted one dimensional version reads as follows:$^{:§332}$ if $a_{n}\geq 0$, $\lambda _{n}>0$ and $p>1$,
    $\sum _{n=1}^{\infty }\lambda _{n}{\Bigl{\frac {\lambda _{1}a_{1}+\dotsb +\lambda _{n}a_{n}}{\lambda _{1}+\dotsb +\lambda _{n}}}{\Bigr )}^{p}\leq {\Bigl{\frac {p}{p-1}}{\Bigr )}^{p}\sum _{n=1}^{\infty }\lambda _{n}a_{n}^{p}.$

### General one-dimensional integral Hardy inequality

The general weighted one dimensional version reads as follows:$^{:§330}$
* If $\alpha +{\tfrac {1}{p}}<1$, then
    $\int _{0}^{\infty }{\biggly^{\alpha -1}\int _{0}^{y}x^{-\alpha }f(x)\,dx{\biggr )}^{p}\,dy\leq {\frac {1}{{\bigl1-\alpha -{\frac {1}{p}}{\bigr )}^{p}}}\int _{0}^{\infty }f(x)^{p}\,dx$
* If $\alpha +{\tfrac {1}{p}}>1$, then
    $\int _{0}^{\infty }{\biggly^{\alpha -1}\int _{y}^{\infty }x^{-\alpha }f(x)\,dx{\biggr )}^{p}\,dy\leq {\frac {1}{{\bigl\alpha +{\frac {1}{p}}-1{\bigr )}^{p}}}\int _{0}^{\infty }f(x)^{p}\,dx.$

### Multidimensional Hardy inequalities with gradient
#### Multidimensional Hardy inequality around a point

In the multidimensional case, Hardy's inequality can be extended to $L^{p}$-spaces, taking the form
    $\left\|{\frac {f}{\cdot }}\right\|_{L^{p}(\mathbb {R} ^{n})}\leq {\frac {p}{n-p}}\|\nabla f\|_{L^{p}(\mathbb {R} ^{n})},2\leq n,1\leq p<n,$
where $f\in C_{c}^{\infty }(\mathbb {R} ^{n})$, and where the constant ${\frac {p}{n-p}}$ is known to be sharp; by density it extends then to the Sobolev space $W^{1,p}(\mathbb {R} ^{n})$.
Similarly, if $p>n\geq 2$, then one has for every $f\in C_{c}^{\infty }(\mathbb {R} ^{n})$
    ${\Big1-{\frac {n}{p}}{\Big )}^{p}\int _{\mathbb {R} ^{n}}{\frac {\vert f(x)-f(0)\vert ^{p}}{|x|^{p}}}dx\leq \int _{\mathbb {R} ^{n}}\vert \nabla f\vert ^{p}.$

#### Multidimensional Hardy inequality near the boundary

If $\Omega \subsetneq \mathbb {R} ^{n}$ is an nonempty convex open set, then for every $f\in W^{1,p}(\Omega )$,
    ${\Big1-{\frac {1}{p}}{\Big )}^{p}\int _{\Omega }{\frac {\vert f(x)\vert ^{p}}{\operatorname {dist} (x,\partial \Omega )^{p}}}\,dx\leq \int _{\Omega }\vert \nabla f\vert ^{p},$
and the constant cannot be improved.

### Fractional Hardy inequality

If $1\leq p<\infty$ and $0<\lambda <\infty$, $\lambda \neq 1$, there exists a constant $C$ such that for every $f:(0,\infty )\to \mathbb {R}$ satisfying $\int _{0}^{\infty }\vert f(x)\vert ^{p}/x^{\lambda }\,dx<\infty$, one has$^{:Lemma2}$
    $\int _{0}^{\infty }{\frac {\vert f(x)\vert ^{p}}{x^{\lambda }}}\,dx\leq C\int _{0}^{\infty }\int _{0}^{\infty }{\frac {\vert f(x)-f(y)\vert ^{p}}{\vert x-y\vert ^{1+\lambda }}}\,dx\,dy.$

## Proof of the inequality
### Integral version (integration by parts and Hölder)

Hardy’s original proof$^{:§327(ii)}$ begins with an integration by parts to get
    ${\begin{aligned}\int _{0}^{\infty }\left({\frac {1}{x}}\int _{0}^{x}f(t)\,dt\right)^{p}dx&=\int _{0}^{\infty }\left(\int _{0}^{x}f(t)\,dt\right)^{p}{\frac {1}{x^{p}}}dx\\[0.2em]&={\frac {p}{p-1}}\int _{0}^{\infty }\left(\int _{0}^{x}f(t)\,dt\right)^{p-1}{\frac {f(x)}{x^{p-1}}}dx\\[0.2em]&={\frac {p}{p-1}}\int _{0}^{\infty }\left({\frac {1}{x}}\int _{0}^{x}f(t)\,dt\right)^{p-1}f(x)dx\end{aligned}}$
Then, by Hölder's inequality,
    $\int _{0}^{\infty }\left({\frac {1}{x}}\int _{0}^{x}f(t)\,dt\right)^{p}dx\leq {\frac {p}{p-1}}\left(\int _{0}^{\infty }\left({\frac {1}{x}}\int _{0}^{x}f(t)\,dt\right)^{p}dx\right)^{1-{\frac {1}{p}}}\left(\int _{0}^{\infty }f(x)^{p}\,dx\right)^{\frac {1}{p}},$
and the conclusion follows.

### Integral version (scaling and Minkowski)

A change of variables gives
    $\left(\int _{0}^{\infty }\left({\frac {1}{x}}\int _{0}^{x}f(t)\,dt\right)^{p}\ dx\right)^{1/p}=\left(\int _{0}^{\infty }\left(\int _{0}^{1}f(sx)\,ds\right)^{p}\,dx\right)^{1/p},$
which is less or equal than $\int _{0}^{1}\left(\int _{0}^{\infty }f(sx)^{p}\,dx\right)^{1/p}\,ds$ by Minkowski's integral inequality. Finally, by another change of variables, the last expression equals
    $\int _{0}^{1}\left(\int _{0}^{\infty }f(x)^{p}\,dx\right)^{1/p}s^{-1/p}\,ds={\frac {p}{p-1}}\left(\int _{0}^{\infty }f(x)^{p}\,dx\right)^{1/p}.$

### Discrete version: from the continuous version

Assuming the right-hand side to be finite, we must have $a_{n}\to 0$ as $n\to \infty$. Hence, for any positive integer j, there are only finitely many terms bigger than $2^{-j}$. This allows us to construct a decreasing sequence $b_{1}\geq b_{2}\geq \dotsb$ containing the same positive terms as the original sequence (but possibly no zero terms). Since $a_{1}+a_{2}+\dotsb +a_{n}\leq b_{1}+b_{2}+\dotsb +b_{n}$ for every n, it suffices to show the inequality for the new sequence. This follows directly from the integral form, defining $f(x)=b_{n}$ if $n-1<x<n$ and $f(x)=0$ otherwise. Indeed, one has
    $\int _{0}^{\infty }f(x)^{p}\,dx=\sum _{n=1}^{\infty }b_{n}^{p}$
and, for $n-1<x<n$, there holds
    ${\frac {1}{x}}\int _{0}^{x}f(t)\,dt={\frac {b_{1}+\dots +b_{n-1}+(x-n+1)b_{n}}{x}}\geq {\frac {b_{1}+\dots +b_{n}}{n}}$
(the last inequality is equivalent to $(n-x)(b_{1}+\dots +b_{n-1})\geq (n-1)(n-x)b_{n}$, which is true as the new sequence is decreasing) and thus
    $\sum _{n=1}^{\infty }\left({\frac {b_{1}+\dots +b_{n}}{n}}\right)^{p}\leq \int _{0}^{\infty }\left({\frac {1}{x}}\int _{0}^{x}f(t)\,dt\right)^{p}\,dx$.

### Discrete version: Direct proof

Let $p>1$ and let $b_{1},\dots ,b_{n}$ be positive real numbers. Set $S_{k}=\sum _{i=1}^{k}b_{i}$. First we prove the inequality
Let $T_{n}={\frac {S_{n}}{n}}$ and let $\Delta _{n}$ be the difference between the $n$-th terms in the right-hand side and left-hand side of *, that is, $\Delta _{n}:=T_{n}^{p}-{\frac {p}{p-1}}b_{n}T_{n}^{p-1}$. We have:
    $\Delta _{n}=T_{n}^{p}-{\frac {p}{p-1}}b_{n}T_{n}^{p-1}=T_{n}^{p}-{\frac {p}{p-1}}(nT_{n}-(n-1)T_{n-1})T_{n}^{p-1}$
or
    $\Delta _{n}=T_{n}^{p}\left(1-{\frac {np}{p-1}}\right)+{\frac {p(n-1)}{p-1}}T_{n-1}T_{n}^{p}.$
According to Young's inequality we have:
    $T_{n-1}T_{n}^{p-1}\leq {\frac {T_{n-1}^{p}}{p}}+(p-1){\frac {T_{n}^{p}}{p}},$
from which it follows that:
    $\Delta _{n}\leq {\frac {n-1}{p-1}}T_{n-1}^{p}-{\frac {n}{p-1}}T_{n}^{p}.$
By telescoping we have:
    ${\begin{aligned}\sum _{n=1}^{N}\Delta _{n}&\leq 0-{\frac {1}{p-1}}T_{1}^{p}+{\frac {1}{p-1}}T_{1}^{p}-{\frac {2}{p-1}}T_{2}^{p}+{\frac {2}{p-1}}T_{2}^{p}-\\&\qquad -{\frac {3}{p-1}}T_{3}^{p}+\dotsb +{\frac {N-1}{p-1}}T_{N-1}^{p}-{\frac {N}{p-1}}T_{N}^{p}\\&\qquad =-{\frac {N}{p-1}}T_{N}^{p}<0\end{aligned}}$
proving *. Applying Hölder's inequality to the right-hand side of * we have:
    $\sum _{n=1}^{N}{\frac {S_{n}^{p}}{n^{p}}}\leq {\frac {p}{p-1}}\sum _{n=1}^{N}{\frac {b_{n}S_{n}^{p-1}}{n^{p-1}}}\leq {\frac {p}{p-1}}\left(\sum _{n=1}^{N}b_{n}^{p}\right)^{1/p}\left(\sum _{n=1}^{N}{\frac {S_{n}^{p}}{n^{p}}}\right)^{(p-1)/p}$
from which we immediately obtain:
    $\sum _{n=1}^{N}{\frac {S_{n}^{p}}{n^{p}}}\leq \left({\frac {p}{p-1}}\right)^{p}\sum _{n=1}^{N}b_{n}^{p}.$
Letting $N\rightarrow \infty$ we obtain Hardy's inequality.