Optimal. Leaf size=15 \[ -\frac{x^2}{2}+x \tan (x)+\log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0143883, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {3720, 3475, 30} \[ -\frac{x^2}{2}+x \tan (x)+\log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3720
Rule 3475
Rule 30
Rubi steps
\begin{align*} \int x \tan ^2(x) \, dx &=x \tan (x)-\int x \, dx-\int \tan (x) \, dx\\ &=-\frac{x^2}{2}+\log (\cos (x))+x \tan (x)\\ \end{align*}
Mathematica [A] time = 0.0181929, size = 15, normalized size = 1. \[ -\frac{x^2}{2}+x \tan (x)+\log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.009, size = 20, normalized size = 1.3 \begin{align*} x\tan \left ( x \right ) -{\frac{{x}^{2}}{2}}-{\frac{\ln \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.42822, size = 144, normalized size = 9.6 \begin{align*} -\frac{x^{2} \cos \left (2 \, x\right )^{2} + x^{2} \sin \left (2 \, x\right )^{2} + 2 \, x^{2} \cos \left (2 \, x\right ) + x^{2} -{\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )} \log \left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right ) - 4 \, x \sin \left (2 \, x\right )}{2 \,{\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.02897, size = 66, normalized size = 4.4 \begin{align*} -\frac{1}{2} \, x^{2} + x \tan \left (x\right ) + \frac{1}{2} \, \log \left (\frac{1}{\tan \left (x\right )^{2} + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.160963, size = 19, normalized size = 1.27 \begin{align*} - \frac{x^{2}}{2} + x \tan{\left (x \right )} - \frac{\log{\left (\tan ^{2}{\left (x \right )} + 1 \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.07227, size = 31, normalized size = 2.07 \begin{align*} -\frac{1}{2} \, x^{2} + x \tan \left (x\right ) + \frac{1}{2} \, \log \left (\frac{4}{\tan \left (x\right )^{2} + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]