Optimal. Leaf size=32 \[ \frac{\tan (x) \sec ^2(x)}{2 \left (1-\tan ^2(x)\right )^2}+\frac{1}{4} \tanh ^{-1}(2 \sin (x) \cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0273345, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {413, 21, 206} \[ \frac{\tan (x) \sec ^2(x)}{2 \left (1-\tan ^2(x)\right )^2}+\frac{1}{4} \tanh ^{-1}(2 \sin (x) \cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 413
Rule 21
Rule 206
Rubi steps
\begin{align*} \int \frac{1}{\left (\cos ^2(x)-\sin ^2(x)\right )^3} \, dx &=\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^2}{\left (1-x^2\right )^3} \, dx,x,\tan (x)\right )\\ &=\frac{\sec ^2(x) \tan (x)}{2 \left (1-\tan ^2(x)\right )^2}-\frac{1}{4} \operatorname{Subst}\left (\int \frac{-2+2 x^2}{\left (1-x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=\frac{\sec ^2(x) \tan (x)}{2 \left (1-\tan ^2(x)\right )^2}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\tan (x)\right )\\ &=\frac{1}{4} \tanh ^{-1}(2 \cos (x) \sin (x))+\frac{\sec ^2(x) \tan (x)}{2 \left (1-\tan ^2(x)\right )^2}\\ \end{align*}
Mathematica [A] time = 0.0066755, size = 22, normalized size = 0.69 \[ \frac{1}{4} \tanh ^{-1}(\sin (2 x))+\frac{1}{4} \tan (2 x) \sec (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.037, size = 48, normalized size = 1.5 \begin{align*} -{\frac{1}{4\, \left ( 1+\tan \left ( x \right ) \right ) ^{2}}}+{\frac{1}{4+4\,\tan \left ( x \right ) }}+{\frac{\ln \left ( 1+\tan \left ( x \right ) \right ) }{4}}+{\frac{1}{4\, \left ( \tan \left ( x \right ) -1 \right ) ^{2}}}+{\frac{1}{4\,\tan \left ( x \right ) -4}}-{\frac{\ln \left ( \tan \left ( x \right ) -1 \right ) }{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00548, size = 51, normalized size = 1.59 \begin{align*} \frac{\tan \left (x\right )^{3} + \tan \left (x\right )}{2 \,{\left (\tan \left (x\right )^{4} - 2 \, \tan \left (x\right )^{2} + 1\right )}} + \frac{1}{4} \, \log \left (\tan \left (x\right ) + 1\right ) - \frac{1}{4} \, \log \left (\tan \left (x\right ) - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.88887, size = 227, normalized size = 7.09 \begin{align*} \frac{{\left (4 \, \cos \left (x\right )^{4} - 4 \, \cos \left (x\right )^{2} + 1\right )} \log \left (2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) -{\left (4 \, \cos \left (x\right )^{4} - 4 \, \cos \left (x\right )^{2} + 1\right )} \log \left (-2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) + 4 \, \cos \left (x\right ) \sin \left (x\right )}{8 \,{\left (4 \, \cos \left (x\right )^{4} - 4 \, \cos \left (x\right )^{2} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 9.11282, size = 765, normalized size = 23.91 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15252, size = 50, normalized size = 1.56 \begin{align*} -\frac{\sin \left (2 \, x\right )}{4 \,{\left (\sin \left (2 \, x\right )^{2} - 1\right )}} + \frac{1}{8} \, \log \left (\sin \left (2 \, x\right ) + 1\right ) - \frac{1}{8} \, \log \left (-\sin \left (2 \, x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]