I'm looking to solve the following integral using substitution:

$$\int \frac{dx}{2-\cos x}$$

Let $z=\tan\frac{x}{2}$

Then $dz=\frac 1 2 \sec^2 \frac x 2\,dx$

$$\sin x=\frac{2z}{z^2+1}$$

$$\cos x =\frac{1-z^2}{z^2+1}$$


$$\int \frac{dx}{2-\cos x} = \int \frac{\frac{2\,dz}{z^2+1}}{2-\frac{1-z^2}{z^2+1}} =\int \frac{2\,dz}{3z^2+1}$$

But this is where things start to look at bit sticky. If I integrate this last fraction, then I get a very complex expression that seems to defeat the point of z-substitution. Any suggestions for where I may be going wrong?



Thank you for your feedback. I've completed my work as per your suggestions:

$$\int \frac{2\,dz}{3z^2+1} = 2\cdot\left(\frac{\tan^{-1} \frac{z}{\sqrt{3}}}{\sqrt{3}} \right) = \frac{2\tan^{-1} \left(\sqrt{3}\tan{\frac{x}{2}}\right)}{\sqrt{3}}+c$$

  • 1
    $\begingroup$ $2(z^2+1)-(1-z^2)=2z^2+z^2+2-1=3z^2+1$ $\endgroup$
    – randomgirl
    May 19, 2015 at 20:01
  • 1
    $\begingroup$ last denominator should be $3z^2+1$ $\endgroup$
    – WW1
    May 19, 2015 at 20:01
  • $\begingroup$ Look up arctan(x) derivative $\endgroup$
    – ntarki
    May 19, 2015 at 20:02
  • $\begingroup$ Similar problems (and maybe exactly this one, too) have already been answered on MSE many times. Use the Weierstrass half-angle substitution, the residue theorem or both. $\endgroup$ May 19, 2015 at 20:10

1 Answer 1



$$\int \frac{1}{a^2+x^2}dx=\frac1a \arctan(x/a)+C$$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .