The task is, considering the following function and contour, to proove that this is the value of the integral. (see the picture)
I managed to show that the integral along two circles vanishes, and that the residue of the pole $z=0$ is equal to $1$.
I ended up with the following expression:
$\int_{1}^{\infty} \frac{log^2(x-1)}{x^3} dx + \int_{\infty}^{1} \frac{log^2((x-1)e^{i2\pi})}{x^3} dx = 2\pi i$
Where $e^{2\pi i}$ is due to the orientation of the branch cut that goes from $1$ to $\infty$.
Now when I expand this I get:
$-4\pi i \int_{0}^{\infty} \frac{log(x-1)}{x^3} dx+4\pi^2\int_{0}^{\infty} \frac{1}{x^3} dx=2\pi i$
Obviously I get the right answer by matching the imaginary part, however I am left with non-zero real part...