# Muckenhoupt's proof of the Hardy inequality in dimension 1

Let $\mu$, $\nu$ be nonnegative measurable functions on $(0,+\infty)$,
which we call *weights*. We say Hardy’s inequality holds for the
weights $\mu$ and $\nu$ if the following statement is true: there
exists a finite constant $\lambda > 0$ such that for any smooth
function $f \colon [0,+\infty) \to [0,+\infty)$ it holds that
\begin{equation}
\label{eq:Hardy}
\lambda \int_0^\infty \left( \int_0^x f(y) \d y \right)^2 \mu(x) \d x
\leq
\int_0^\infty f(x)^2 \nu(x) \d x.
\end{equation}
A famous result by Tomaselli, Talenti & Artola says the
following:

**Theorem.**Hardy’s inequality holds for $\mu$ and $\nu$ if and only if \begin{equation} \label{eq:B} B := \sup_{r > 0} \left( \int_r^\infty \mu(x) \d x \right) \left( \int_0^r \frac{1}{\nu(x)} \d x \right) < +\infty. \end{equation} (Here, it is understood that $1/\nu(x) = +\infty$ whenever $\nu(x) = 0$. Also, in the product inside the supremum we take $0 \cdot \infty$ to mean $0$.) The best constant $\lambda$ in Hardy's inequality satisfies \begin{equation*} \frac{1}{4 B} \leq \lambda \leq \frac{1}{B}. \end{equation*}

There's a very clean proof of this by Muckenhoupt which I discuss here (in that paper you can also find references to the papers of Tomaselli, Talenti and Artola, which are not so well known). This kind of inequalities crop up often in kinetic theory; for example, we used it in relation to the Smoluchowski equation, and a discrete version in a study of the Becker-Döring equation. Of course, there are many generalisations of the inequality \eqref{eq:Hardy}: with different exponents, in domains other than $(0,+\infty)$, in higher dimensions, for $\mu$, $\nu$ measures instead of functions, and discrete versions. Many of these can be found in this nice book by Opic and Kufner. More recently, a nonlocal version has been proved by Frank and Seiringer, which happens to be very interesting for some equations in mathematical biology and other applied domains. The name "Hardy's inequality" or "Hardy's inequality with weights" is used for different versions of it, and is not completely standard across the literature. There seems to be some agreement that the inequality \begin{equation} \label{eq:HardyHardy} \int_0^\infty \left( \frac{1}{x} \int_0^x f(y) \d y \right)^p \d x \leq \left(\frac{p}{p-1}\right)^p \int_0^\infty f(x)^p \d x, \end{equation} which holds for all $1 < p < +\infty$ and all nonnegative measurable functions $f \colon (0,+\infty) \to \R$, is the ``basic'' Hardy inequality, and it was indeed proved by Hardy, with contributions from other mathematicians. Notice that in the case $p=2$, (\ref{eq:HardyHardy}) is a particular case of (\ref{eq:Hardy}) with $\mu(x) = 1/x^2$, $\nu(x) = 1$. The value given for the constant is the optimal one in this case.

