Prove that $f(a)=f(b)$ if $\int_{-\infty}^{\infty}f(x)dx=1$

The trick is reframing it in language that is familiar to optimization.

Let $g(a,b) = b - a$. We want to minimize $g$ subject to the constraint $h(a,b) = \int_a^b f(t) \ dt = \alpha$ for some $\alpha \in (0,1)$.

Note that the constraint isn't vacuous because $\int_{\mathbb R}f = 1 $ implies there must be at least one pair $(a,b)$ which satisfies $h(a,b) = \alpha$.

Using now Lagrange multipliers, $\nabla g - \lambda \nabla h = 0$ iff

$$-1 + \lambda \frac{\partial h}{\partial a} = 0 \ \ \ \text{ and } \ \ \ 1 + \lambda \frac{\partial h}{\partial b} = 0$$

Apply the Fundamental Theorem of Calculus and you're done.


This is a nice result. I tried at first to construct a counterexample.

Intuitively, I think I've convinced myself it makes sense: on the optimizing interval $[a,b]$, there is some value of $x \in (a,b)$ for which $f(x) > \max\left( f(a), f(b) \right)$. Now look at alternative scenario intervals $J= [a\pm\delta_1, b\pm\delta_2]$, which maintain $\int_J f = \alpha$. If $f(a) \neq f(b)$ it looks like we can make $J$ shorter than $b - a$.

If anyone can turn that into a formal argument it would be interesting to see.