pole on the contour using the residu theorem, what is this formula of Plemelj? I've tried solving the following problem but I get stuck at the very end...

$f(z)$ is defined as $$f(z)=\frac{1}{(z-\alpha)^2(z-1)}$$ with $\alpha \in \mathbb{C}$ and $\operatorname{Im}(\alpha) > 0$.
Calculate $$P.V. \int_{-\infty}^{+\infty} \frac{\operatorname d x}{(x-\alpha)^2(x-1)} = \int_{-\infty}^{+\infty} \frac{\operatorname d x}{(x-\alpha)^2(x-1)}$$

I'm using the following contour. I've calculated the residues and proven that $\int_{\Gamma_1}f(z) \operatorname d z \to 0$.

Here are the residues:
$$\operatorname{res}(f, 1) = \frac{1}{(1-\alpha)^2} \qquad \operatorname{res}(f, \alpha) = \frac{-1}{1-\alpha)^2}$$
But then there is a little problem. The solutions manual states ...using the formula of Plemelj $P.V. \int_\Gamma f(z) \operatorname d z = \frac{-i\pi}{(1-\alpha)^2}$.
Whereas I would state according to the residue theorem: $$P.V. \int_\Gamma f(z) \operatorname d z = 2\pi i \left(\frac{1}{(1-\alpha)^2}+\frac{-1}{(1-\alpha)^2}\right) = 0 $$
I guess I can't use the residue theorem since a pole is located on the contour itself, but I can't seem to find any information on that formula of Plemelj...
 A: To compute the principal value, use the usual semicircular contour $C$ in the upper half plane of radius $R$, but with a small, semicircular detour of radius $\epsilon$ into the upper half plane about the pole at $z=1$.  What we get is
