Optimal. Leaf size=30 \[ -\frac{\tan ^3(x)}{9}-\tan (x)+\frac{1}{3} \tan ^3(x) \log (\tan (x))+\tan (x) \log (\tan (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0582128, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {3767, 2554, 12} \[ -\frac{\tan ^3(x)}{9}-\tan (x)+\frac{1}{3} \tan ^3(x) \log (\tan (x))+\tan (x) \log (\tan (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3767
Rule 2554
Rule 12
Rubi steps
\begin{align*} \int \log (\tan (x)) \sec ^4(x) \, dx &=\log (\tan (x)) \tan (x)+\frac{1}{3} \log (\tan (x)) \tan ^3(x)-\int \frac{1}{3} (2+\cos (2 x)) \sec ^4(x) \, dx\\ &=\log (\tan (x)) \tan (x)+\frac{1}{3} \log (\tan (x)) \tan ^3(x)-\frac{1}{3} \int (2+\cos (2 x)) \sec ^4(x) \, dx\\ &=\log (\tan (x)) \tan (x)+\frac{1}{3} \log (\tan (x)) \tan ^3(x)-\frac{1}{3} \operatorname{Subst}\left (\int \left (3+x^2\right ) \, dx,x,\tan (x)\right )\\ &=-\tan (x)+\log (\tan (x)) \tan (x)-\frac{\tan ^3(x)}{9}+\frac{1}{3} \log (\tan (x)) \tan ^3(x)\\ \end{align*}
Mathematica [A] time = 0.0709439, size = 29, normalized size = 0.97 \[ \frac{1}{9} \tan (x) \left (\sec ^2(x) (6 \log (\tan (x))+3 \cos (2 x) \log (\tan (x))-1)-8\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.153, size = 55, normalized size = 1.8 \begin{align*}{\frac{\sin \left ( x \right ) }{9\, \left ( \cos \left ( x \right ) \right ) ^{3}} \left ( 6\, \left ( \cos \left ( x \right ) \right ) ^{2}\ln \left ( 1/2\,{\frac{\sin \left ( x \right ) }{\cos \left ( x \right ) }} \right ) +6\, \left ( \cos \left ( x \right ) \right ) ^{2}\ln \left ( 2 \right ) -8\, \left ( \cos \left ( x \right ) \right ) ^{2}+3\,\ln \left ( 1/2\,{\frac{\sin \left ( x \right ) }{\cos \left ( x \right ) }} \right ) +3\,\ln \left ( 2 \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.944442, size = 34, normalized size = 1.13 \begin{align*} -\frac{1}{9} \, \tan \left (x\right )^{3} + \frac{1}{3} \,{\left (\tan \left (x\right )^{3} + 3 \, \tan \left (x\right )\right )} \log \left (\tan \left (x\right )\right ) - \tan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.61341, size = 117, normalized size = 3.9 \begin{align*} \frac{3 \,{\left (2 \, \cos \left (x\right )^{2} + 1\right )} \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right )}\right ) \sin \left (x\right ) -{\left (8 \, \cos \left (x\right )^{2} + 1\right )} \sin \left (x\right )}{9 \, \cos \left (x\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 160.155, size = 46, normalized size = 1.53 \begin{align*} \frac{\log{\left (\tan{\left (x \right )} \right )} \tan ^{3}{\left (x \right )}}{3} + \log{\left (\tan{\left (x \right )} \right )} \tan{\left (x \right )} - \frac{\sin ^{3}{\left (x \right )}}{9 \cos ^{3}{\left (x \right )}} + \frac{\sin{\left (x \right )}}{3 \cos{\left (x \right )}} - \frac{4 \tan{\left (x \right )}}{3} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.06601, size = 35, normalized size = 1.17 \begin{align*} \frac{1}{3} \, \log \left (\tan \left (x\right )\right ) \tan \left (x\right )^{3} - \frac{1}{9} \, \tan \left (x\right )^{3} + \log \left (\tan \left (x\right )\right ) \tan \left (x\right ) - \tan \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]