Let g(x)=$\frac1x\int_1^xf(t)dt$; x>0, and assume $\lim_{x\to \infty}g(x)= B$ exists. Show the following. Let f : [0,$\infty$) -> $\mathbb R$ be a continuous function and let g(x)=$\frac1x\int_1^xf(t)dt$; x>0.
Assume that $\lim_{x\to \infty}g(x)= B$ exists. Let 0 < a < b be two fixed numbers.
Show:
(i) $\int_a^b\frac{f(x)}{x}dx$ = g(b) - g(a) + $\int_a^b\frac{g(x)}{x}dx$ (Hint: Use Integration by Parts.)
(ii) $\lim_{T\to \infty}\int_{Ta}^{Tb}\frac{f(x)}{x}dx=Bln(\frac ba)$ 
I tried integral by parts for part (i) but I'm not sure how it would work with an unknown function f(x). It gave me:
$$\left[\frac 1x \int f(x)\right]_a^b + \int_a^b\left(\frac 1{x^2}\int f(x)\right)dx$$
which does kind of look like what we're looking for, except for the limits of the integral of f(x), I don't know how to work with that, or how it's supposed to go from that to [1,x], as needed in g(x).
Then for (ii) just plug in what we got for (i), and using the assumption that $\lim_{x\to \infty}g(x)= B$, and then substituting the limits, I get:
$$\lim_{T\to \infty}\int_{a}^{b}\frac{g(Tx)}{x}dx$$
And not sure what to do now... Considered IBP again, but wouldn't know how to do that with g(Tx). Please let me know what you think 

Let $h$ be an antiderivative for $f$. Then $\int_a^{b} \frac {f(t)} t\, dt= \frac 1 t h(t)|_a^{b}-\int_a^{b} (-\frac 1 {t^{2}}) h(t)\, dt$. Since $tg(t)$ is an antiderivative for $f$ we can put $h(t)=tg(t)$. Hence $\int_a^{b} \frac {f(t)} t\, dt= g(b)-g(a)+\int_a^{b} \frac {g(t)} t\, dt$. 
Now $\int_{Ta}^{Tb} \frac {f(t)} t\, dt= g(Tb)-g(Ta)+\int_{Ta}^{Tb} \frac {g(t)} t\, dt$. Use squeeze theorem to show that the limit of the last term is same as limit of $\int_{Ta}^{Tb} \frac {B} t\, dt$ which is limit of $B(\log\, (Tb)-\log\, (Tb))=B\log \, (\frac b a)$.
