Optimal. Leaf size=307 \[ \frac {1}{3} x^3 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{6} x^3 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{6} x^3 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x^2 \text {PolyLog}\left (2,-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac {x^2 \text {PolyLog}\left (2,-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {x \text {PolyLog}\left (3,-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b^2}+\frac {x \text {PolyLog}\left (3,-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b^2}+\frac {\text {PolyLog}\left (4,-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{8 b^3}-\frac {\text {PolyLog}\left (4,-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{8 b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.33, antiderivative size = 307, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 6, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6379, 2221,
2611, 6744, 2320, 6724} \begin {gather*} \frac {\text {Li}_4\left (-\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{8 b^3}-\frac {\text {Li}_4\left (-\frac {(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{8 b^3}-\frac {x \text {Li}_3\left (-\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{4 b^2}+\frac {x \text {Li}_3\left (-\frac {(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{4 b^2}+\frac {x^2 \text {Li}_2\left (-\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{4 b}-\frac {x^2 \text {Li}_2\left (-\frac {(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{4 b}+\frac {1}{6} x^3 \log \left (\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}+1\right )-\frac {1}{6} x^3 \log \left (\frac {(c+d+1) e^{2 a+2 b x}}{c-d+1}+1\right )+\frac {1}{3} x^3 \coth ^{-1}(d \tanh (a+b x)+c) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 6379
Rule 6724
Rule 6744
Rubi steps
\begin {align*} \int x^2 \coth ^{-1}(c+d \tanh (a+b x)) \, dx &=\frac {1}{3} x^3 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{3} (b (1-c-d)) \int \frac {e^{2 a+2 b x} x^3}{1-c+d+(1-c-d) e^{2 a+2 b x}} \, dx-\frac {1}{3} (b (1+c+d)) \int \frac {e^{2 a+2 b x} x^3}{1+c-d+(1+c+d) e^{2 a+2 b x}} \, dx\\ &=\frac {1}{3} x^3 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{6} x^3 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{6} x^3 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )-\frac {1}{2} \int x^2 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right ) \, dx+\frac {1}{2} \int x^2 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right ) \, dx\\ &=\frac {1}{3} x^3 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{6} x^3 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{6} x^3 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x^2 \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac {x^2 \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {\int x \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right ) \, dx}{2 b}+\frac {\int x \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right ) \, dx}{2 b}\\ &=\frac {1}{3} x^3 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{6} x^3 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{6} x^3 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x^2 \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac {x^2 \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {x \text {Li}_3\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b^2}+\frac {x \text {Li}_3\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b^2}+\frac {\int \text {Li}_3\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right ) \, dx}{4 b^2}-\frac {\int \text {Li}_3\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right ) \, dx}{4 b^2}\\ &=\frac {1}{3} x^3 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{6} x^3 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{6} x^3 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x^2 \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac {x^2 \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {x \text {Li}_3\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b^2}+\frac {x \text {Li}_3\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b^2}+\frac {\text {Subst}\left (\int \frac {\text {Li}_3\left (-\frac {(-1+c+d) x}{-1+c-d}\right )}{x} \, dx,x,e^{2 a+2 b x}\right )}{8 b^3}-\frac {\text {Subst}\left (\int \frac {\text {Li}_3\left (-\frac {(1+c+d) x}{1+c-d}\right )}{x} \, dx,x,e^{2 a+2 b x}\right )}{8 b^3}\\ &=\frac {1}{3} x^3 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{6} x^3 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{6} x^3 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x^2 \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac {x^2 \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {x \text {Li}_3\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b^2}+\frac {x \text {Li}_3\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b^2}+\frac {\text {Li}_4\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{8 b^3}-\frac {\text {Li}_4\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{8 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.25, size = 271, normalized size = 0.88 \begin {gather*} \frac {1}{3} x^3 \coth ^{-1}(c+d \tanh (a+b x))+\frac {4 b^3 x^3 \log \left (1+\frac {(-1+c+d) e^{2 (a+b x)}}{-1+c-d}\right )-4 b^3 x^3 \log \left (1+\frac {(1+c+d) e^{2 (a+b x)}}{1+c-d}\right )+6 b^2 x^2 \text {PolyLog}\left (2,-\frac {(-1+c+d) e^{2 (a+b x)}}{-1+c-d}\right )-6 b^2 x^2 \text {PolyLog}\left (2,-\frac {(1+c+d) e^{2 (a+b x)}}{1+c-d}\right )-6 b x \text {PolyLog}\left (3,-\frac {(-1+c+d) e^{2 (a+b x)}}{-1+c-d}\right )+6 b x \text {PolyLog}\left (3,-\frac {(1+c+d) e^{2 (a+b x)}}{1+c-d}\right )+3 \text {PolyLog}\left (4,-\frac {(-1+c+d) e^{2 (a+b x)}}{-1+c-d}\right )-3 \text {PolyLog}\left (4,-\frac {(1+c+d) e^{2 (a+b x)}}{1+c-d}\right )}{24 b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 5.43, size = 5294, normalized size = 17.24
method | result | size |
risch | \(\text {Expression too large to display}\) | \(5294\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 281, normalized size = 0.92 \begin {gather*} \frac {1}{3} \, x^{3} \operatorname {arcoth}\left (d \tanh \left (b x + a\right ) + c\right ) - \frac {1}{18} \, b d {\left (\frac {4 \, b^{3} x^{3} \log \left (\frac {{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1} + 1\right ) + 6 \, b^{2} x^{2} {\rm Li}_2\left (-\frac {{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1}\right ) - 6 \, b x {\rm Li}_{3}(-\frac {{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1}) + 3 \, {\rm Li}_{4}(-\frac {{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1})}{b^{4} d} - \frac {4 \, b^{3} x^{3} \log \left (\frac {{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1} + 1\right ) + 6 \, b^{2} x^{2} {\rm Li}_2\left (-\frac {{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1}\right ) - 6 \, b x {\rm Li}_{3}(-\frac {{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1}) + 3 \, {\rm Li}_{4}(-\frac {{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1})}{b^{4} d}\right )} \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. 899 vs.
\(2 (263) = 526\).
time = 0.41, size = 899, normalized size = 2.93 \begin {gather*} \frac {b^{3} x^{3} \log \left (\frac {{\left (c + 1\right )} \cosh \left (b x + a\right ) + d \sinh \left (b x + a\right )}{{\left (c - 1\right )} \cosh \left (b x + a\right ) + d \sinh \left (b x + a\right )}\right ) - 3 \, b^{2} x^{2} {\rm Li}_2\left (\sqrt {-\frac {c + d + 1}{c - d + 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - 3 \, b^{2} x^{2} {\rm Li}_2\left (-\sqrt {-\frac {c + d + 1}{c - d + 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) + 3 \, b^{2} x^{2} {\rm Li}_2\left (\sqrt {-\frac {c + d - 1}{c - d - 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) + 3 \, b^{2} x^{2} {\rm Li}_2\left (-\sqrt {-\frac {c + d - 1}{c - d - 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) + a^{3} \log \left (2 \, {\left (c + d + 1\right )} \cosh \left (b x + a\right ) + 2 \, {\left (c + d + 1\right )} \sinh \left (b x + a\right ) + 2 \, {\left (c - d + 1\right )} \sqrt {-\frac {c + d + 1}{c - d + 1}}\right ) + a^{3} \log \left (2 \, {\left (c + d + 1\right )} \cosh \left (b x + a\right ) + 2 \, {\left (c + d + 1\right )} \sinh \left (b x + a\right ) - 2 \, {\left (c - d + 1\right )} \sqrt {-\frac {c + d + 1}{c - d + 1}}\right ) - a^{3} \log \left (2 \, {\left (c + d - 1\right )} \cosh \left (b x + a\right ) + 2 \, {\left (c + d - 1\right )} \sinh \left (b x + a\right ) + 2 \, {\left (c - d - 1\right )} \sqrt {-\frac {c + d - 1}{c - d - 1}}\right ) - a^{3} \log \left (2 \, {\left (c + d - 1\right )} \cosh \left (b x + a\right ) + 2 \, {\left (c + d - 1\right )} \sinh \left (b x + a\right ) - 2 \, {\left (c - d - 1\right )} \sqrt {-\frac {c + d - 1}{c - d - 1}}\right ) + 6 \, b x {\rm polylog}\left (3, \sqrt {-\frac {c + d + 1}{c - d + 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) + 6 \, b x {\rm polylog}\left (3, -\sqrt {-\frac {c + d + 1}{c - d + 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - 6 \, b x {\rm polylog}\left (3, \sqrt {-\frac {c + d - 1}{c - d - 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - 6 \, b x {\rm polylog}\left (3, -\sqrt {-\frac {c + d - 1}{c - d - 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - {\left (b^{3} x^{3} + a^{3}\right )} \log \left (\sqrt {-\frac {c + d + 1}{c - d + 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) - {\left (b^{3} x^{3} + a^{3}\right )} \log \left (-\sqrt {-\frac {c + d + 1}{c - d + 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) + {\left (b^{3} x^{3} + a^{3}\right )} \log \left (\sqrt {-\frac {c + d - 1}{c - d - 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) + {\left (b^{3} x^{3} + a^{3}\right )} \log \left (-\sqrt {-\frac {c + d - 1}{c - d - 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) - 6 \, {\rm polylog}\left (4, \sqrt {-\frac {c + d + 1}{c - d + 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - 6 \, {\rm polylog}\left (4, -\sqrt {-\frac {c + d + 1}{c - d + 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) + 6 \, {\rm polylog}\left (4, \sqrt {-\frac {c + d - 1}{c - d - 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) + 6 \, {\rm polylog}\left (4, -\sqrt {-\frac {c + d - 1}{c - d - 1}} {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right )}{6 \, b^{3}} \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 {acoth}{\left (c + d \tanh {\left (a + b 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.00 \begin {gather*} \int x^2\,\mathrm {acoth}\left (c+d\,\mathrm {tanh}\left (a+b\,x\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________