Let $g:[0,1] \to \mathbb{R}$ be an increasing function. Define $f:[0,1] \to \mathbb{R}~$ by $f(x)=0$ if $x=0$ and $$f(x)=\frac 1x {\int_0 ^x g(t)~dt} $$ otherwise. Is $f$ also necessarily of bounded variation?
My thought was to try to prove that $f$ is increasing (which is even stronger), but the problem is it might not be true. [For example, if $g(x)=x-10$ , we have $f(0)>f(1)$] .
Now, I see that $f$ has to be increasing on $(0,1]$. So far so good, but this still doesn't convince me that $f$ is of bounded variation.
Clearly $f$ is increasing on $(0,1]$ -- as you say (but have not shown) -- since $g$ is increasing and for $0 < x < y \leqslant 1$ we have
$$\begin{align}f(y) - f(x) &= \frac{1}{y} \int_0^y g(t) \, dt - \frac{1}{x}\int_0^x g(t) \, dt \\&= \frac{1}{y} \int_x^y g(t) \, dt - \frac{y-x}{xy}\int_0^x g(t) \, dt \\ &> \frac{1}{y} \int_x^y g(x) \, dt - \frac{y-x}{xy}\int_0^x g(t) \, dt \\ &= \frac{y-x}{y}g(x) - \frac{y-x}{xy}\int_0^x g(t) \, dt \\ &= \frac{y-x}{xy}\int_0^x (g(x) - g(t)) \, dt\\ &> 0\end{align}$$
To say that $g$ is defined and increasing on the closed interval $[0,1]$ implies that $g$ is bounded. Thus, for $0 < x \leqslant 1$
$$|f(x)| \leqslant \frac{1}{x} \int_0^x |g(t)| \, dt \leqslant \sup_{t \in [0,1]} |g(t)|, $$
and since $f(0) = 0$ we have that $f$ is bounded on $[0,1]$ and increasing on $(0,1]$ which implies it has bounded variation.