# bounded variation and integral

Let $$f:[a,b]\rightarrow \mathbb{R}$$ a bounded variation function and define $$g:[a,b]\rightarrow \mathbb{R}$$ by $$g(a)=0$$ and $$g(x)=\frac{1}{x-a}\int_{a}^{x}f(t)dt$$. g is a bounded variation function?

I know that $$| \int_{a}^{b}f(t)dt|\leq M(b-a)$$. M is bound of $$f$$.

There exist two nondecreasing functions $$f_1,f_2$$ such that $$f=f_1-f_2$$. Then we have $$g(x)=\frac{1}{x-a}\int_a^xf_1(t)\,dt-\frac{1}{x-a}\int_a^xf_2(t)\,dt$$. In order to show that $$g$$ has bounded variation, it is sufficient to show that $$x\mapsto\frac{1}{x-a}\int_a^xf_1(t)\,dt$$ and $$x\mapsto\frac{1}{x-a}\int_a^xf_2(t)\,dt$$ are nondecreasing.
Since $$f_1$$ is nondecreasing, it is clear that the mean of $$f_1$$ on $$[a,x]$$ is not greater than the mean of $$f_1$$ on $$[a,y]$$ for $$x\le y$$, that is $$\frac{1}{x-a}\int_a^xf_1(t)\,dt\le\frac{1}{y-a}\int_a^yf_1(t)\,dt$$. If you want a more formal proof: let $$x,y$$ be such that $$x\le y$$. By the change of variables $$u=\frac{(y-a)}{(x-a)}(t-a)+a$$, we have \begin{align*} \frac{1}{x-a}\int_a^xf_1(t)\,dt&=\frac{1}{x-a}\int_a^yf_1\left(a+(u-a)\frac{(x-a)}{(y-a)}\right)\frac{(x-a)}{(y-a)}\,du\\ &=\frac{1}{y-a}\int_a^yf_1\left(a+(u-a)\frac{(x-a)}{(y-a)}\right)\,du \end{align*}
For all $$u\in[a,y]$$, $$a+(u-a)\frac{(x-a)}{(y-a)}\le u$$ so by monoticity of $$f_1$$, we have $$f_1\left(a+(u-a)\frac{(x-a)}{(y-a)}\right)\le f_1(u)$$, hence $$\frac{1}{x-a}\int_a^xf_1(t)\,dt\le\frac{1}{y-a}\int_a^yf(u)\,du$$
Of course the same holds for $$f_2$$, hence $$g$$ has bounded variation.