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