The task is, considering the following function and contour, to proove that this is the value of the integral. (see the picture)

[Click here to see the problem](https://i.stack.imgur.com/T22C3.jpg)

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...