Proving inequality using double integral If it's a known inequality or a duplicate - sorry, iv'e searched the question archive and elsewhere, didn't find anything similar.
Let $f$ be a positive continuous function over the interval $[a,b]$.
Prove the inequality:$$
\int_{a}^{b}f(x)dx \cdot \int_{a}^{b} \frac{1}{f(x)}dx \geq(b-a)^2
$$
using double integrals.
iv'e tried defining $g(x,y)=\frac{f(y)}{f(x)}$,  and then integrating over the square $[a,b]\times[a,b]$, so we get $\int_{a}^{b}\int_{a}^{b}\frac{f(y)}{f(x)}dxdy=\int_{a}^{b}f(y)dy \cdot \int_{a}^{b} \frac{1}{f(x)}dx$, and the double integral is then equal to the volume under $g(x,y)$ and over the above mentioned square. didn't manage to prove that the volume is at least $(b-a)^2$.
 A: The double integral method:
Proof. $\blacktriangleleft$
\begin{align*}
\int_a^b f \int_a^b \frac 1 f 
&= \int_a^b f(x)\mathrm dx \int_a^b \frac 1{f(y)} \mathrm dy\\
&= \iint_{[a,b]^2} \frac {f(x)}{f(y)} \mathrm dx \mathrm dy.
\end{align*}
Also,
\begin{align*}
\int_a^b f \int_a^b \frac 1 f 
& = \int_a^b f(y)\mathrm dy \int_a^b \frac 1{f(x)}\mathrm dx\\
&= \iint_{[a,b]^2} \frac {f(y)}{f(x)} \mathrm dx \mathrm dy
\end{align*}
Hence
\begin{align*}
\int_a^b f \int_a^b \frac 1 f 
&= \frac12 \iint_{[a,b]^2} \left( \frac  {f(x)} {f(y)} + \frac {f(y)} {f(x)}\right)\mathrm dx \mathrm dy\\
&\geqslant \iint_{[a,b]^2} \sqrt{\frac {f(x)} {f(y)} \cdot \frac {f(y)} {f(x)}} \mathrm dx \mathrm dy \\
&= (b-a)^2. \blacktriangleright
\end{align*}
A: Using Cauchy-Schwarz as suggested by Lord Shark the Unknown,
\begin{multline}\left|b-a\right|^{2}=\left|\int_{a}^{b}dx\right|^{2}=\left|\int_{a}^{b}\sqrt{f(x)}\frac{1}{\sqrt{f(x)}}dx\right|^{2}\leq\int_{a}^{b}\left|\sqrt{f(x)}\right|^{2}dx\int_{a}^{b}\left|\frac{1}{\sqrt{f(x)}}\right|^{2}dx\\=\int_{a}^{b}f(x)dx\int_{a}^{b}\frac{1}{f(x)}dx.\end{multline}
We have used the fact that the function $f$ is positive, but we have not made use of the fact that it is continuous.
Indeed, this should work for any integrable positive function $f$.
