# how prove this integral inequality?

How prove that for all continuous and decreasing function $f:[0 ,1]\mapsto(0,+\infty)$ $$\frac{\int_{0}^1x(f(x))^2dx}{\int_{0}^1xf(x)dx}\leq \frac{\int_{0}^1(f(x))^2dx}{\int_{0}^1f(x)dx}$$ thanks in advance

-
\leq to get $\leq$ and \ge to get $\ge$. –  Git Gud Jan 23 '13 at 18:39
thanks for editing Git Gut –  Maisam Hedyelloo Jan 23 '13 at 18:51
Do you know that in the set on the question, $\int _0 ^1 \varphi \bullet \psi$ defines an inner product? Do you know about the Cauchy-Schwarz inequality? –  Git Gud Jan 23 '13 at 19:08
yes i know them.thanks i think i found how prove it –  Maisam Hedyelloo Jan 23 '13 at 19:53

Since $f$ is decreasing, we can discretize this: it suffices to show that that $$\sum_{k=1}^{n} a_k \sum_{k=1}^{n} ka_k^2 \le \sum_{k=1}^{n} a_k^2 \sum_{k=1}^{n} ka_k$$ for all positive integers $n$ and nonincreasing sequences $a_1,a_2,\ldots,a_n$ of nonnegative reals. (We can then plug in $a_k = f(k/n)$ for $k=1,2,\ldots,n$ for fixed $n$ and take the limit as $n\to\infty$.)
This is not too difficult to prove by induction, but it also motivates an equivalent non-discrete proof. Indeed, \begin{align*} &\int_0^1 f(x)^2\;dx \int_0^1 xf(x)\;dx - \int_0^1 f(x)\;dx\int_0^1 xf(x)^2\;dx \\ &= \int_0^1\int_0^y f(y)^2xf(x)+yf(y)f(x)^2 - f(y)xf(x)^2 - yf(y)^2f(x) \;dx\;dy \\ &= \int_0^1\int_0^y f(y)f(x) [f(y)x+yf(x)-xf(x)-yf(y)] \;dx\;dy \\ &= \int_0^1\int_0^y f(y)f(x) [y-x][f(x)-f(y)] \;dx\;dy \\ &\ge 0, \end{align*} as desired.