# 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.

-
Quotient rule? I'm familiar with a quotient rule for differentiation, but not with a quotient rule for integration. Can you tell us what you mean here by "quotient rule"? – Gerry Myerson Oct 17 '11 at 21:40
@GerryMyerson: i am sorry, my mistake.. it is actually involving weierstrass substitution.. – DRN Oct 18 '11 at 4:38

Apply the substitution $$\tan \frac{\theta}{2}=t.$$ Then use $\cos\theta=\frac{1-t^2}{1+t^2}$.

-
how to apply $\tan{\frac{\theta}{2}}=t$ ? – DRN Oct 17 '11 at 14:41
Then $sec^2(\theta/2).1/2 d\theta=dt\Rightarrow d\theta=\frac{2dt}{1+t^2}$. Now transform everything into $t$. – Tapu Oct 17 '11 at 14:46
@Norlyda, I have seen a similar question here (in this site) just within one hour...but unable to find it. It would be helpful if someone post link here. – Tapu Oct 17 '11 at 14:54
the problems occurs when I try to factorize the denominator in order to use integration by partial fraction. do you have any idea? – DRN Oct 18 '11 at 7:12
@Norlyda, No partial fraction will be necessary. Your integration will boil into $2(1-r^2)\int\frac{dt}{(1+r)^2t^2+(1-r)^2}$. The denominator is of the form $ax^2+b=a(x^2+b/a)$. So the formula $\int\frac{dx}{x^2+a^2}=\frac{1}{a}\tan^{-1}(\frac{x}{a})$ will be used. – Tapu Oct 18 '11 at 8:56

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$.