Optimal. Leaf size=21 \[ x+2 \tan ^{-1}\left (\frac{\cos (x)-\sin (x)}{\sin (x)+\cos (x)+2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0478138, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {3166, 3124, 618, 204} \[ x+2 \tan ^{-1}\left (\frac{\cos (x)-\sin (x)}{\sin (x)+\cos (x)+2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3166
Rule 3124
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{\csc (x)}{2+2 \cot (x)+3 \csc (x)} \, dx &=\int \frac{1}{3+2 \cos (x)+2 \sin (x)} \, dx\\ &=2 \operatorname{Subst}\left (\int \frac{1}{5+4 x+x^2} \, dx,x,\tan \left (\frac{x}{2}\right )\right )\\ &=-\left (4 \operatorname{Subst}\left (\int \frac{1}{-4-x^2} \, dx,x,4+2 \tan \left (\frac{x}{2}\right )\right )\right )\\ &=x+2 \tan ^{-1}\left (\frac{\cos (x)-\sin (x)}{2+\cos (x)+\sin (x)}\right )\\ \end{align*}
Mathematica [B] time = 0.0248894, size = 51, normalized size = 2.43 \[ \tan ^{-1}\left (\sec \left (\frac{x}{2}\right ) \left (\sin \left (\frac{x}{2}\right )+2 \cos \left (\frac{x}{2}\right )\right )\right )-\tan ^{-1}\left (\frac{\cos \left (\frac{x}{2}\right )}{\sin \left (\frac{x}{2}\right )+2 \cos \left (\frac{x}{2}\right )}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.039, size = 10, normalized size = 0.5 \begin{align*} 2\,\arctan \left ( 2+\tan \left ( x/2 \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.48324, size = 19, normalized size = 0.9 \begin{align*} 2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.19288, size = 74, normalized size = 3.52 \begin{align*} -\arctan \left (-\frac{3 \, \cos \left (x\right ) + 3 \, \sin \left (x\right ) + 4}{\cos \left (x\right ) - \sin \left (x\right )}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc{\left (x \right )}}{2 \cot{\left (x \right )} + 3 \csc{\left (x \right )} + 2}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14316, size = 30, normalized size = 1.43 \begin{align*} 2 \, \pi \left \lfloor \frac{x}{2 \, \pi } + \frac{1}{2} \right \rfloor + 2 \, \arctan \left (\tan \left (\frac{1}{2} \, x\right ) + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]