How to Evaluate $ \int \! \frac{dx}{1+2\cos x} $ ? [duplicate]
Possible Duplicate:
How do you integrate $\int \frac{1}{a + \cos x} dx$?
I have come across this integral and I tried various methods of solving. The thing that gets in the way is the constant $2$ on the $\cos(x)$ term. I tried the conjugate (works without the 2
$\cos x$), Weierstrass Substitution (not sure if I was applying it correctly), and others. Is there a way to solve this integral elegantly or some unknown (sneaky) trick when you come across families of similar integrals as this one?:
$$ \int \! \frac{dx}{1+2\cos x} $$
Solution 1:
Weierstrass substitution works for this integral, and it's not even that messy to work with.
Substitute $\tan \frac{x}{2} = t$, so that $\cos x = \frac{1-t^2}{1+t^2}$ and $dx = \frac{2dt}{1+t^2}$. Then the integral reduces to $$ \int \frac{dx}{1+2 \cos x} = \int \frac{\frac{2}{1+t^2}}{1 + \frac{2(1-t^2)}{1+t^2}} dt = \int \frac{2}{1+t^2 + 2 - 2t^2} dt = \int \frac{2}{3-t^2} dt. $$ To evaluate the final integral, we can use the method of partial fractions: $$ \frac{2}{3-t^2} = \frac{1}{\sqrt{3}} \left( \frac{1}{t + \sqrt{3}} - \frac{1}{t - \sqrt{3}} \right). $$
Solution 2:
$I=\int \frac{\mathrm{d}x}{1+2\cos x}$
$=\int\frac{\mathrm{d}x}{\sin^2(x/2)+\cos^2(x/2)+2(\cos^2(x/2)-\sin^2(x/2))}$
$=\int \frac{\mathrm{d}x}{3\cos^2(x/2)-\sin^2(x/2)}$
Multiply the Nr and the Dr of the integrand by $\sec^2 (x/2)$.
You will get:
$\int \frac{\sec^2(x/2)\mathrm{d}x}{3-\tan^2(x/2)}$
Substitution:
$z=\tan(x/2)$
$\mathrm{d}z=1/2 \sec^2(x/2) \mathrm{d}x$
Therefore,
Integral=$\int \frac {2\mathrm{d}z}{3-z^2}$
$=\int \frac{1}{\sqrt{3}}(\frac{1}{\sqrt{3}+z}+\frac{1}{\sqrt{3}-z})\mathrm{d}z$