Wintner's mean value theorem This is an exercise (exercise 2.22 p80) from A.J. Hildebrand's Introduction to analytic number theory (an online lecture notes).
Let $g$ be an arithmetic function, and let $f=1*g$ (i.e.,$f(n)=\sum_{d\mid n}g(d)$. Show that if the series $\sum_{n=1}^\infty \frac{g(n)}{n}$ converges and, in addition,
$$\limsup_{x\to\infty}\frac{1}{x}\sum_{n\leq x}|g(n)|<\infty.$$
Then $f$ has a mean value given by 
$$M(f)=\lim_{x\to\infty}\frac{1}{x}\sum_{n\leq x}f(n)=\sum_{n=1}^\infty\frac{g(n)}{n}.$$
By the definition of $f$, we have
\begin{align}\frac{1}{x}\sum_{n\leq x} f(n)&=\frac{1}{x}\sum_{n\leq x}\sum_{d\mid n} g(d)
=\frac{1}{x}\sum_{d\leq x}g(d)\sum_{n\leq x:d\mid n}1\\
&=\frac{1}{x}\sum_{d\leq x}g(d)\left\lfloor \frac{x}{d}\right\rfloor
=\frac{1}{x}\sum_{d\leq x}g(d)(\frac{x}{d}+O(1))\\
&=\sum_{d\leq x}\frac{g(d)}{d}+\frac{1}{x}\sum_{d\leq x}O(g(d)).
\end{align}
I'm stuck here, I don't know how to use the hypothesis that $\limsup_{x\to\infty}\frac{1}{x}\sum_{n\leq x}|g(n)|<\infty$, please help me.
 A: Following your calculations, we have $$\frac{1}{x}\sum_{n\leq x}f\left(n\right)=\sum_{d\leq x}\frac{g\left(d\right)}{d}-\frac{1}{x}\sum_{d\leq x}g\left(d\right)\left\{ \frac{x}{d}\right\} 
 $$ where $\left\{ t\right\} 
 $ is the fractional part of $t$. Now we fix $y<x
 $ and we consider $$\sum_{y<d\leq x}g\left(d\right)\left\{ \frac{x}{d}\right\} .$$ Using summation by parts we have $$
\begin{align}
\sum_{y<d\leq x}g\left(d\right)\left\{ \frac{x}{d}\right\}= & \sum_{d\leq x}g\left(d\right)\left\{ \frac{x}{x}\right\} -\sum_{d\leq y}g\left(d\right)\left\{ \frac{x}{y}\right\}\\ - & \sum_{y<d\leq x-1}\left(\sum_{k\leq d}g\left(k\right)\right)\left(\left\{ \frac{x}{d+1}\right\} -\left\{ \frac{x}{d}\right\} \right)
\end{align} 
$$ and so $$\left|\sum_{y<d\leq x}g\left(d\right)\left\{ \frac{x}{d}\right\} \right|\leq\left|\sum_{d\leq y}g\left(d\right)\right|+\max_{y<d\leq x-1}\left|\sum_{k\leq d}g\left(k\right)\right|\sum_{y<d\leq x-1}\left|\left\{ \frac{x}{d+1}\right\} -\left\{ \frac{x}{d}\right\} \right|.
 $$ Now define $$A_{1}=\left\{ y<d\leq x:\,\left\lfloor \frac{x}{d+1}\right\rfloor =\left\lfloor \frac{x}{d}\right\rfloor \right\} 
 $$ and $$A_{2}=\left\{ y<d\leq x:\,\left\lfloor \frac{x}{d+1}\right\rfloor \neq\left\lfloor \frac{x}{d}\right\rfloor \right\} .
 $$ If $d\in A_{1}
 $ we have $$\sum_{d\in A_{1}}\left|\left\{ \frac{x}{d+1}\right\} -\left\{ \frac{x}{d}\right\} \right|=\sum_{d\in A_{1}}\left|\frac{x}{d+1}-\frac{x}{d}\right|\leq x\sum_{d>y}\frac{1}{d\left(d+1\right)}=\frac{x}{y}
 $$ and if $d\in A_{2}
 $, using the bounds $$1\leq\left\lfloor \frac{x}{d+1}\right\rfloor <\left\lfloor \frac{x}{d}\right\rfloor \leq\frac{x}{y}
 $$ we can conclude that there are at most $x/y$ elements in $A_{2}
 $ and so $$\sum_{d\in A_{2}}\left|\left\{ \frac{x}{d+1}\right\} -\left\{ \frac{x}{d}\right\} \right|\leq2\frac{x}{y}.
 $$ Finally we have, using the hypothesis, $$\left|\sum_{d\leq x}g\left(d\right)\left\{ \frac{x}{d}\right\} \right|\leq\sum_{d\leq y}\left|g\left(d\right)\right|+\left|\sum_{d\leq y}g\left(d\right)\right|+3\frac{x}{y}\max_{y<d\leq x-1}\left|\sum_{k\leq d}g\left(k\right)\right|
 $$ $$\leq Cy+\left|\sum_{d\leq y}g\left(d\right)\right|+3\frac{x}{y}\max_{y<d\leq x-1}\left|\sum_{k\leq d}g\left(k\right)\right|
 $$ for some $C>0$ and now we can fix $\epsilon>0
 $ and choose $y=\epsilon x
 $. Since $\sum_{n\geq1}g\left(n\right)/n<\infty$ we have from Kronecker's lemma that $$\frac{1}{x}\left|\sum_{d\leq x}g\left(d\right)\right|\rightarrow0
 $$ and so if we take a sufficient large $x
 $ we can assume that $$\max_{y<d\leq x-1}\left|\sum_{k\leq d}g\left(k\right)\right|\leq\epsilon^{2}x
 $$ and $$\left|\sum_{d\leq y}g\left(d\right)\right|\leq y.
 $$ Finally $$\frac{1}{x}\left|\sum_{d\leq x}g\left(d\right)\left\{ \frac{x}{d}\right\} \right|\leq\epsilon\left(C+4\right)
 $$ and so the claim.
