Suppose $0<r<R$. Find $\int_0^{2\pi}\dfrac{R\cos t}{R^2 - 2Rr\cos t + r^2}dt$ using a contour integral.
(Note: I've been able to solve similar problems, and I understand the concepts, but I can't figure out how to solve this one in particular. Any help is appreciated.)
Using the Poisson Kernel, we have that \begin{align} u(a+re^{i\theta})= \frac{1}{2\pi}\int^{\pi}_{-\pi}\left[ \frac{R^2-r^2}{R^2-2Rr\cos(\theta-t)+r^2}\right]u(a+Re^{it})\ dt. \end{align} In particular, if $u(x, y) = \operatorname{Re}[z] = x, a=0$ and $\theta=0$, then \begin{align} u(r) = r = \frac{1}{2\pi}\int^\pi_{-\pi}\left[ \frac{R^2-r^2}{R^2-2Rr\cos(t)+r^2}\right]R\cos(t)\ dt \end{align} which means \begin{align} \int^{2\pi}_{0} \frac{R\cos(t)}{R^2-2Rr\cos(t)+r^2}\ dt=\int^\pi_{-\pi} \frac{R\cos(t)}{R^2-2Rr\cos(t)+r^2}\ dt = \frac{2\pi r}{R^2-r^2}. \end{align}
I chose not to use contour integration.