$$\oint_C \frac{dz}{(z-\alpha)^2 (z-1)}  = \int_{-R}^{1-\epsilon} \frac{dx}{(x-\alpha)^2 (x-1)} + i \epsilon \int_{\pi}^0 d\phi \, \frac{e^{i \phi}}{(1+\epsilon e^{i \phi}-\alpha)^2 \epsilon e^{i \phi}} \\ +\int_{1+\epsilon}^R \frac{dx}{(x-\alpha)^2 (x-1)}  + i R \int_0^{\pi} d\theta \frac{e^{i \theta}}{(R e^{i \theta}-\alpha)^2 (R e^{i \theta}-1)}$$
Take the limits as $R \to \infty$ and $\epsilon \to 0$.  The fourth integral vanishes as $\pi/R^2$, but the second integral remains finite.  Thus,
$$\oint_C \frac{dz}{(z-\alpha)^2 (z-1)}  = PV \int_{-\infty}^{\infty} \frac{dx}{(x-\alpha)^2 (x-1)} - i \frac{\pi}{(1-\alpha)^2} $$
The contour integral is also equal to $i 2 \pi$ times the residue at the double pole $z=\alpha$, which by definition is inside $C$. Equating this to the RHS of the above equation, we may now determine our principal value:
$$PV \int_{-\infty}^{\infty} \frac{dx}{(x-\alpha)^2 (x-1)}  = i \frac{\pi}{(1-\alpha)^2} - i 2 \pi \frac1{(\alpha-1)^2} = -i \frac{\pi}{(\alpha-1)^2}$$
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,{\rm Li}_{#1}}
 \newcommand{\norm}[1]{\left\vert\left\vert\, #1\,\right\vert\right\vert}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
$\ds{\alpha \in {\mathbb C}\,,\quad\Im\pars{\alpha} > 0}$
\begin{align}&\bbox[#ffd,5px]{%
\,{\rm P.V.}\int_{-\infty}^{\infty}{\dd x \over \pars{x -\alpha}^{2}\pars{x - 1}}}
\\[5mm] = &\
\int_{-\infty}^{\infty}
{1 \over \pars{x -\alpha}^{2}}\bracks{%
{1 \over x - 1 - \ic 0^{+}} -\ic\pi\,\delta\pars{x - 1}}\,\dd x
\\[5mm]&=\underbrace{\int_{-\infty}^{\infty}
{\dd x \over \pars{x -\alpha}^{2}\pars{x - 1 - \ic 0^{+}}}}
_{\ds{=\ \dsc{0}}}\ -\
\ic\pi\int_{-\infty}^{\infty}{\delta\pars{x - 1} \over \pars{x -\alpha}^{2}}\,\dd x
\\[5mm] = &\
\bbox[10px,border:1px groove navy]{-\,{\ic\pi \over \pars{1 - \alpha}^{2}}} \\ &
\end{align}

The first integral vanishes out because their poles
$\ds{\pars{~\alpha\ \mbox{and}\ 1 + \ic 0^{+}~}}$ are in the upper complex plane:
It means we can evaluate the integral by 'closing' a contour in the lower complex plane where the integral doesn't have any pole.
A: Sorry for not using contour integrals but why not simply calculate the integral on the real axis and apply the definition of Cauchy's principal value (https://en.wikipedia.org/wiki/Cauchy_principal_value) as the symmetric limit about the point $z=1$?
Here we go
Let $0<\epsilon<<1$ and decompose the integral $i$ into two parts $i_1$ and $i_2$ excluding the point $z=1$:
$$i_1(\epsilon) = \int_{-\infty}^{1-\epsilon}\frac{1}{(z-\alpha)^2(z-1)}\,dz $$
$$i_2(\epsilon) = \int_{1+\epsilon}^{\infty}\frac{1}{(z-\alpha)^2(z-1)}\,dz $$
Then with
$$i(\epsilon) = i_1(\epsilon)+i_2(\epsilon)$$
the principal value of the integral is given by
$$i = P.V.\int_{-\infty}^{\infty}\frac{1}{(z-\alpha)^2(z-1)}\,dz =\lim_{\epsilon \to 0} \, i(\epsilon )$$
For $\Im(a)>0$ he integrals are elementary with the results
$$i_1=\frac{(\alpha +\epsilon -1) \log (\epsilon )-(\alpha +\epsilon -1) \log (\alpha +\epsilon -1)+\alpha -1}{(\alpha -1)^2 (\alpha +\epsilon -1)}$$
$$i_2=\frac{(-\alpha +\epsilon +1) \log (\epsilon )+(\alpha -\epsilon -1) \log (-\alpha +\epsilon +1)-\alpha +1}{(\alpha -1)^2 (\alpha -\epsilon -1)}$$
so that we get, after some simplifications
$$i = \lim_{\epsilon \to 0} \, i(\epsilon ) = \frac{\log (1-\alpha)-\log (-1+\alpha )}{(\alpha -1)^2}$$
But now 
$$\log(-1+\alpha) = \log((-1)(1-\alpha)) = \log(-1) +\log(1-\alpha)$$ 
so that 
$$i=\frac{-\log(-1)}{(\alpha-1)^2}=\frac{- i \pi}{(\alpha-1)^2}\tag{*}$$
For a check I have let Mathematica calculate the original integral with PrincipalValue->True and found $(*)$.
Discussion


*

*It was already mentioned (by Daniel Fisher) that we obtain the same result when we split the pole on the real axis into two poles with half the residue each, one shifted by an amount $\epsilon>0$ above and the other one by an amount $\epsilon$ below the real axis. As there are now no poles on the real axis we can complete the contour on the real axis and obtain


$$\int_{-\infty }^{\infty } \frac{\frac{1}{2 (z-i \epsilon -1)}+\frac{1}{2 (z+i \epsilon -1)}}{(z-\alpha)^2} \, dz \\= \int_{-\infty }^{\infty } \frac{z-1}{(z-1)^2+\epsilon^2}\frac{1}{(z-\alpha)^2} \, dz\\=\frac{-i \pi }{(\alpha+i \epsilon -1)^2}\text{sign}(\Im(\alpha))\to \frac{-i \pi }{(\alpha -1)^2}\text{sign}(\Im(\alpha))$$
which generalizes $(*)$ to $\Im(\alpha)<0$.


*If we would take an asymmetric limit, say $i= \lim_{\epsilon \to 0} \, (i_1(\epsilon )+i_2(\gamma\epsilon))$ we would obtain


$$i_{asym}= -\frac{\log (\gamma )+i \pi }{(\alpha -1)^2}$$ 
we also obtain a finite result but this depends on an arbitrary parameter $\gamma$. 
