Optimal. Leaf size=59 \[ -\frac {1}{2} i \operatorname {PolyLog}\left (2,-e^{2 i x}\right )-\frac {i x^2}{2}+\frac {x}{2}+x \log \left (1+e^{2 i x}\right )+\frac {1}{2} x \tan ^2(x)-\frac {\tan (x)}{2} \]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.167, Rules used = {3720, 3473, 8, 3719, 2190, 2279, 2391} \[ -\frac {1}{2} i \text {PolyLog}\left (2,-e^{2 i x}\right )-\frac {i x^2}{2}+\frac {x}{2}+x \log \left (1+e^{2 i x}\right )+\frac {1}{2} x \tan ^2(x)-\frac {\tan (x)}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2190
Rule 2279
Rule 2391
Rule 3473
Rule 3719
Rule 3720
Rubi steps
\begin {align*} \int x \tan ^3(x) \, dx &=\frac {1}{2} x \tan ^2(x)-\frac {1}{2} \int \tan ^2(x) \, dx-\int x \tan (x) \, dx\\ &=-\frac {i x^2}{2}-\frac {\tan (x)}{2}+\frac {1}{2} x \tan ^2(x)+2 i \int \frac {e^{2 i x} x}{1+e^{2 i x}} \, dx+\frac {\int 1 \, dx}{2}\\ &=\frac {x}{2}-\frac {i x^2}{2}+x \log \left (1+e^{2 i x}\right )-\frac {\tan (x)}{2}+\frac {1}{2} x \tan ^2(x)-\int \log \left (1+e^{2 i x}\right ) \, dx\\ &=\frac {x}{2}-\frac {i x^2}{2}+x \log \left (1+e^{2 i x}\right )-\frac {\tan (x)}{2}+\frac {1}{2} x \tan ^2(x)+\frac {1}{2} i \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i x}\right )\\ &=\frac {x}{2}-\frac {i x^2}{2}+x \log \left (1+e^{2 i x}\right )-\frac {1}{2} i \text {Li}_2\left (-e^{2 i x}\right )-\frac {\tan (x)}{2}+\frac {1}{2} x \tan ^2(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 54, normalized size = 0.92 \[ -\frac {1}{2} i \operatorname {PolyLog}\left (2,-e^{2 i x}\right )-\frac {i x^2}{2}+x \log \left (1+e^{2 i x}\right )-\frac {\tan (x)}{2}+\frac {1}{2} x \sec ^2(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \tan ^3(x) \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.47, size = 138, normalized size = 2.34 \[ \frac {x \cos \relax (x)^{2} \log \left (i \, \cos \relax (x) + \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (i \, \cos \relax (x) - \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (-i \, \cos \relax (x) + \sin \relax (x) + 1\right ) + x \cos \relax (x)^{2} \log \left (-i \, \cos \relax (x) - \sin \relax (x) + 1\right ) + i \, \cos \relax (x)^{2} {\rm Li}_2\left (i \, \cos \relax (x) + \sin \relax (x)\right ) - i \, \cos \relax (x)^{2} {\rm Li}_2\left (i \, \cos \relax (x) - \sin \relax (x)\right ) - i \, \cos \relax (x)^{2} {\rm Li}_2\left (-i \, \cos \relax (x) + \sin \relax (x)\right ) + i \, \cos \relax (x)^{2} {\rm Li}_2\left (-i \, \cos \relax (x) - \sin \relax (x)\right ) - \cos \relax (x) \sin \relax (x) + x}{2 \, \cos \relax (x)^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \sin \relax (x)^{3}}{\cos \relax (x)^{3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 59, normalized size = 1.00
method | result | size |
risch | \(-\frac {i x^{2}}{2}+\frac {2 x \,{\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}-i}{\left (1+{\mathrm e}^{2 i x}\right )^{2}}+x \ln \left (1+{\mathrm e}^{2 i x}\right )-\frac {i \polylog \left (2, -{\mathrm e}^{2 i x}\right )}{2}\) | \(59\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.30, size = 213, normalized size = 3.61 \[ -\frac {x^{2} \cos \left (4 \, x\right ) + i \, x^{2} \sin \left (4 \, x\right ) + x^{2} - {\left (2 \, x \cos \left (4 \, x\right ) + 4 \, x \cos \left (2 \, x\right ) + 2 i \, x \sin \left (4 \, x\right ) + 4 i \, x \sin \left (2 \, x\right ) + 2 \, x\right )} \arctan \left (\sin \left (2 \, x\right ), \cos \left (2 \, x\right ) + 1\right ) + 2 \, {\left (x^{2} + 2 i \, x + 1\right )} \cos \left (2 \, x\right ) + {\left (\cos \left (4 \, x\right ) + 2 \, \cos \left (2 \, x\right ) + i \, \sin \left (4 \, x\right ) + 2 i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_2\left (-e^{\left (2 i \, x\right )}\right ) - {\left (-i \, x \cos \left (4 \, x\right ) - 2 i \, x \cos \left (2 \, x\right ) + x \sin \left (4 \, x\right ) + 2 \, x \sin \left (2 \, x\right ) - i \, x\right )} \log \left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right ) - {\left (-2 i \, x^{2} + 4 \, x - 2 i\right )} \sin \left (2 \, x\right ) + 2}{-2 i \, \cos \left (4 \, x\right ) - 4 i \, \cos \left (2 \, x\right ) + 2 \, \sin \left (4 \, x\right ) + 4 \, \sin \left (2 \, x\right ) - 2 i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {x\,{\sin \relax (x)}^3}{{\cos \relax (x)}^3} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \sin ^{3}{\relax (x )}}{\cos ^{3}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________