I have tried to find antiderivative of $$ \frac{\cos x\ }{2+\sin 2x} $$ using the variable change $t= \cos x -\sin x$ with sin $\sin2x=2\sin x\cos x $. But i don't come up to its closed-form result as shown below.

How can I find its antiderivative? Thanks in advance

enter image description here

  • $\begingroup$ you can use the tan-half angle substitution $\endgroup$ Mar 31, 2018 at 19:05
  • $\begingroup$ Do you meant t= tan(x/2) $\endgroup$
    – user517526
    Mar 31, 2018 at 19:05
  • $\begingroup$ yes that is what i meant, see herehttps://en.wikipedia.org/wiki/Tangent_half-angle_substitution $\endgroup$ Mar 31, 2018 at 19:07
  • $\begingroup$ Your integral is equal to the sum $$\frac 12\sum_{k=0}^{\infty}\sum_{j=0}^{\infty}(-1)^{k+j}\binom{k/2}{j}\frac{\sin^{k+j+1}x}{k+j+1} +C,$$ provided some nice conditions are satisfied. $\endgroup$
    – Allawonder
    Feb 19, 2021 at 23:46

3 Answers 3


Substitute $t=x-\frac\pi4$ to integrate \begin{align} \int \frac{\cos x\ }{2+\sin 2x}dx=&\int \frac{\cos (t+\frac\pi4)\ }{1 +2\cos^2t }dt\\ =&\frac1{\sqrt2}\int \frac{\cos t}{3 -2\sin^2t }dt -\frac1{\sqrt2}\int \frac{\sin t}{1 +2\cos^2t }dt\\ =& \frac1{2\sqrt3}\tanh^{-1}(\sqrt{\frac23}\sin t)+\frac12\tan^{-1}(\sqrt2\cos t)+C \end{align}

  • 1
    $\begingroup$ It is quite amazing that a simple translation turns it to simple integration material. How did you noticed this outcome ? $\endgroup$
    – zwim
    Feb 19, 2021 at 10:47
  • 1
    $\begingroup$ @zwim - Beside the familiar identity $1+\cos 2x = 2\cos^2 x$, I guess I familiarized myself with its sister identity $1+\sin 2x=2\cos^2(\frac\pi4-x)$ as well $\endgroup$
    – Quanto
    Feb 19, 2021 at 11:58
  • 1
    $\begingroup$ Nice use of sister identity. Once mentioned it is obvious but perhaps I have seen it the first time in use. +1 $\endgroup$
    – Paramanand Singh
    Feb 19, 2021 at 14:16

You can do the change $t=\dfrac{1+\sin(x)}{\cos(x)}$ to arrive to $\displaystyle \int\dfrac{2t\mathop{dt}}{t^4+2t^3+2t^2-2t+1}$

I'm joking, in fact this comes from successive changes:

  • $\displaystyle u = \sin(x)\quad\to\quad\int\dfrac{\mathop{du}}{2+2u\sqrt{1-u^2}}$

  • $\displaystyle \tanh(v)=u\quad\to\quad\int\dfrac{\mathop{dv}}{2\sinh(v)+\cosh(v)^2}$

  • Finally $t=e^v$ gives the rational fraction above.

Then calculate your rational parts, and this is going ugly, but you'll find the result with all these $\sqrt{3}$ stuff: [parfrac on WoframAlpha][1]

The substitution $t=\tan(\frac x2)$ gives a similar result: $\displaystyle \int\dfrac{(1-t^2)\mathop{dt}}{t^4-2t^3+2t^2+2t+1}$ with a not much more appealing rational fraction.

I guess both results should differ only by a constant.


The result from WA presented by OP appears to be simpler but in fact notice that the quantities $\pm\sin(x)\mp\cos(x)+\sqrt{3}>0$, therefore $\log(-\sec(\frac x2)^2\cdots)$ is complex valued. The antiderivative has cancelling imaginary parts, only the real part should remains after simplification.

The rational fraction is more complicated but since it has only complex roots, it means the polynomials on denominator do not annulate for real values of $t$ and the antiderivative logs will be real valued.

$$\int\dfrac{2t\,dt}{\Big(t^2+t(1-\sqrt{3})+(2-\sqrt{3})\Big)\Big(t^2+t(1+\sqrt{3})+(2+\sqrt{3})\Big)}$$ Here is the final result:

$$\frac{\sqrt{3}}{12}\ln\Big(t^2+t(1-\sqrt{3})+(2-\sqrt{3})\Big)-\frac{\sqrt{3}}{12}\ln\Big(t^2+t(1+\sqrt{3})+(2+\sqrt{3})\Big)\\-\frac 12\arctan\left(\frac{\sqrt{3}-1-2t}{\sqrt{3}-1}\right)-\frac 12\arctan\left(\frac{\sqrt{3}+1+2t}{\sqrt{3}+1}\right)$$


Try $$\sin x= \frac {2\tan x/2}{1+\tan ^2 x/2}$$

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

and $$u= \tan (x/2)$$

$$du=( 1+\tan^2 (x/2))dx $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy