Optimal. Leaf size=102 \[ \frac {3 x^2}{8}-x^3+\frac {3 x^4}{8}-\frac {3 \cosh ^2(x)}{8}-\frac {3}{4} x^2 \cosh ^2(x)-x^3 \coth (x)+3 x^2 \log \left (1-e^{2 x}\right )+3 x \text {PolyLog}\left (2,e^{2 x}\right )-\frac {3}{2} \text {PolyLog}\left (3,e^{2 x}\right )+\frac {3}{4} x \cosh (x) \sinh (x)+\frac {1}{2} x^3 \cosh (x) \sinh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 10, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.833, Rules used = {5558, 3392,
30, 3391, 3801, 3797, 2221, 2611, 2320, 6724} \begin {gather*} 3 x \text {Li}_2\left (e^{2 x}\right )-\frac {3 \text {Li}_3\left (e^{2 x}\right )}{2}+\frac {3 x^4}{8}-x^3-x^3 \coth (x)+\frac {1}{2} x^3 \sinh (x) \cosh (x)+\frac {3 x^2}{8}+3 x^2 \log \left (1-e^{2 x}\right )-\frac {3}{4} x^2 \cosh ^2(x)-\frac {3 \cosh ^2(x)}{8}+\frac {3}{4} x \sinh (x) \cosh (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2221
Rule 2320
Rule 2611
Rule 3391
Rule 3392
Rule 3797
Rule 3801
Rule 5558
Rule 6724
Rubi steps
\begin {align*} \int x^3 \cosh ^2(x) \coth ^2(x) \, dx &=\int x^3 \cosh ^2(x) \, dx+\int x^3 \coth ^2(x) \, dx\\ &=-\frac {3}{4} x^2 \cosh ^2(x)-x^3 \coth (x)+\frac {1}{2} x^3 \cosh (x) \sinh (x)+\frac {\int x^3 \, dx}{2}+\frac {3}{2} \int x \cosh ^2(x) \, dx+3 \int x^2 \coth (x) \, dx+\int x^3 \, dx\\ &=-x^3+\frac {3 x^4}{8}-\frac {3 \cosh ^2(x)}{8}-\frac {3}{4} x^2 \cosh ^2(x)-x^3 \coth (x)+\frac {3}{4} x \cosh (x) \sinh (x)+\frac {1}{2} x^3 \cosh (x) \sinh (x)+\frac {3 \int x \, dx}{4}-6 \int \frac {e^{2 x} x^2}{1-e^{2 x}} \, dx\\ &=\frac {3 x^2}{8}-x^3+\frac {3 x^4}{8}-\frac {3 \cosh ^2(x)}{8}-\frac {3}{4} x^2 \cosh ^2(x)-x^3 \coth (x)+3 x^2 \log \left (1-e^{2 x}\right )+\frac {3}{4} x \cosh (x) \sinh (x)+\frac {1}{2} x^3 \cosh (x) \sinh (x)-6 \int x \log \left (1-e^{2 x}\right ) \, dx\\ &=\frac {3 x^2}{8}-x^3+\frac {3 x^4}{8}-\frac {3 \cosh ^2(x)}{8}-\frac {3}{4} x^2 \cosh ^2(x)-x^3 \coth (x)+3 x^2 \log \left (1-e^{2 x}\right )+3 x \text {Li}_2\left (e^{2 x}\right )+\frac {3}{4} x \cosh (x) \sinh (x)+\frac {1}{2} x^3 \cosh (x) \sinh (x)-3 \int \text {Li}_2\left (e^{2 x}\right ) \, dx\\ &=\frac {3 x^2}{8}-x^3+\frac {3 x^4}{8}-\frac {3 \cosh ^2(x)}{8}-\frac {3}{4} x^2 \cosh ^2(x)-x^3 \coth (x)+3 x^2 \log \left (1-e^{2 x}\right )+3 x \text {Li}_2\left (e^{2 x}\right )+\frac {3}{4} x \cosh (x) \sinh (x)+\frac {1}{2} x^3 \cosh (x) \sinh (x)-\frac {3}{2} \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{2 x}\right )\\ &=\frac {3 x^2}{8}-x^3+\frac {3 x^4}{8}-\frac {3 \cosh ^2(x)}{8}-\frac {3}{4} x^2 \cosh ^2(x)-x^3 \coth (x)+3 x^2 \log \left (1-e^{2 x}\right )+3 x \text {Li}_2\left (e^{2 x}\right )-\frac {3 \text {Li}_3\left (e^{2 x}\right )}{2}+\frac {3}{4} x \cosh (x) \sinh (x)+\frac {1}{2} x^3 \cosh (x) \sinh (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.11, size = 94, normalized size = 0.92 \begin {gather*} \frac {1}{16} \left (2 i \pi ^3-16 x^3+6 x^4-3 \cosh (2 x)-6 x^2 \cosh (2 x)-16 x^3 \coth (x)+48 x^2 \log \left (1-e^{2 x}\right )+48 x \text {PolyLog}\left (2,e^{2 x}\right )-24 \text {PolyLog}\left (3,e^{2 x}\right )+6 x \sinh (2 x)+4 x^3 \sinh (2 x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.97, size = 117, normalized size = 1.15
method | result | size |
risch | \(\frac {3 x^{4}}{8}+\left (-\frac {3}{32}+\frac {3}{16} x -\frac {3}{16} x^{2}+\frac {1}{8} x^{3}\right ) {\mathrm e}^{2 x}+\left (-\frac {3}{32}-\frac {3}{16} x -\frac {3}{16} x^{2}-\frac {1}{8} x^{3}\right ) {\mathrm e}^{-2 x}-\frac {2 x^{3}}{{\mathrm e}^{2 x}-1}-2 x^{3}+3 x^{2} \ln \left (1-{\mathrm e}^{x}\right )+6 x \polylog \left (2, {\mathrm e}^{x}\right )-6 \polylog \left (3, {\mathrm e}^{x}\right )+3 x^{2} \ln \left ({\mathrm e}^{x}+1\right )+6 x \polylog \left (2, -{\mathrm e}^{x}\right )-6 \polylog \left (3, -{\mathrm e}^{x}\right )\) | \(117\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 875 vs.
\(2 (84) = 168\).
time = 0.38, size = 875, normalized size = 8.58 \begin {gather*} \frac {{\left (4 \, x^{3} - 6 \, x^{2} + 6 \, x - 3\right )} \cosh \left (x\right )^{6} + 6 \, {\left (4 \, x^{3} - 6 \, x^{2} + 6 \, x - 3\right )} \cosh \left (x\right ) \sinh \left (x\right )^{5} + {\left (4 \, x^{3} - 6 \, x^{2} + 6 \, x - 3\right )} \sinh \left (x\right )^{6} + {\left (12 \, x^{4} - 68 \, x^{3} + 6 \, x^{2} - 6 \, x + 3\right )} \cosh \left (x\right )^{4} + {\left (12 \, x^{4} - 68 \, x^{3} + 15 \, {\left (4 \, x^{3} - 6 \, x^{2} + 6 \, x - 3\right )} \cosh \left (x\right )^{2} + 6 \, x^{2} - 6 \, x + 3\right )} \sinh \left (x\right )^{4} + 4 \, {\left (5 \, {\left (4 \, x^{3} - 6 \, x^{2} + 6 \, x - 3\right )} \cosh \left (x\right )^{3} + {\left (12 \, x^{4} - 68 \, x^{3} + 6 \, x^{2} - 6 \, x + 3\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + 4 \, x^{3} - {\left (12 \, x^{4} + 4 \, x^{3} + 6 \, x^{2} + 6 \, x + 3\right )} \cosh \left (x\right )^{2} + {\left (15 \, {\left (4 \, x^{3} - 6 \, x^{2} + 6 \, x - 3\right )} \cosh \left (x\right )^{4} - 12 \, x^{4} - 4 \, x^{3} + 6 \, {\left (12 \, x^{4} - 68 \, x^{3} + 6 \, x^{2} - 6 \, x + 3\right )} \cosh \left (x\right )^{2} - 6 \, x^{2} - 6 \, x - 3\right )} \sinh \left (x\right )^{2} + 6 \, x^{2} + 192 \, {\left (x \cosh \left (x\right )^{4} + 4 \, x \cosh \left (x\right ) \sinh \left (x\right )^{3} + x \sinh \left (x\right )^{4} - x \cosh \left (x\right )^{2} + {\left (6 \, x \cosh \left (x\right )^{2} - x\right )} \sinh \left (x\right )^{2} + 2 \, {\left (2 \, x \cosh \left (x\right )^{3} - x \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} {\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + 192 \, {\left (x \cosh \left (x\right )^{4} + 4 \, x \cosh \left (x\right ) \sinh \left (x\right )^{3} + x \sinh \left (x\right )^{4} - x \cosh \left (x\right )^{2} + {\left (6 \, x \cosh \left (x\right )^{2} - x\right )} \sinh \left (x\right )^{2} + 2 \, {\left (2 \, x \cosh \left (x\right )^{3} - x \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} {\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\right )\right ) + 96 \, {\left (x^{2} \cosh \left (x\right )^{4} + 4 \, x^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + x^{2} \sinh \left (x\right )^{4} - x^{2} \cosh \left (x\right )^{2} + {\left (6 \, x^{2} \cosh \left (x\right )^{2} - x^{2}\right )} \sinh \left (x\right )^{2} + 2 \, {\left (2 \, x^{2} \cosh \left (x\right )^{3} - x^{2} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + 96 \, {\left (x^{2} \cosh \left (x\right )^{4} + 4 \, x^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + x^{2} \sinh \left (x\right )^{4} - x^{2} \cosh \left (x\right )^{2} + {\left (6 \, x^{2} \cosh \left (x\right )^{2} - x^{2}\right )} \sinh \left (x\right )^{2} + 2 \, {\left (2 \, x^{2} \cosh \left (x\right )^{3} - x^{2} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) - 192 \, {\left (\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} + {\left (6 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{2} - \cosh \left (x\right )^{2} + 2 \, {\left (2 \, \cosh \left (x\right )^{3} - \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} {\rm polylog}\left (3, \cosh \left (x\right ) + \sinh \left (x\right )\right ) - 192 \, {\left (\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} + {\left (6 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{2} - \cosh \left (x\right )^{2} + 2 \, {\left (2 \, \cosh \left (x\right )^{3} - \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} {\rm polylog}\left (3, -\cosh \left (x\right ) - \sinh \left (x\right )\right ) + 2 \, {\left (3 \, {\left (4 \, x^{3} - 6 \, x^{2} + 6 \, x - 3\right )} \cosh \left (x\right )^{5} + 2 \, {\left (12 \, x^{4} - 68 \, x^{3} + 6 \, x^{2} - 6 \, x + 3\right )} \cosh \left (x\right )^{3} - {\left (12 \, x^{4} + 4 \, x^{3} + 6 \, x^{2} + 6 \, x + 3\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + 6 \, x + 3}{32 \, {\left (\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} + {\left (6 \, \cosh \left (x\right )^{2} - 1\right )} \sinh \left (x\right )^{2} - \cosh \left (x\right )^{2} + 2 \, {\left (2 \, \cosh \left (x\right )^{3} - \cosh \left (x\right )\right )} \sinh \left (x\right )\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} \cosh ^{2}{\left (x \right )} \coth ^{2}{\left (x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
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 {cosh}\left (x\right )}^2\,{\mathrm {coth}\left (x\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________