Optimal. Leaf size=104 \[ 4 i x \text{PolyLog}\left (2,-e^{2 i x}\right )-2 \text{PolyLog}\left (3,-e^{2 i x}\right )+\frac{x^4}{4}+\frac{4 i x^3}{3}-\frac{x^2}{2}-4 x^2 \log \left (1+e^{2 i x}\right )+\frac{1}{3} x^3 \tan ^3(x)-\frac{1}{2} x^2 \tan ^2(x)-x^3 \tan (x)+x \tan (x)+\log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.227076, antiderivative size = 104, normalized size of antiderivative = 1., number of steps used = 17, number of rules used = 8, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 1., Rules used = {3720, 3475, 30, 3719, 2190, 2531, 2282, 6589} \[ 4 i x \text{PolyLog}\left (2,-e^{2 i x}\right )-2 \text{PolyLog}\left (3,-e^{2 i x}\right )+\frac{x^4}{4}+\frac{4 i x^3}{3}-\frac{x^2}{2}-4 x^2 \log \left (1+e^{2 i x}\right )+\frac{1}{3} x^3 \tan ^3(x)-\frac{1}{2} x^2 \tan ^2(x)-x^3 \tan (x)+x \tan (x)+\log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3720
Rule 3475
Rule 30
Rule 3719
Rule 2190
Rule 2531
Rule 2282
Rule 6589
Rubi steps
\begin{align*} \int x^3 \tan ^4(x) \, dx &=\frac{1}{3} x^3 \tan ^3(x)-\int x^3 \tan ^2(x) \, dx-\int x^2 \tan ^3(x) \, dx\\ &=-x^3 \tan (x)-\frac{1}{2} x^2 \tan ^2(x)+\frac{1}{3} x^3 \tan ^3(x)+3 \int x^2 \tan (x) \, dx+\int x^3 \, dx+\int x^2 \tan (x) \, dx+\int x \tan ^2(x) \, dx\\ &=\frac{4 i x^3}{3}+\frac{x^4}{4}+x \tan (x)-x^3 \tan (x)-\frac{1}{2} x^2 \tan ^2(x)+\frac{1}{3} x^3 \tan ^3(x)-2 i \int \frac{e^{2 i x} x^2}{1+e^{2 i x}} \, dx-6 i \int \frac{e^{2 i x} x^2}{1+e^{2 i x}} \, dx-\int x \, dx-\int \tan (x) \, dx\\ &=-\frac{x^2}{2}+\frac{4 i x^3}{3}+\frac{x^4}{4}-4 x^2 \log \left (1+e^{2 i x}\right )+\log (\cos (x))+x \tan (x)-x^3 \tan (x)-\frac{1}{2} x^2 \tan ^2(x)+\frac{1}{3} x^3 \tan ^3(x)+2 \int x \log \left (1+e^{2 i x}\right ) \, dx+6 \int x \log \left (1+e^{2 i x}\right ) \, dx\\ &=-\frac{x^2}{2}+\frac{4 i x^3}{3}+\frac{x^4}{4}-4 x^2 \log \left (1+e^{2 i x}\right )+\log (\cos (x))+4 i x \text{Li}_2\left (-e^{2 i x}\right )+x \tan (x)-x^3 \tan (x)-\frac{1}{2} x^2 \tan ^2(x)+\frac{1}{3} x^3 \tan ^3(x)-i \int \text{Li}_2\left (-e^{2 i x}\right ) \, dx-3 i \int \text{Li}_2\left (-e^{2 i x}\right ) \, dx\\ &=-\frac{x^2}{2}+\frac{4 i x^3}{3}+\frac{x^4}{4}-4 x^2 \log \left (1+e^{2 i x}\right )+\log (\cos (x))+4 i x \text{Li}_2\left (-e^{2 i x}\right )+x \tan (x)-x^3 \tan (x)-\frac{1}{2} x^2 \tan ^2(x)+\frac{1}{3} x^3 \tan ^3(x)-\frac{1}{2} \operatorname{Subst}\left (\int \frac{\text{Li}_2(-x)}{x} \, dx,x,e^{2 i x}\right )-\frac{3}{2} \operatorname{Subst}\left (\int \frac{\text{Li}_2(-x)}{x} \, dx,x,e^{2 i x}\right )\\ &=-\frac{x^2}{2}+\frac{4 i x^3}{3}+\frac{x^4}{4}-4 x^2 \log \left (1+e^{2 i x}\right )+\log (\cos (x))+4 i x \text{Li}_2\left (-e^{2 i x}\right )-2 \text{Li}_3\left (-e^{2 i x}\right )+x \tan (x)-x^3 \tan (x)-\frac{1}{2} x^2 \tan ^2(x)+\frac{1}{3} x^3 \tan ^3(x)\\ \end{align*}
Mathematica [A] time = 0.14389, size = 101, normalized size = 0.97 \[ 4 i x \text{PolyLog}\left (2,-e^{2 i x}\right )-2 \text{PolyLog}\left (3,-e^{2 i x}\right )+\frac{x^4}{4}+\frac{4 i x^3}{3}-4 x^2 \log \left (1+e^{2 i x}\right )-\frac{4}{3} x^3 \tan (x)-\frac{1}{2} x^2 \sec ^2(x)+\frac{1}{3} x^3 \tan (x) \sec ^2(x)+x \tan (x)+\log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 138, normalized size = 1.3 \begin{align*}{\frac{{x}^{4}}{4}}-{\frac{{\frac{2\,i}{3}}x \left ( 6\,{x}^{2}{{\rm e}^{4\,ix}}+6\,{x}^{2}{{\rm e}^{2\,ix}}-3\,{{\rm e}^{4\,ix}}-3\,ix{{\rm e}^{4\,ix}}+4\,{x}^{2}-6\,{{\rm e}^{2\,ix}}-3\,ix{{\rm e}^{2\,ix}}-3 \right ) }{ \left ( 1+{{\rm e}^{2\,ix}} \right ) ^{3}}}-2\,\ln \left ({{\rm e}^{ix}} \right ) +\ln \left ( 1+{{\rm e}^{2\,ix}} \right ) +{\frac{8\,i}{3}}{x}^{3}-4\,{x}^{2}\ln \left ( 1+{{\rm e}^{2\,ix}} \right ) +4\,ix{\it polylog} \left ( 2,-{{\rm e}^{2\,ix}} \right ) -2\,{\it polylog} \left ( 3,-{{\rm e}^{2\,ix}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.72096, size = 655, normalized size = 6.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 1.92639, size = 548, normalized size = 5.27 \begin{align*} \frac{1}{3} \, x^{3} \tan \left (x\right )^{3} + \frac{1}{4} \, x^{4} - \frac{1}{2} \, x^{2} \tan \left (x\right )^{2} - \frac{1}{2} \, x^{2} - 2 i \, x{\rm Li}_2\left (\frac{2 \,{\left (i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1} + 1\right ) + 2 i \, x{\rm Li}_2\left (\frac{2 \,{\left (-i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1} + 1\right ) - \frac{1}{2} \,{\left (4 \, x^{2} - 1\right )} \log \left (-\frac{2 \,{\left (i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1}\right ) - \frac{1}{2} \,{\left (4 \, x^{2} - 1\right )} \log \left (-\frac{2 \,{\left (-i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1}\right ) -{\left (x^{3} - x\right )} \tan \left (x\right ) -{\rm polylog}\left (3, \frac{\tan \left (x\right )^{2} + 2 i \, \tan \left (x\right ) - 1}{\tan \left (x\right )^{2} + 1}\right ) -{\rm polylog}\left (3, \frac{\tan \left (x\right )^{2} - 2 i \, \tan \left (x\right ) - 1}{\tan \left (x\right )^{2} + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{3} \tan ^{4}{\left (x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{3} \tan \left (x\right )^{4}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]