I was trying to show $\sum_{n \le x} \frac{d(n)}{n} = \frac{1}{2}\log(x)^2 + 2\gamma \log(x) + O(1)$ where $d(n)$ is the number of divisors of $n$ and $\gamma$ is the Euler constant using the identity $\sum_{n \le x}(f * g)(n) = \sum_{n \le x} f(n) G\left(\frac{x}{n}\right)$ where $G(x) = \sum_{n \le x} g(x)$.
Edit I was using the wrong $f$,$g$ before. Here it is with different $f$,$g$.
For $f(n) = \frac{1}{n}$ and $g(n) = \frac{1}{n}$ this gives $\sum_{n \le x}\frac{d(n)}{n} = \sum_{a \le x} \sum_{b \le x/a}\frac{1}{ab}=\sum_{a \le x}\frac{1}{a}\left(\log(x/n) + \gamma + O(\frac{n}{x})\right)$ since $G(x) = \sum_{n \le x} \frac{1}{n} = \log(x) + \gamma + O(\frac{1}{x})$ by Euler's summation formula. Then apply Euler's summation formula again to get $- \frac{1}{2} \log(x/a)^2 + \gamma \log(x) + O(x^2)$ but this is still wrong.
I can't see at all what I am doing wrong here so it's probably really simple, I would really appreciate if someone could show how to do this or what I've done wrong. Thanks a lot.