# Arguments/phases due to branch cut for following keyhole contour integral?

I was given the a contour integral problem which I am rather unsure about.

First, I was asked to classify the singularities and required branch cuts for

$$f(z)=\frac{1}{z^3}\log[(1-z)]^2.$$

I know that $z=0$ is a pole of order 3, and $z=1$ is a branch point, and thus for the keyhole contour, I need to perform a branch cut of $[1,\infty)$. I also know that the residue at $z=0$ is $1$, which I obtained using a Laurent expansion.

What confuses me is the required phases $e^{i\phi}$ necessary to obtain the integral

$$\int_{1}^{\infty} \frac{\ln(x-1)}{x^3} {\text{d}}x$$

from the contour integral

$$\oint_{\Gamma} f(z){\text{ d}}z,$$

where $\Gamma$ is the keyhole contour.

I know that for normal keyhole contour integrals with positive axis branch cut, for the straight portion of the contour approaching from $x=\infty$ to $x=1$, I need to include a phase of $e^{2i\pi}$. However, I also noticed that the function inside the logarithm is $x-1$ instead of $1-x$, so I suspect I need to include a phase $e^{i\pi}$ representing the minus one somewhere. I am confused as to how to account for them, the signs of the phase for the straight portions of the contour, and where I should even be placing them in the first place. All help is appreciated, thank you!

You'll have 3 integrals for your keyhole contour (I've gone CCW around the point $z=1$), $\int_{\infty}^1 f + \int_{|z-1|=\delta} f + \int_1^{\infty} f$.
The natural logarithm has its usual branch cut along the $-\Re$ axis. The argument (angle) of whatever the natural log is taken of (here, $1-z$) therefore has to stay in the branch: $-\pi < \arg(1-z) \le \pi$.
A point $z$ on the first contour ($\int_{\infty}^1$, running just above the $+\Re$ axis), maps to a $1-z$ in the 3rd quadrant (just below or in the $-\Im$ direction of the $-\Re$ axis--ie an argument of $-\pi+\epsilon$). To allow integration of the logarithm, we'd like this value of $1-z$ to be put in $re^{i\theta}$ form. For the angle $\theta$, it should be easy to see it's $-\pi+\epsilon$. For the modulus, we get $x-1$, where $x=\Re(z)$. This gives $(x-1)e^{-i(\pi-\epsilon)}$ for this first contour (where note we've been careful to keep the angle within the stated branch). Similar reasoning gives $(x-1)e^{i(\pi-\epsilon)}$ for the third contour (epsilon arbitrary). Hope this helps.