Evaluating $\frac{1}{2\pi}\int_{0}^{2\pi}\frac{1}{1-2t\cos\theta +t^2}d\theta$

This is the famous Poisson kernel (see http://en.wikipedia.org/wiki/Poisson_kernel). For example, ${\displaystyle \frac{1}{1 - 2t\cos\theta + t^2} = {1 \over 1 - t^2}Re\bigg(\frac{1 + te^{i\theta}}{1 - te^{i\theta}}\bigg)}$, so you're looking for the real part of $${1 \over 2\pi(1 - t^2)}\int_0^{2\pi}{\frac{1 + te^{i\theta}}{1 - te^{i\theta}}}d\theta$$ As a complex integral this is $${1 \over 2\pi i(1 - t^2)}\int_{|z| = 1}\frac{1 + tz}{z(1 - tz)}\,dz$$ By the Cauchy integral formula this evaluates to $${1 \over 1 - t^2}$$ This is already real, so this is also the real part which is your answer.


HINT: Weierstrass Substitution


It is easier to use techniques from complex variables (residue theorem), substitute $ \cos(\theta) = \frac{z+\frac{1}{z}}{2} \,$ where $ z=\exp{(i\theta)}$ and integrate

$$ \frac{1}{2\pi}\oint_{|z|=1}\frac{1}{1-2t\frac{z+\frac{1}{z}}{2} +t^2}d\theta = \dots $$