Inequality (\ref{eq:Hardy}) can also be written equivalently as \begin{equation} \label{eq:Hardy2} \lambda \int_0^\infty u(x)^2 \mu(x) \d x \leq \int_0^\infty (u'(x))^2 \nu(x) \d x, \end{equation} for all smooth functions $u \colon [0,+\infty) \to \R$ with $u(0)=0$. When we write it in this way it is clearer that Hardy's inequality is also a close relative of the Poincaré inequality. I will use this form since it is shorter to write in the argument I want to explain.

The proof given by Muckenhoupt goes like this: first, in order to see that \eqref{eq:B} is a necessary condition, assume that Hardy's inequality \eqref{eq:Hardy2} holds for some finite $\lambda > 0$. By an approximation argument, it is easy to see that it also holds for all absolutely continuous $u \colon [0,+\infty) \to \R$ with $u(0) = 0$. If for $1/\nu$ is integrable on $[0,R]$ for a given $R > 0$ then we choose any $R > 0$ and define \begin{equation*} u(x) := \begin{cases} \int_0^x \frac{1}{\nu(x)} \d x &\qquad \text{for $0 \leq x < R$}, \ \int_0^R \frac{1}{\nu(x)} \d x &\qquad \text{for $R \leq x$}. \end{cases} \end{equation*} Bounding below the left hand side of \eqref{eq:Hardy2} by the same integral over the region $(R, \infty)$ for some $R > 0$ we have \begin{equation*} \lambda \left( \int_R^\infty \mu(x) \right) \left( \int_0^R \frac{1}{\nu(x)} \d x \right)^2 \d x \leq \int_0^R \frac{1}{\nu(x)} \d x, \end{equation*} that is, \begin{equation} \label{eq:1} \lambda \left( \int_R^\infty \mu(x) \right) \left( \int_0^R \frac{1}{\nu(x)} \d x \right) \d x \leq \frac{1}{\lambda}. \end{equation} On the other hand, assume that for a given $R > 0$ we have $\int_0^R \frac{1}{\nu(x)} \d x = +\infty$. Then for any function $\overline{\nu}$ such that $\nu(x) \leq \overline{\nu}(x)$ for all $x$, and such that $1/\overline{\nu}$ is integrable over compact sets of $[0,+\infty)$, we define \begin{equation*} u(x) := \begin{cases} \int_0^x \frac{1}{\overline{\nu}(x)} \d x &\qquad \text{for $0 \leq x < R$}, \ \int_0^R \frac{1}{\overline{\nu}(x)} \d x &\qquad \text{for $R \leq x$}, \end{cases} \end{equation*} much in the same way as before. With the same estimate we see then that \begin{equation*} \lambda \left( \int_R^\infty \mu(x) \right) \left( \int_0^R \frac{1}{\overline{\nu}(x)} \d x \right)^2 \d x \leq \int_0^R \frac{\nu(x)}{\overline{\nu}(x)^2} \d x \leq \int_0^R \frac{1}{\overline{\nu}(x)} \d x. \end{equation*} Since we can choose $\overline{\nu}$ such that $\int_0^R \frac{1}{\overline{\nu}}$ is as large as we like, we deduce that \begin{equation} \label{eq:2} \int_R^\infty \mu(x) \d x = 0. \end{equation} We have proved that for all $R > 0$, either \eqref{eq:1} holds or \eqref{eq:2} holds, so $B < 1/\lambda$.

Now, assume that \eqref{eq:B} holds, and let us show Hardy’s inequality \eqref{eq:Hardy2} holds. Take a generic function $\alpha$, to be fixed later. For all $x \geq 0$ we have, by the Cauchy-Schwarz inequality, \begin{equation*} u(x)^2 = \left( \int_0^x u’(y) \d y \right)^2 \leq \beta(x) \int_0^x (u’(y))^2 \nu(y) \alpha(y) \d y, \end{equation*} where \begin{equation*} \beta(x) := \int_0^x \frac{1}{\nu(y) \alpha(y)} \d y. \end{equation*} So

In order to prove our inequality it is then enough to find a function
$\alpha$ such that
\begin{equation*}
\alpha(y) \int_y^\infty \mu(x) \beta(x) \d x
\leq 4B
\qquad \text{for all $y > 0$.}
\end{equation*}
Now there’s a clever choice of $\alpha$, which I wouldn’t know how to
find if I didn’t know it already! It is
\begin{equation*}
\alpha(y)^2 := \int_0^y \frac{1}{\nu(x)} \d x,

\end{equation*}
which gives
\begin{equation*}
\beta(x) = \int_0^x \frac{1}{\nu(y) \alpha(y)} \d y
= \int_0^x \frac{(\alpha(y)^2)’}{\alpha(y)} \d y
= 2 \int_0^x \alpha’(y) \d y = 2 \alpha(x),
\end{equation*}
so we need to show that
\begin{equation}
\label{eq:3}
2 \alpha(y) \int_y^\infty \mu(x) \alpha(x) \d x
\leq 4B
\qquad \text{for all $y > 0$.}
\end{equation}
Call $M(x) := \int_x^\infty \mu(y) \d y$. Since \eqref{eq:B} is just
$M(x) \alpha(x)^2 \leq B$,
\begin{equation*}
\int_y^\infty \mu(x) \alpha(x) \d x
\leq
\sqrt{B} \int_y^\infty \frac{\mu(x)}{\sqrt{M(x)}} \d x
= - 2 \sqrt{B} \int_y^\infty \left({\sqrt{M(x)}}\right)’ \d x
= 2 \sqrt{B} \sqrt{M(y)}.
\end{equation*}
Using this on the left of \eqref{eq:3} and again that $\sqrt{M(x)}
\alpha(x) \leq \sqrt{B}$ gives \eqref{eq:3}.