Optimal. Leaf size=16 \[ -6 x+6 \tan (x)-2 \sin ^2(x) \tan (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0290192, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {12, 2591, 288, 321, 203} \[ -6 x+6 \tan (x)-2 \sin ^2(x) \tan (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2591
Rule 288
Rule 321
Rule 203
Rubi steps
\begin{align*} \int 4 \sin ^2(x) \tan ^2(x) \, dx &=4 \int \sin ^2(x) \tan ^2(x) \, dx\\ &=4 \operatorname{Subst}\left (\int \frac{x^4}{\left (1+x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=-2 \sin ^2(x) \tan (x)+6 \operatorname{Subst}\left (\int \frac{x^2}{1+x^2} \, dx,x,\tan (x)\right )\\ &=6 \tan (x)-2 \sin ^2(x) \tan (x)-6 \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=-6 x+6 \tan (x)-2 \sin ^2(x) \tan (x)\\ \end{align*}
Mathematica [A] time = 0.024689, size = 18, normalized size = 1.12 \[ 4 \left (-\frac{3 x}{2}+\frac{1}{4} \sin (2 x)+\tan (x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.01, size = 28, normalized size = 1.8 \begin{align*} 4\,{\frac{ \left ( \sin \left ( x \right ) \right ) ^{5}}{\cos \left ( x \right ) }}+4\, \left ( \left ( \sin \left ( x \right ) \right ) ^{3}+3/2\,\sin \left ( x \right ) \right ) \cos \left ( x \right ) -6\,x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.45194, size = 27, normalized size = 1.69 \begin{align*} -6 \, x + \frac{2 \, \tan \left (x\right )}{\tan \left (x\right )^{2} + 1} + 4 \, \tan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.39315, size = 65, normalized size = 4.06 \begin{align*} -\frac{2 \,{\left (3 \, x \cos \left (x\right ) -{\left (\cos \left (x\right )^{2} + 2\right )} \sin \left (x\right )\right )}}{\cos \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.062212, size = 20, normalized size = 1.25 \begin{align*} - 6 x + \frac{4 \sin ^{3}{\left (x \right )}}{\cos{\left (x \right )}} + 6 \sin{\left (x \right )} \cos{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.07805, size = 27, normalized size = 1.69 \begin{align*} -6 \, x + \frac{2 \, \tan \left (x\right )}{\tan \left (x\right )^{2} + 1} + 4 \, \tan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]