Poisson Integral is equal to 1 
Show 
  $$
\int_{-\pi}^{\pi}P(r, \theta)d\theta = 1
$$


Let $\alpha(r) = \frac{r^2 - 1}{2r}$ and $\gamma(r) = -\big(\frac{r^2 + 1}{2r}\big)$.
  Then
  $$
    \frac{1}{2\pi}
    \int_{-\pi}^{\pi}\frac{1 - r^2}{1 - 2r\cos(\theta) + r^2}d\theta
    = \frac{\alpha}{2\pi}
       \int_{-\pi}^{\pi}\frac{1}{\cos(\theta) + \gamma}d\theta
$$
where
    $$
    \frac{r^2 - 1}{2r}\frac{1}{\cos(\theta) - \frac{1}{2r} - \frac{r^2}{2r}} = \frac{1 - r^2}{1 - 2r\cos(\theta) + r^2}
    $$
Next, let $z = e^{i\theta}$. Then $d\theta = \frac{-i}{z}dz$. Since $\cos(\theta) = \frac{e^{i\theta} + e^{-i\theta}}{2}$, $\cos(\theta) = \frac{z + z^{-1}}{2}$.
$$
    = \frac{-i\alpha}{\pi}\int_C\frac{1}{z^2 + 2z\gamma + 1}dz
$$
and $C$ is the contour oriented counter clockwise with simple poles at $z = -\gamma\pm\sqrt{\gamma^2 - 1}$. Let $f(z) = \frac{1}{z^2 + 2z\gamma + 1}$. Then
$$
    = \Big(\frac{-i\alpha}{\pi}\Big)2\pi i\sum\text{Res}_{z = z_j}f(z)
       \tag{1}
$$
The only pole in $\lvert z\rvert < 1$ is $z_j = -\gamma + \sqrt{\gamma^2 - 1}$.
  Then
  $$
  2\pi i\lim_{z\to z_j}\Bigg[\big(z + \gamma - \sqrt{\gamma^2 - 1}\big)
  \frac{1}{\big(z_j + \gamma + \sqrt{\gamma^2 - 1}\big)
    \big(z + \gamma - \sqrt{\gamma^2 - 1}\big)}\Bigg] =
  \frac{\pi i}{\sqrt{\gamma^2 - 1}}
  $$
Now, we can substitute $\frac{\pi i}{\sqrt{\gamma^2 - 1}}$ for $2\pi i\sum\text{Res}$ in equation (1).
  \begin{align*}
    \Big(\frac{-i\alpha}{\pi}\Big)2\pi i\sum\text{Res}_{z = z_j}f(z)
    &= \frac{\alpha}{\sqrt{\gamma^2 - 1}}\\
    &= \frac{r^2 - 1}{2r\sqrt{\frac{(r^2 + 1)^2}{4r^2} - 1}}\\
    &= \frac{r^2 - 1}{\sqrt{(r^2 + 1)^2 - 4r^2}}\\
    &= \frac{r^2 - 1}{\sqrt{r^4 - 2r^2 + 1}}\\
    &= \frac{(r - 1)(1 + r)}{(r - 1)(r + 1)}\\
    &= 1
  \end{align*}


I have been unable to convince myself that the only pole in $\lvert z\rvert < 1$ is $z_j = -\gamma + \sqrt{\gamma^2 - 1}$.  I know it is the case because if I use the other pole, the integral becomes $-1$

 A: For $\boldsymbol{r\in(-1,1)}$
$$
\begin{align}
1
&=\frac1{2\pi i}\oint\frac1{z-r}\mathrm{d}z\tag{1}\\
&=\frac1{2\pi i}\int_{-\pi}^\pi\frac1{e^{i\theta}-r}\mathrm{d}e^{i\theta}\tag{2}\\
&=\frac1{2\pi}\int_{-\pi}^\pi\frac{1-re^{i\theta}}{1-2r\cos(\theta)+r^2}\mathrm{d}\theta\tag{3}\\
&=\frac1{2\pi}\int_{-\pi}^\pi\frac{1-r\cos(\theta)}{1-2r\cos(\theta)+r^2}\mathrm{d}\theta\tag{4}\\
&=\frac12+\frac1{2\pi}\int_{-\pi}^\pi\frac{\frac12-\frac12r^2}{1-2r\cos(\theta)+r^2}\mathrm{d}\theta\tag{5}\\
1
&=\frac1{2\pi}\int_{-\pi}^\pi\frac{1-r^2}{1-2r\cos(\theta)+r^2}\mathrm{d}\theta\tag{6}
\end{align}
$$
Explanation:
$(1)$: $\frac1{z-r}$ has residue $1$ at $z=r$ (inside the unit circle)
$(2)$: parametrize the unit circle
$(3)$: multiply integrand by $\frac{e^{-i\theta}-r}{e^{-i\theta}-r}$
$(4)$: take the real part of both sides
$(5)$: add $\frac12$ to and subtract $\frac12$ from the integral
$(6)$: multiply both sides by $2$ and subtract $1$

For $\boldsymbol{r\not\in(-1,1)}$
If $r^2=1$, the integrand is $0$, so assume $r\not\in[-1,1]$.
If $r\not\in[-1,1]$, then the left side of $(1)$ starts at $0$ and step $(6)$ changes the left side to $-1$.
Alternatively, if $r\not\in[-1,1]$, then $\frac1r\in(-1,1)$, and therefore, $(6)$ says
$$
\begin{align}
\frac1{2\pi}\int_{-\pi}^\pi\frac{1-r^2}{1-2r\cos(\theta)+r^2}\mathrm{d}\theta
&=\frac1{2\pi}\int_{-\pi}^\pi\frac{\frac1{r^2}-1}{\frac1{r^2}-\frac2r\cos(\theta)+1}\mathrm{d}\theta\\
&=-\frac1{2\pi}\int_{-\pi}^\pi\frac{1-\frac1{r^2}}{1-\frac2r\cos(\theta)+\frac1{r^2}}\mathrm{d}\theta\\
&=-1\tag{7}
\end{align}
$$
A: For $0 \le r < 1$,
$$
\begin{align}
\sum_{n=-\infty}^{\infty}r^{|n|}e^{in\theta}
    & =\sum_{n=0}^{\infty}r^{n}e^{in\theta}+\sum_{n=1}^{\infty}r^{n}e^{-in\theta} \\
    & =\frac{1}{1-re^{i\theta}}+\left(\frac{1}{1-re^{-i\theta}}-1\right) \\
    & = \frac{1}{1-re^{i\theta}}+\frac{re^{-i\theta}}{1-re^{-i\theta}} \\
    & = \frac{1-re^{-i\theta}+re^{-i\theta}-r^{2}}{(1-re^{i\theta})(1-re^{-i\theta})} \\
    & = \frac{1-r^{2}}{1-2r\cos\theta+r^{2}}.
\end{align}
$$
Therefore, because $\int_{-\pi}^{\pi}e^{in\theta}\,d\theta=0$ for $n \ne 0$, the following holds for $0 \le r < 1$:
$$
    \int_{-\pi}^{\pi}\frac{1-r^{2}}{1-2r\cos\theta+r^{2}}\,d\theta= \sum_{n=-\infty}^{\infty}r^{|n|}\int_{-\pi}^{\pi}e^{in\theta}\,d\theta = \int_{-\pi}^{\pi}d\theta=2\pi.
$$
A: Let $z_+ = -\gamma + \sqrt{\gamma^2 - 1}$ and $z_- = -\gamma - \sqrt{\gamma^2 - 1}$.  Then 
\begin{align}
z_+ &= \frac{r^2 + 1}{2r} + \sqrt{\frac{r^4 + 2r + 1 - 4r^2}{4r^2}}\\
&= \frac{r^2 + 1}{2r} + \frac{r^2 - 1}{2r}\\
&= \frac{2r^2}{2r}\\
&= r\\
z_- &= \frac{r^2 + 1}{2r} - \sqrt{\frac{r^4 + 2r + 1 - 4r^2}{4r^2}}\\
&= \frac{r^2 + 1}{2r} - \frac{r^2 - 1}{2r}\\
&= \frac{2}{2r}\\
&= \frac{1}{r}
\end{align}
So for $0<r<1$, only $z_+$ is in the unit circle.
A: From your definition, $\gamma = -\frac{r^2+1}{2r}$ so $-\gamma>1$ for all positive $r$.  So $-\gamma+\sqrt{\gamma^2-1}>-\gamma>1$ so that root cannot possibly lie in $|z|<1$.  Are you sure you do not have a sign error somewhere between lines 3 and 4 of your derivation?
