Optimal. Leaf size=6 \[ x^2 \sec (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6742, 4181, 2279, 2391, 3757} \[ x^2 \sec (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2279
Rule 2391
Rule 3757
Rule 4181
Rule 6742
Rubi steps
\begin {align*} \int x \sec (x) (2+x \tan (x)) \, dx &=\int \left (2 x \sec (x)+x^2 \sec (x) \tan (x)\right ) \, dx\\ &=2 \int x \sec (x) \, dx+\int x^2 \sec (x) \tan (x) \, dx\\ &=-4 i x \tan ^{-1}\left (e^{i x}\right )+x^2 \sec (x)-2 \int \log \left (1-i e^{i x}\right ) \, dx+2 \int \log \left (1+i e^{i x}\right ) \, dx-2 \int x \sec (x) \, dx\\ &=x^2 \sec (x)+2 i \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i x}\right )-2 i \operatorname {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i x}\right )+2 \int \log \left (1-i e^{i x}\right ) \, dx-2 \int \log \left (1+i e^{i x}\right ) \, dx\\ &=2 i \text {Li}_2\left (-i e^{i x}\right )-2 i \text {Li}_2\left (i e^{i x}\right )+x^2 \sec (x)-2 i \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i x}\right )+2 i \operatorname {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i x}\right )\\ &=x^2 \sec (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 6, normalized size = 1.00 \[ x^2 \sec (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 2.14, size = 8, normalized size = 1.33 \[ \frac {x^{2}}{\cos \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.15, size = 26, normalized size = 4.33 \[ -\frac {x^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + x^{2}}{\tan \left (\frac {1}{2} \, x\right )^{2} - 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 9, normalized size = 1.50 \[ \frac {x^{2}}{\cos \relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.48, size = 51, normalized size = 8.50 \[ \frac {2 \, {\left (x^{2} \cos \left (2 \, x\right ) \cos \relax (x) + x^{2} \sin \left (2 \, x\right ) \sin \relax (x) + x^{2} \cos \relax (x)\right )}}{\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.08, size = 8, normalized size = 1.33 \[ \frac {x^2}{\cos \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.48, size = 5, normalized size = 0.83 \[ x^{2} \sec {\relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________