Optimal. Leaf size=25 \[ x-2 \tan ^{-1}\left (\frac{2 \sin (x) \cos (x)}{2 \cos ^2(x)-\cos (x)+1}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [F] time = 0.785338, antiderivative size = 0, normalized size of antiderivative = 0., number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0., Rules used = {} \[ \int \frac{-5+2 \cos (x)+7 \cos ^2(x)}{-1+2 \cos (x)-9 \cos ^2(x)+4 \cos ^3(x)} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
Rubi steps
\begin{align*} \int \frac{-5+2 \cos (x)+7 \cos ^2(x)}{-1+2 \cos (x)-9 \cos ^2(x)+4 \cos ^3(x)} \, dx &=\int \left (-\frac{5}{-1+2 \cos (x)-9 \cos ^2(x)+4 \cos ^3(x)}+\frac{2 \cos (x)}{-1+2 \cos (x)-9 \cos ^2(x)+4 \cos ^3(x)}+\frac{7 \cos ^2(x)}{-1+2 \cos (x)-9 \cos ^2(x)+4 \cos ^3(x)}\right ) \, dx\\ &=2 \int \frac{\cos (x)}{-1+2 \cos (x)-9 \cos ^2(x)+4 \cos ^3(x)} \, dx-5 \int \frac{1}{-1+2 \cos (x)-9 \cos ^2(x)+4 \cos ^3(x)} \, dx+7 \int \frac{\cos ^2(x)}{-1+2 \cos (x)-9 \cos ^2(x)+4 \cos ^3(x)} \, dx\\ \end{align*}
Mathematica [B] time = 0.133399, size = 63, normalized size = 2.52 \[ \tan ^{-1}\left (\frac{1}{4} \left (5 \sin \left (\frac{x}{2}\right )-3 \sin \left (\frac{3 x}{2}\right )\right ) \sec ^3\left (\frac{x}{2}\right )\right )-\tan ^{-1}\left (\frac{1}{4} \left (3 \sin \left (\frac{3 x}{2}\right )-5 \sin \left (\frac{x}{2}\right )\right ) \sec ^3\left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 19, normalized size = 0.8 \begin{align*} 2\,\arctan \left ( 2\, \left ( \tan \left ( x/2 \right ) \right ) ^{3}-\tan \left ( x/2 \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 7.5824, size = 85, normalized size = 3.4 \begin{align*} -\arctan \left (\sin \left (3 \, x\right ) - \frac{1}{2} \, \sin \left (2 \, x\right ) + 2 \, \sin \left (x\right ), \cos \left (3 \, x\right ) - \frac{1}{2} \, \cos \left (2 \, x\right ) + 2 \, \cos \left (x\right ) - \frac{1}{2}\right ) + \arctan \left (\sin \left (3 \, x\right ) - 4 \, \sin \left (2 \, x\right ) + \sin \left (x\right ), \cos \left (3 \, x\right ) - 4 \, \cos \left (2 \, x\right ) + \cos \left (x\right ) - 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.66184, size = 112, normalized size = 4.48 \begin{align*} \arctan \left (\frac{5 \, \cos \left (x\right )^{3} - 6 \, \cos \left (x\right )^{2} + 5 \, \cos \left (x\right )}{{\left (3 \, \cos \left (x\right )^{2} + 2 \, \cos \left (x\right ) - 1\right )} \sin \left (x\right )}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10207, size = 22, normalized size = 0.88 \begin{align*} -2 \, \arctan \left (-2 \, \tan \left (\frac{1}{2} \, x\right )^{3} + \tan \left (\frac{1}{2} \, x\right )\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]