# How to prove this integral inequality

I have this exercise : let $f(X): [0,1] \rightarrow \mathbb{R}$ be a measurable function such that $0< m \le f(x) \le M < \infty$ a.e. Prove that

$$\big( \int_0^1 f(x) dx \Big) \big( \int_0^1 \frac{1}{f(x)} dx \Big) \le \frac{(M+m)^2}{4mM} .$$

My attempt: I tried to divide the interval $[0,1]$ in thwo sets $A=\{x\in [0,1] | f(x) \le \sqrt{Mm}\}$ and $B=[0,1] \setminus A$. Called $x$ the measure of $B$, i get that the first integral is less than $$xM+(1-x)\sqrt{Mm}$$ and the second integral is less than $$\frac{x}{\sqrt{Mm}}+\frac{(1-x)}{m}.$$ Taking the product of these two quantities and maximize for $x \in [0,1]$ I get a value (always when $x=1/2$ ) of $$\frac{(\sqrt{M}+\sqrt{m})^2}{4m}.$$ This is similar but not exactly the bound the exercise asks to find.

• What if you replace $\sqrt{Mn}$ by $\frac{M+m}{2}$? – Jack D'Aurizio Oct 24 '15 at 14:06
• That was my first try, but I get always a trivial maximum at $x=0$ of $M/m$. – mrprottolo Oct 24 '15 at 14:16

Taking inspiration from this answer, note that $$x\in [m,M]\implies x+\frac{mM}x \leq m+M$$, thus $$f+\frac{mM}{f}\leq m+M$$
Integrating, $$\int_0^1 f(x) dx +mM \int_0^1 \frac 1{f(x)}dx \leq m+M$$ and by AM-GM $$\sqrt{\int_0^1 f(x) dx \cdot mM \int_0^1 \frac 1{f(x)}dx}\leq \frac 12 \left( \int_0^1 f(x) dx +mM \int_0^1 \frac 1{f(x)}dx\right)\le \frac{m+M}2$$
Hence $$\int_0^1 f(x) dx \cdot \int_0^1 \frac 1{f(x)}dx \leq \frac{(m+M)^2}{4mM}$$