let $f(x),g(x)$ is continuous on $[a,b]$,and such $$\int_{a}^{x}f(t)dt\ge\int_{a}^{x}g(t)dt,x\in[a,b)$$ and $$\int_{a}^{b}f(t)dt=\int_{a}^{b}g(t)dt$$ show that: $$\int_{a}^{b}xf(x)dx\le\int_{a}^{b}xg(x)dx$$
my try: we only prove this $$\Longleftrightarrow \int_{a}^{b}x(f(x)-g(x))dx\le 0$$ if $[a,b]\subset (-\infty,0]$,then $x<0$ this is true.But other case I can't.Thank you
Let $F(x) = \int_{a}^{x}f(t)\,dt, G(x) = \int_{a}^{x}g(t)\,dt$ then we have $F(x) \geq G(x)$ for all $x \in [a, b)$ and $F(b) = G(b)$. Now we have $$\int_{a}^{b}xf(x)\,dx = bF(b) - aF(a) - \int_{a}^{b}F(x)\,dx = bF(b) - \int_{a}^{b}F(x)\,dx$$ and $$\int_{a}^{b}xg(x)\,dx = bG(b) - aG(a) - \int_{a}^{b}G(x)\,dx = bG(b) - \int_{a}^{b}G(x)\,dx$$ so that
$\displaystyle \begin{aligned}\int_{a}^{b}x\{f(x) - g(x)\}\,dx &= b\{F(b) - G(b)\} - \int_{a}^{b}\{F(x) - G(x)\}\,dx\\ &= -\int_{a}^{b}\{F(x) - G(x)\}\,dx \leq 0\end{aligned}$