I am trying to compute the the following principal value integral,
$$
J = \text{P.V.}\int_0^\infty \frac{z^3 F(z)}{z-1}
$$
where $F(z)$ is a real arbitrary function which is well-behaved (no singularities, decays fast enough for $\vert z\vert \to \infty$, finite at $z = 0$). The way I solve this is by considering the alternative integral
$$
J'=\int_0^\infty \frac{z^3 F(z)}{z-1} \ln(z)
$$
where the branch cut of the logarithm is taken on the positive real axis. My integration contour is shown in the picture. If I did things correctly, the integrations around $C_\epsilon$ and $C_R$ vanish. Moreover,
$$
\int_{\Gamma_1+\Gamma_2} \frac{z^3 F(z)}{z-1} \ln(z) \to \text{P.V.} \int_0^\infty \frac{z^3 F(z)}{z-1} \ln(z)
$$
and
$$
\int_{\Gamma_3+\Gamma_4} \frac{z^3 F(z)}{z-1} \ln(z) \to -\text{P.V.} \int_0^\infty \frac{z^3 F(z)}{z-1} \ln(z) - 2\pi i J
$$
Since the integrand of $J'$ has no singularities within my contour I can write
$$
2\pi i J = \left(\int_{C\epsilon2} + \int_{C\epsilon3}\right)dz \frac{z^3 F(z)}{z-1} \ln(z).
$$
These two integrals can be evaluated using the residue theorem,
$$
\int_{C\epsilon2}dz \frac{z^3 F(z)}{z-1}\ln(z) = -i\pi\ln(1)F(1) = 0
$$
and
$$
\int_{C\epsilon3}dz \frac{z^3 F(z)}{z-1}\ln(z) = -i\pi(\ln(1)+2i\pi)F(1) = 2\pi^2 F(1)
$$
Putting all together I obtain
$$
J = -i\pi F(1)
$$
which is imaginary even though my original integral was real. I cannot figure out what I'm doing wrong. Can anybody help me with this?
EDIT: I might have figured it out. The fact that the pole lies right on the branch cut was suspicious, so what I did was to write $$ J = \text{P.V.}\int_0^\infty \frac{z^3 F(z)}{z-1} = \text{P.V.}\int_{-\infty}^\infty \frac{z^3 F(z)}{z-1} - \text{P.V.}\int_0^\infty \frac{z^3 F(-z)}{z+1} \equiv I_1 - I_2 $$ The integral $I_1$ I can compute using the combination of four contours, $\Gamma_1 = [-\infty,1-\epsilon)$, $C(\theta)=1+\epsilon e^{i\theta} \text{ with } \theta\in[\pi,0]$, $\Gamma_2= [1+\epsilon,\infty]$, and $C_R(\theta) = Re^{i\theta} \text{ with } \theta\in[0,\pi]$. This yields half the contribution of the pole, $$ I_1 = i\pi F(1). $$ For the second integral $I_2$ I can now apply the logarithm trick since the pole is at $z=-1$ and thus not on the branch cut. The integrals over the circular contours at $\vert z\vert\to \infty$ and at $z\to 0$ vanish and I obtain $$ -2\pi i I_2 = 2\pi i \text{Res}\left[\frac{z^3 F(-z)}{z+1}\right]_{z=-1} = 2\pi^2 F(1) $$ or equivalently $I_2 = i\pi F(1)$. Putting everything together I obtain $$ J=I_1-I_2=0. $$ I am a bit surprised that the result is zero for an arbitrary function $F(z)$, so I would still be grateful if someone can help check my solution. Thanks in advance!