On Exercise 2.5.10 in Ram. M. Murty's book, "Problems in Analytic Number Theory." I have just been told about this result, available as Exercise 2.5.10 in Ram. M. Murty's book, "Problems in Analytic Number Theory (2nd edition)". It says:
Let $\alpha>0$. Suppose $a_n \ll n^{\alpha}$ and $A(x) \ll x ^{\delta} $ for some $\delta<1$, where $A(x) = \sum_{n\leq x} a_n$. Define $b_n  = \sum_{d|n} a_d$. Then one has 
$$\sum_{n\leq x} b_n = cx + O\Big(x^{(1-\delta)(1+\alpha)/(2-\delta)}\Big)$$ for some constant $c$.
Does anyone know who first came up with this result, or maybe it's just too straightforward to be attributed to anyone ?
The reason why i'm particularly interested in knowing the originator of this result is that, Murty's proof (which is on pages 262-263 of the aforementioned book) doesn't look quite right to me (but of course, i may be mistaken).
 A: It seems there is a typo in the application of the hyperbola method. Since $b_n=\sum_{d\mid n}a_d$, we have
\begin{align}
\sum_{n\le x}b_n &=\sum_{n\le x}\sum_{de=n}a_d=\sum_{de\le x}a_d\\
 &=\sum_{\substack{de\le x\\ d\le y}}a_d+\sum_{\substack{de\le x\\ e\le x/y}}a_d-\sum_{de\le x\\ d\le y, e\le x/y}a_d.
\end{align}
If $A(x)=\sum_{n\le x}a_n$, then this can be written as
\begin{align}
\sum_{d\le y}a_d\left[\frac{x}{d}\right]+\sum_{e\le x/y}A\left(\frac{x}{e}\right)-A(y)\left[\frac{x}{y}\right].
\end{align}
The author's assumption that $A(x)\ll x^{\delta}$ then gives the last two terms as $O(xy^{\delta-1})$, and the proof can be continued in the usual manner outlined in the text. Although, it appears that a sign was missed later on as well, which has some bearing on the final stated error (see Conrad's answer below).
A: The computation of the powers is wrong and the result stated in the book is incorrect and it should be $cx+ O(x^{(1+\delta-\delta^2)/(2-\delta)})+O(x^{\frac{(1-\delta)(1+\alpha)}{2-\delta}})$
If $y=x^{(1-\delta)/(2-\delta)}$, $y^{\delta-1}=x^{-(1-\delta)^2/(2-\delta)}$, so $xy^{\delta-1}=x^{(1+\delta-\delta^2)/(2-\delta)}$ and it is not true that $\frac{1+\delta-\delta^2}{2-\delta} \le \frac{(1-\delta)(1+\alpha)}{2-\delta}$ in general, only for $\alpha \ge \delta + \frac{\delta}{1-\delta}$
Note that as stated, the result doesn't make sense because one can always increase $\delta$ in the hypothesis, while keeping $\alpha$ fixed, so in particular if $A(x) << x^{\delta}$ for a given $\delta < 1$, then $A(x) <<_{\epsilon} x^{1-\epsilon}$ for arbitrary $\epsilon >0$, hence we would get that $B(x) =cx + O_\epsilon(x^{\epsilon})$ under very general conditions and I am sure lots of counterxamples to that can be found
