Integral of $$$\frac{1}{2 - \cos{\left(2 x \right)}}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \frac{1}{2 - \cos{\left(2 x \right)}}\, dx$$$.
Solution
Let $$$u=2 x$$$.
Then $$$du=\left(2 x\right)^{\prime }dx = 2 dx$$$ (steps can be seen »), and we have that $$$dx = \frac{du}{2}$$$.
Therefore,
$${\color{red}{\int{\frac{1}{2 - \cos{\left(2 x \right)}} d x}}} = {\color{red}{\int{\left(- \frac{1}{2 \left(\cos{\left(u \right)} - 2\right)}\right)d u}}}$$
Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=- \frac{1}{2}$$$ and $$$f{\left(u \right)} = \frac{1}{\cos{\left(u \right)} - 2}$$$:
$${\color{red}{\int{\left(- \frac{1}{2 \left(\cos{\left(u \right)} - 2\right)}\right)d u}}} = {\color{red}{\left(- \frac{\int{\frac{1}{\cos{\left(u \right)} - 2} d u}}{2}\right)}}$$
Rewrite the integrand using the formula $$$\cos{\left( u \right)}=\frac{1 - \tan^{2}{\left(\frac{ u }{2} \right)}}{\tan^{2}{\left(\frac{ u }{2} \right)} + 1}$$$:
$$- \frac{{\color{red}{\int{\frac{1}{\cos{\left(u \right)} - 2} d u}}}}{2} = - \frac{{\color{red}{\int{\frac{1}{\frac{1 - \tan^{2}{\left(\frac{u}{2} \right)}}{\tan^{2}{\left(\frac{u}{2} \right)} + 1} - 2} d u}}}}{2}$$
Let $$$v=\tan{\left(\frac{u}{2} \right)}$$$.
Then $$$u=2 \operatorname{atan}{\left(v \right)}$$$ and $$$du=\left(2 \operatorname{atan}{\left(v \right)}\right)^{\prime }dv = \frac{2}{v^{2} + 1} dv$$$ (steps can be seen »).
The integral can be rewritten as
$$- \frac{{\color{red}{\int{\frac{1}{\frac{1 - \tan^{2}{\left(\frac{u}{2} \right)}}{\tan^{2}{\left(\frac{u}{2} \right)} + 1} - 2} d u}}}}{2} = - \frac{{\color{red}{\int{\frac{2}{\left(v^{2} + 1\right) \left(\frac{1 - v^{2}}{v^{2} + 1} - 2\right)} d v}}}}{2}$$
Simplify:
$$- \frac{{\color{red}{\int{\frac{2}{\left(v^{2} + 1\right) \left(\frac{1 - v^{2}}{v^{2} + 1} - 2\right)} d v}}}}{2} = - \frac{{\color{red}{\int{\left(- \frac{2}{3 v^{2} + 1}\right)d v}}}}{2}$$
Apply the constant multiple rule $$$\int c f{\left(v \right)}\, dv = c \int f{\left(v \right)}\, dv$$$ with $$$c=-2$$$ and $$$f{\left(v \right)} = \frac{1}{3 v^{2} + 1}$$$:
$$- \frac{{\color{red}{\int{\left(- \frac{2}{3 v^{2} + 1}\right)d v}}}}{2} = - \frac{{\color{red}{\left(- 2 \int{\frac{1}{3 v^{2} + 1} d v}\right)}}}{2}$$
Let $$$w=\sqrt{3} v$$$.
Then $$$dw=\left(\sqrt{3} v\right)^{\prime }dv = \sqrt{3} dv$$$ (steps can be seen »), and we have that $$$dv = \frac{\sqrt{3} dw}{3}$$$.
The integral can be rewritten as
$${\color{red}{\int{\frac{1}{3 v^{2} + 1} d v}}} = {\color{red}{\int{\frac{\sqrt{3}}{3 \left(w^{2} + 1\right)} d w}}}$$
Apply the constant multiple rule $$$\int c f{\left(w \right)}\, dw = c \int f{\left(w \right)}\, dw$$$ with $$$c=\frac{\sqrt{3}}{3}$$$ and $$$f{\left(w \right)} = \frac{1}{w^{2} + 1}$$$:
$${\color{red}{\int{\frac{\sqrt{3}}{3 \left(w^{2} + 1\right)} d w}}} = {\color{red}{\left(\frac{\sqrt{3} \int{\frac{1}{w^{2} + 1} d w}}{3}\right)}}$$
The integral of $$$\frac{1}{w^{2} + 1}$$$ is $$$\int{\frac{1}{w^{2} + 1} d w} = \operatorname{atan}{\left(w \right)}$$$:
$$\frac{\sqrt{3} {\color{red}{\int{\frac{1}{w^{2} + 1} d w}}}}{3} = \frac{\sqrt{3} {\color{red}{\operatorname{atan}{\left(w \right)}}}}{3}$$
Recall that $$$w=\sqrt{3} v$$$:
$$\frac{\sqrt{3} \operatorname{atan}{\left({\color{red}{w}} \right)}}{3} = \frac{\sqrt{3} \operatorname{atan}{\left({\color{red}{\sqrt{3} v}} \right)}}{3}$$
Recall that $$$v=\tan{\left(\frac{u}{2} \right)}$$$:
$$\frac{\sqrt{3} \operatorname{atan}{\left(\sqrt{3} {\color{red}{v}} \right)}}{3} = \frac{\sqrt{3} \operatorname{atan}{\left(\sqrt{3} {\color{red}{\tan{\left(\frac{u}{2} \right)}}} \right)}}{3}$$
Recall that $$$u=2 x$$$:
$$\frac{\sqrt{3} \operatorname{atan}{\left(\sqrt{3} \tan{\left(\frac{{\color{red}{u}}}{2} \right)} \right)}}{3} = \frac{\sqrt{3} \operatorname{atan}{\left(\sqrt{3} \tan{\left(\frac{{\color{red}{\left(2 x\right)}}}{2} \right)} \right)}}{3}$$
Therefore,
$$\int{\frac{1}{2 - \cos{\left(2 x \right)}} d x} = \frac{\sqrt{3} \operatorname{atan}{\left(\sqrt{3} \tan{\left(x \right)} \right)}}{3}$$
Add the constant of integration:
$$\int{\frac{1}{2 - \cos{\left(2 x \right)}} d x} = \frac{\sqrt{3} \operatorname{atan}{\left(\sqrt{3} \tan{\left(x \right)} \right)}}{3}+C$$
Answer
$$$\int \frac{1}{2 - \cos{\left(2 x \right)}}\, dx = \frac{\sqrt{3} \operatorname{atan}{\left(\sqrt{3} \tan{\left(x \right)} \right)}}{3} + C$$$A