<s>[INST] 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$

 [/INST] 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.
$$
</s>