How to integrate this trigonometry function? The question is $ \displaystyle \int{ \frac{1-r^{2}}{1-2r\cos(\theta)+r^{2}}} d\theta$.
I know it will be used weierstrass substitution to solve but i did not have any idea of it.

There's a Wikipedia article about this technique: Weierstrass substitution.
Notice that what you've got here is $\displaystyle\int\frac{d\theta}{a+b\cos\theta}$.  The factor $1-r^2$ pulls out, and $a=1+r^2$ and $b=-2r$.
