Optimal. Leaf size=153 \[ \frac {19 x^2}{20}-\frac {23 i x^3}{15}-\frac {x^4}{4}+\frac {23}{5} x^2 \log \left (1+e^{2 i x}\right )-2 \log (\cos (x))-\frac {23}{5} i x \text {Li}_2\left (-e^{2 i x}\right )+\frac {23}{10} \text {Li}_3\left (-e^{2 i x}\right )-\frac {19}{10} x \tan (x)+x^3 \tan (x)-\frac {\tan ^2(x)}{20}+\frac {4}{5} x^2 \tan ^2(x)+\frac {1}{10} x \tan ^3(x)-\frac {1}{3} x^3 \tan ^3(x)-\frac {3}{20} x^2 \tan ^4(x)+\frac {1}{5} x^3 \tan ^5(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 153, normalized size of antiderivative = 1.00, number of steps
used = 34, number of rules used = 9, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.125, Rules used = {3801, 3554,
3556, 30, 3800, 2221, 2611, 2320, 6724} \begin {gather*} -\frac {23}{5} i x \text {Li}_2\left (-e^{2 i x}\right )+\frac {23}{10} \text {Li}_3\left (-e^{2 i x}\right )-\frac {x^4}{4}-\frac {23 i x^3}{15}+\frac {1}{5} x^3 \tan ^5(x)-\frac {1}{3} x^3 \tan ^3(x)+x^3 \tan (x)+\frac {19 x^2}{20}+\frac {23}{5} x^2 \log \left (1+e^{2 i x}\right )-\frac {3}{20} x^2 \tan ^4(x)+\frac {4}{5} x^2 \tan ^2(x)+\frac {1}{10} x \tan ^3(x)-\frac {\tan ^2(x)}{20}-\frac {19}{10} x \tan (x)-2 \log (\cos (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2221
Rule 2320
Rule 2611
Rule 3554
Rule 3556
Rule 3800
Rule 3801
Rule 6724
Rubi steps
\begin {align*} \int x^3 \tan ^6(x) \, dx &=\frac {1}{5} x^3 \tan ^5(x)-\frac {3}{5} \int x^2 \tan ^5(x) \, dx-\int x^3 \tan ^4(x) \, dx\\ &=-\frac {1}{3} x^3 \tan ^3(x)-\frac {3}{20} x^2 \tan ^4(x)+\frac {1}{5} x^3 \tan ^5(x)+\frac {3}{10} \int x \tan ^4(x) \, dx+\frac {3}{5} \int x^2 \tan ^3(x) \, dx+\int x^3 \tan ^2(x) \, dx+\int x^2 \tan ^3(x) \, dx\\ &=x^3 \tan (x)+\frac {4}{5} x^2 \tan ^2(x)+\frac {1}{10} x \tan ^3(x)-\frac {1}{3} x^3 \tan ^3(x)-\frac {3}{20} x^2 \tan ^4(x)+\frac {1}{5} x^3 \tan ^5(x)-\frac {1}{10} \int \tan ^3(x) \, dx-\frac {3}{10} \int x \tan ^2(x) \, dx-\frac {3}{5} \int x^2 \tan (x) \, dx-\frac {3}{5} \int x \tan ^2(x) \, dx-3 \int x^2 \tan (x) \, dx-\int x^3 \, dx-\int x^2 \tan (x) \, dx-\int x \tan ^2(x) \, dx\\ &=-\frac {23 i x^3}{15}-\frac {x^4}{4}-\frac {19}{10} x \tan (x)+x^3 \tan (x)-\frac {\tan ^2(x)}{20}+\frac {4}{5} x^2 \tan ^2(x)+\frac {1}{10} x \tan ^3(x)-\frac {1}{3} x^3 \tan ^3(x)-\frac {3}{20} x^2 \tan ^4(x)+\frac {1}{5} x^3 \tan ^5(x)+\frac {6}{5} i \int \frac {e^{2 i x} x^2}{1+e^{2 i x}} \, dx+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+\frac {1}{10} \int \tan (x) \, dx+\frac {3 \int x \, dx}{10}+\frac {3}{10} \int \tan (x) \, dx+\frac {3 \int x \, dx}{5}+\frac {3}{5} \int \tan (x) \, dx+\int x \, dx+\int \tan (x) \, dx\\ &=\frac {19 x^2}{20}-\frac {23 i x^3}{15}-\frac {x^4}{4}+\frac {23}{5} x^2 \log \left (1+e^{2 i x}\right )-2 \log (\cos (x))-\frac {19}{10} x \tan (x)+x^3 \tan (x)-\frac {\tan ^2(x)}{20}+\frac {4}{5} x^2 \tan ^2(x)+\frac {1}{10} x \tan ^3(x)-\frac {1}{3} x^3 \tan ^3(x)-\frac {3}{20} x^2 \tan ^4(x)+\frac {1}{5} x^3 \tan ^5(x)-\frac {6}{5} \int x \log \left (1+e^{2 i x}\right ) \, dx-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 {19 x^2}{20}-\frac {23 i x^3}{15}-\frac {x^4}{4}+\frac {23}{5} x^2 \log \left (1+e^{2 i x}\right )-2 \log (\cos (x))-\frac {23}{5} i x \text {Li}_2\left (-e^{2 i x}\right )-\frac {19}{10} x \tan (x)+x^3 \tan (x)-\frac {\tan ^2(x)}{20}+\frac {4}{5} x^2 \tan ^2(x)+\frac {1}{10} x \tan ^3(x)-\frac {1}{3} x^3 \tan ^3(x)-\frac {3}{20} x^2 \tan ^4(x)+\frac {1}{5} x^3 \tan ^5(x)+\frac {3}{5} i \int \text {Li}_2\left (-e^{2 i x}\right ) \, dx+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 {19 x^2}{20}-\frac {23 i x^3}{15}-\frac {x^4}{4}+\frac {23}{5} x^2 \log \left (1+e^{2 i x}\right )-2 \log (\cos (x))-\frac {23}{5} i x \text {Li}_2\left (-e^{2 i x}\right )-\frac {19}{10} x \tan (x)+x^3 \tan (x)-\frac {\tan ^2(x)}{20}+\frac {4}{5} x^2 \tan ^2(x)+\frac {1}{10} x \tan ^3(x)-\frac {1}{3} x^3 \tan ^3(x)-\frac {3}{20} x^2 \tan ^4(x)+\frac {1}{5} x^3 \tan ^5(x)+\frac {3}{10} \text {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 i x}\right )+\frac {1}{2} \text {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 i x}\right )+\frac {3}{2} \text {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 i x}\right )\\ &=\frac {19 x^2}{20}-\frac {23 i x^3}{15}-\frac {x^4}{4}+\frac {23}{5} x^2 \log \left (1+e^{2 i x}\right )-2 \log (\cos (x))-\frac {23}{5} i x \text {Li}_2\left (-e^{2 i x}\right )+\frac {23}{10} \text {Li}_3\left (-e^{2 i x}\right )-\frac {19}{10} x \tan (x)+x^3 \tan (x)-\frac {\tan ^2(x)}{20}+\frac {4}{5} x^2 \tan ^2(x)+\frac {1}{10} x \tan ^3(x)-\frac {1}{3} x^3 \tan ^3(x)-\frac {3}{20} x^2 \tan ^4(x)+\frac {1}{5} x^3 \tan ^5(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.23, size = 133, normalized size = 0.87 \begin {gather*} \frac {1}{60} \left (-92 i x^3-15 x^4+276 x^2 \log \left (1+e^{2 i x}\right )-120 \log (\cos (x))-276 i x \text {Li}_2\left (-e^{2 i x}\right )+138 \text {Li}_3\left (-e^{2 i x}\right )-3 \sec ^2(x)+66 x^2 \sec ^2(x)-9 x^2 \sec ^4(x)-120 x \tan (x)+92 x^3 \tan (x)+6 x \sec ^2(x) \tan (x)-44 x^3 \sec ^2(x) \tan (x)+12 x^3 \sec ^4(x) \tan (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded while calling a Python object} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 237, normalized size = 1.55
method | result | size |
risch | \(-\frac {x^{4}}{4}+\frac {i \left (9 i {\mathrm e}^{6 i x}+90 x^{3} {\mathrm e}^{8 i x}-162 i x^{2} {\mathrm e}^{4 i x}-66 i x^{2} {\mathrm e}^{8 i x}+180 x^{3} {\mathrm e}^{6 i x}-66 x \,{\mathrm e}^{8 i x}+3 i {\mathrm e}^{2 i x}+3 i {\mathrm e}^{8 i x}+280 x^{3} {\mathrm e}^{4 i x}-246 x \,{\mathrm e}^{6 i x}-66 i x^{2} {\mathrm e}^{2 i x}+9 i {\mathrm e}^{4 i x}+140 x^{3} {\mathrm e}^{2 i x}-354 x \,{\mathrm e}^{4 i x}-162 i x^{2} {\mathrm e}^{6 i x}+46 x^{3}-234 x \,{\mathrm e}^{2 i x}-60 x \right )}{15 \left ({\mathrm e}^{2 i x}+1\right )^{5}}+4 \ln \left ({\mathrm e}^{i x}\right )-2 \ln \left ({\mathrm e}^{2 i x}+1\right )-\frac {46 i x^{3}}{15}+\frac {23 x^{2} \ln \left ({\mathrm e}^{2 i x}+1\right )}{5}-\frac {23 i x \polylog \left (2, -{\mathrm e}^{2 i x}\right )}{5}+\frac {23 \polylog \left (3, -{\mathrm e}^{2 i x}\right )}{10}\) | \(237\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 777 vs. \(2 (113) = 226\).
time = 0.63, size = 777, normalized size = 5.08
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.33, size = 212, normalized size = 1.39 \begin {gather*} \frac {1}{5} \, x^{3} \tan \left (x\right )^{5} - \frac {3}{20} \, x^{2} \tan \left (x\right )^{4} - \frac {1}{4} \, x^{4} - \frac {1}{30} \, {\left (10 \, x^{3} - 3 \, x\right )} \tan \left (x\right )^{3} + \frac {1}{20} \, {\left (16 \, x^{2} - 1\right )} \tan \left (x\right )^{2} + \frac {19}{20} \, x^{2} + \frac {23}{10} 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 {23}{10} 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}{10} \, {\left (23 \, x^{2} - 10\right )} \log \left (-\frac {2 \, {\left (i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1}\right ) + \frac {1}{10} \, {\left (23 \, x^{2} - 10\right )} \log \left (-\frac {2 \, {\left (-i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1}\right ) + \frac {1}{10} \, {\left (10 \, x^{3} - 19 \, x\right )} \tan \left (x\right ) + \frac {23}{20} \, {\rm polylog}\left (3, \frac {\tan \left (x\right )^{2} + 2 i \, \tan \left (x\right ) - 1}{\tan \left (x\right )^{2} + 1}\right ) + \frac {23}{20} \, {\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{3} \tan ^{6}{\left (x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] N/A
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^3\,{\mathrm {tan}\left (x\right )}^6 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________