# Prove $g(x)$ is increasing by Fundamental Theorem of calculus

So I was given $f(x)$ continuous and positive on $[0,\infty)$, and need to show that $g(x)$ increasing on $(0,\infty)$

And $g(x)={\int_0^xtf(t)dt\over \int_0^xf(t)dt}$

So my approach is I want to show that $g'(x)>0$, so I used FTC and quotient rule to take the derivative of $g'(x)$, but then I got suck at midway because I cannot simplify it.

-

We have \begin{align*} g'(x) &= \frac{xf(x)\cdot \int_0^x f(t)\,dt - \int_0^x tf(t)\,dt \cdot f(x)}{(\int_0^x f(t)\, dt)^2} \end{align*} Now the denominator is positive, we look at the numerator \begin{align*} xf(x)\int_0^x f(t)\,dt - \int_0^x tf(t)\, dt \cdot f(x) &= \int_0^x xf(x)f(t)\, dt - \int_0^x tf(x)f(t)\, dt\\ &= \int_0^x (x-t)f(x)f(t)\, dt \end{align*} Now $f(t) > 0$ for $t > 0$, $f(x) > 0$ and $(x-t)> 0$ for $t > 0$. So the numerator is positive for $x > 0$, therefore $g' > 0$ on $(0,\infty)$ as wished.
You want to show that for $x>0$, $$g^{\prime}(x)=\frac{xf(x)\int_0^xf(t)dt-f(x)\int_0^xtf(t)dt}{(\int_0^xf(t)dt)^2} >0$$ which implies since $f$ is positive, $0<x\int_0^xf(t)dt-\int_0^xtf(t)dt=\int_0^x(x-t)f(t)dt$ which is true since $x>t>0$ and $f$ is positive.