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 
 A: For (i), 
$$
g(x)=\frac1x\int_1^xf(t)dt
$$
$$
xg(x)=\int_1^xf(t)dt
$$
Take derivative with respect to $x$ on both sides,
$$
x\frac{dg(x)}{dx}+g(x)=f(x)
$$
Put value of $f(x)$ to get,
$$
\int_a^b\frac{f(x)}{x}dx=\int_a^b\frac{dg(x)}{dx}dx+\int_a^b\frac{g(x)}{x}dx
$$
$$
=\int_a^bdg(x)+\int_a^b\frac{g(x)}{x}dx
$$
$$
=[g(x)]_a^b+\int_a^b\frac{g(x)}{x}dx
$$
$$
=g(b)-g(a)+\int_a^b\frac{g(x)}{x}dx
$$
For (ii),
$$
\lim_{T\to \infty}\int_{Ta}^{Tb}\frac{f(x)}{x}dx=\lim_{T\to \infty}\left(g(Tb)-g(Ta)+\int_{Ta}^{Tb}\frac{g(x)}{x}dx \right)
$$
$$
=\lim_{T\to \infty}g(Tb)-\lim_{T\to \infty}g(Ta)+\lim_{T\to \infty}\left(\int_{Ta}^{Tb}\frac{g(x)}{x}dx \right)
$$
$$
=\lim_{T\to \infty}\left(\int_{Ta}^{Tb}\frac{g(x)}{x}dx \right)
$$
Put $z=\frac{x}{T}$ so, $dz=\frac{dx}{T}$,
$$
=\lim_{T\to \infty}\left(\int_a^b\frac{g(Tz)}{Tz}Tdz \right)
$$
$$
=\int_a^b\lim_{T\to \infty}\left(\frac{g(Tz)}{z}dz \right)
$$
$$
=\int_a^b\lim_{T\to \infty}g(Tz)\lim_{T\to \infty}\left(\frac{dz}{z} \right)
$$
But $\lim_{T\to \infty}g(Tz)=B$ and $\lim_{T\to \infty}\left(\frac{dz}{z} \right)=\left(\frac{dz}{z} \right)$
$$ 
=B\int_a^b\frac{dz}{z}
$$
$$
=Blog \left(\frac{b}{a} \right)
$$
A: 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)$.
A: For (i), let $F(x) = \int_1^xf(t)\,dt$, so $F'(x)  = f(x)$ by the fundamental theorem of calculus. Then our integration by parts looks like
$$
\int_a^b\frac{f(x)}{x}\,dx = \bigg[\frac{F(x)}{x}\bigg]_a^b + \int_a^b \frac{F(x)}{x^2}\,dx.
$$
For (ii), using our result from part (i),
$$
\int_{Ta}^{Tb}\frac{f(x)}{x}\,dx = \bigg[\frac{F(x)}{x}\bigg]_{Ta}^{Tb} + \int_{Ta}^{Tb} \frac{F(x)}{x^2}\,dx = \big[g(x)\big]_{Ta}^{Tb} + \int_{Ta}^{Tb} \frac{g(x)}{x}\,dx
$$
For sufficiently large $T$, show that the first term can be made arbitrarily small, and the second term is approximately $\int_{Ta}^{Tb}B/x\,dx = B\ln(b/a)$.
