Optimal. Leaf size=77 \[ -\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {PolyLog}\left (2,-e^x\right )+x^2 \text {PolyLog}\left (2,e^x\right )+2 x \text {PolyLog}\left (3,-e^x\right )-2 x \text {PolyLog}\left (3,e^x\right )-2 \text {PolyLog}\left (4,-e^x\right )+2 \text {PolyLog}\left (4,e^x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 6, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {6408, 4267,
2611, 6744, 2320, 6724} \begin {gather*} -x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 x \text {Li}_3\left (-e^x\right )-2 x \text {Li}_3\left (e^x\right )-2 \text {Li}_4\left (-e^x\right )+2 \text {Li}_4\left (e^x\right )-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2320
Rule 2611
Rule 4267
Rule 6408
Rule 6724
Rule 6744
Rubi steps
\begin {align*} \int x^2 \tanh ^{-1}(\cosh (x)) \, dx &=\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))+\frac {1}{3} \int x^3 \text {csch}(x) \, dx\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-\int x^2 \log \left (1-e^x\right ) \, dx+\int x^2 \log \left (1+e^x\right ) \, dx\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 \int x \text {Li}_2\left (-e^x\right ) \, dx-2 \int x \text {Li}_2\left (e^x\right ) \, dx\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 x \text {Li}_3\left (-e^x\right )-2 x \text {Li}_3\left (e^x\right )-2 \int \text {Li}_3\left (-e^x\right ) \, dx+2 \int \text {Li}_3\left (e^x\right ) \, dx\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 x \text {Li}_3\left (-e^x\right )-2 x \text {Li}_3\left (e^x\right )-2 \text {Subst}\left (\int \frac {\text {Li}_3(-x)}{x} \, dx,x,e^x\right )+2 \text {Subst}\left (\int \frac {\text {Li}_3(x)}{x} \, dx,x,e^x\right )\\ &=-\frac {2}{3} x^3 \tanh ^{-1}\left (e^x\right )+\frac {1}{3} x^3 \tanh ^{-1}(\cosh (x))-x^2 \text {Li}_2\left (-e^x\right )+x^2 \text {Li}_2\left (e^x\right )+2 x \text {Li}_3\left (-e^x\right )-2 x \text {Li}_3\left (e^x\right )-2 \text {Li}_4\left (-e^x\right )+2 \text {Li}_4\left (e^x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 109, normalized size = 1.42 \begin {gather*} \frac {1}{24} \left (\pi ^4-2 x^4+8 x^3 \tanh ^{-1}(\cosh (x))-8 x^3 \log \left (1+e^{-x}\right )+8 x^3 \log \left (1-e^x\right )+24 x^2 \text {PolyLog}\left (2,-e^{-x}\right )+24 x^2 \text {PolyLog}\left (2,e^x\right )+48 x \text {PolyLog}\left (3,-e^{-x}\right )-48 x \text {PolyLog}\left (3,e^x\right )+48 \text {PolyLog}\left (4,-e^{-x}\right )+48 \text {PolyLog}\left (4,e^x\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.17, size = 501, normalized size = 6.51
method | result | size |
risch | \(-\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2} x^{3}}{12}-\frac {i \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right ) x^{3}}{12}+2 x \polylog \left (3, -{\mathrm e}^{x}\right )-2 x \polylog \left (3, {\mathrm e}^{x}\right )-2 \polylog \left (4, -{\mathrm e}^{x}\right )+2 \polylog \left (4, {\mathrm e}^{x}\right )+x^{2} \polylog \left (2, {\mathrm e}^{x}\right )-x^{2} \polylog \left (2, -{\mathrm e}^{x}\right )+\frac {x^{3} \ln \left (1-{\mathrm e}^{x}\right )}{3}-\frac {x^{3} \ln \left ({\mathrm e}^{x}-1\right )}{3}-\frac {i \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )\right )^{2} \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right ) x^{3}}{12}-\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{3} x^{3}}{12}+\frac {i \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )\right )^{2} \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right ) x^{3}}{12}-\frac {i \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2} x^{3}}{6}-\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right )^{3} x^{3}}{12}-\frac {i \pi \,x^{3}}{6}+\frac {i \pi \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2} x^{3}}{6}+\frac {i \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right )^{2} x^{3}}{12}-\frac {i \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right )^{3} x^{3}}{12}+\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}+1\right )^{2}\right )^{2} x^{3}}{12}+\frac {i \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{x}+1\right )^{2}\right )^{2} x^{3}}{6}+\frac {i \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right ) x^{3}}{12}-\frac {i \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left ({\mathrm e}^{x}-1\right )^{2}\right )^{2} x^{3}}{12}+\frac {i \pi \mathrm {csgn}\left (i \left ({\mathrm e}^{x}-1\right )^{2}\right )^{3} x^{3}}{12}\) | \(501\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 78, normalized size = 1.01 \begin {gather*} \frac {1}{3} \, x^{3} \operatorname {artanh}\left (\cosh \left (x\right )\right ) - \frac {1}{3} \, x^{3} \log \left (e^{x} + 1\right ) + \frac {1}{3} \, x^{3} \log \left (-e^{x} + 1\right ) - x^{2} {\rm Li}_2\left (-e^{x}\right ) + x^{2} {\rm Li}_2\left (e^{x}\right ) + 2 \, x {\rm Li}_{3}(-e^{x}) - 2 \, x {\rm Li}_{3}(e^{x}) - 2 \, {\rm Li}_{4}(-e^{x}) + 2 \, {\rm Li}_{4}(e^{x}) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 118, normalized size = 1.53 \begin {gather*} \frac {1}{6} \, x^{3} \log \left (-\frac {\cosh \left (x\right ) + 1}{\cosh \left (x\right ) - 1}\right ) - \frac {1}{3} \, x^{3} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + \frac {1}{3} \, x^{3} \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) + x^{2} {\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - x^{2} {\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\right )\right ) - 2 \, x {\rm polylog}\left (3, \cosh \left (x\right ) + \sinh \left (x\right )\right ) + 2 \, x {\rm polylog}\left (3, -\cosh \left (x\right ) - \sinh \left (x\right )\right ) + 2 \, {\rm polylog}\left (4, \cosh \left (x\right ) + \sinh \left (x\right )\right ) - 2 \, {\rm polylog}\left (4, -\cosh \left (x\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^{2} \operatorname {atanh}{\left (\cosh {\left (x \right )} \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^2\,\mathrm {atanh}\left (\mathrm {cosh}\left (x\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________