## A simple but nifty inequality

Problem: Given $f:[0,1] \to \mathbb{R}$ is integrable over $[0,1]$, and that

$$\int_0^1 dx \, f(x) = \int_0^1 dx \, x f(x) = 1$$

show that

$$\int_0^1 dx \, f(x)^2 \ge 4$$

The way to the solution here is not trivial. I started by always recognizing that, with integral inequalities, it never hurts to start with the integral of something squared is greater than or equal to zero. But…what? Well, given the integral constraints above, we can guess what we need to do.

We begin with

$$\int_0^1 dx \left [f(x) – (a x+b) \right ]^2 \ge 0$$

for any $a,b \in \mathbb{R}$. Expand the integrals and use the info provided to get that

$$\int_0^1 dx \, f(x)^2 \ge 2 a+2 b – \frac13 a^2-a b-b^2$$

We then maximize the expression on the right. Let the expression on the RHS be $g(a,b)$.

We may maximize by taking derivatives of $g(a,b)$ wrt $a$ and $b$ and setting them equal to zero. We then get a system of equations

$$2 a + 3 b = 6$$
$$a+2 b=2$$

which implies that $a=6$ and $b=-2$. Note that $g_{aa} g_{bb} – g_{ab}^2 = \frac13 \gt 0$ and $g_{aa} = -\frac23 \lt 0$, so the critical point we found is indeed a maximum. It is then easy to verify that $g(6,-2)=4$. The assertion is proven.