Find an asymptotic formula for $\sum\limits_{n\leq x} d(n)\log n$ Please help me to find the asymptotics for the sum described above: 
$$\sum\limits_{n\leq x} d(n)\log n.$$
This is a problem in analytic number theory.

First note that:
$$2\sum_{d\mid n}\log(d)=\sum_{d\mid n}\log(d)+\sum_{d\mid n}\log(\frac{n}{d})=\sum_{d\mid n}\log(n)=d(n)\log(n)$$
Then by the Dirichlet hyperbola method:
$$\sum_{n\leq x}d(n)\log(n)=-2\lfloor{\sqrt{x}}\rfloor\log(\lfloor{\sqrt{x}}\rfloor!)+2\sum_{n\leq \sqrt{x}}\log(n)\lfloor{\frac{x}{n}}\rfloor+\log(\lfloor{\frac{x}{n}}\rfloor!)$$
$$=O(\sqrt{x}\log(x))+2x-x\log(x)+2\sum_{n\leq \sqrt{x}}\frac{x}{n}\log(n)+
\frac{x}{n}\log(\frac{x}{n})-\frac{x}{n}$$
$$=O(\sqrt{x}\log(x))+2x-x\log(x)+2x(\log(x)-1)\sum_{n\leq \sqrt{x}}
\frac{1}{n}$$
$$=O(\sqrt{x}\log(x))+2x-x\log(x)+2x(\log(x)-1)\big(\frac{\log(x)}{2}+\gamma+O(\frac{1}{\sqrt{x}})\big)$$
Thus we have:
$$\sum_{n\leq x}d(n)\log(n)=x\log(x)^2-2(1-\gamma)x\log(x)+2(1-\gamma)x+O(\sqrt{x}\log(x))$$
