Optimal. Leaf size=231 \[ \frac {1}{2} x^2 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{4} x^2 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{4} x^2 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x \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 (2,-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {\text {PolyLog}\left (3,-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{8 b^2}+\frac {\text {PolyLog}\left (3,-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{8 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {6379, 2221,
2611, 2320, 6724} \begin {gather*} -\frac {\text {Li}_3\left (-\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{8 b^2}+\frac {\text {Li}_3\left (-\frac {(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{8 b^2}+\frac {x \text {Li}_2\left (-\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{4 b}-\frac {x \text {Li}_2\left (-\frac {(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{4 b}+\frac {1}{4} x^2 \log \left (\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}+1\right )-\frac {1}{4} x^2 \log \left (\frac {(c+d+1) e^{2 a+2 b x}}{c-d+1}+1\right )+\frac {1}{2} x^2 \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
Rubi steps
\begin {align*} \int x \coth ^{-1}(c+d \tanh (a+b x)) \, dx &=\frac {1}{2} x^2 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{2} (b (1-c-d)) \int \frac {e^{2 a+2 b x} x^2}{1-c+d+(1-c-d) e^{2 a+2 b x}} \, dx-\frac {1}{2} (b (1+c+d)) \int \frac {e^{2 a+2 b x} x^2}{1+c-d+(1+c+d) e^{2 a+2 b x}} \, dx\\ &=\frac {1}{2} x^2 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{4} x^2 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{4} x^2 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )-\frac {1}{2} \int x \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right ) \, dx+\frac {1}{2} \int x \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right ) \, dx\\ &=\frac {1}{2} x^2 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{4} x^2 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{4} x^2 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac {x \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {\int \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right ) \, dx}{4 b}+\frac {\int \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right ) \, dx}{4 b}\\ &=\frac {1}{2} x^2 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{4} x^2 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{4} x^2 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac {x \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {\text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {(-1+c+d) x}{-1+c-d}\right )}{x} \, dx,x,e^{2 a+2 b x}\right )}{8 b^2}+\frac {\text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {(1+c+d) x}{1+c-d}\right )}{x} \, dx,x,e^{2 a+2 b x}\right )}{8 b^2}\\ &=\frac {1}{2} x^2 \coth ^{-1}(c+d \tanh (a+b x))+\frac {1}{4} x^2 \log \left (1+\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )-\frac {1}{4} x^2 \log \left (1+\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )+\frac {x \text {Li}_2\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{4 b}-\frac {x \text {Li}_2\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{4 b}-\frac {\text {Li}_3\left (-\frac {(1-c-d) e^{2 a+2 b x}}{1-c+d}\right )}{8 b^2}+\frac {\text {Li}_3\left (-\frac {(1+c+d) e^{2 a+2 b x}}{1+c-d}\right )}{8 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 203, normalized size = 0.88 \begin {gather*} \frac {1}{2} x^2 \coth ^{-1}(c+d \tanh (a+b x))+\frac {2 b^2 x^2 \log \left (1+\frac {(-1+c+d) e^{2 (a+b x)}}{-1+c-d}\right )-2 b^2 x^2 \log \left (1+\frac {(1+c+d) e^{2 (a+b x)}}{1+c-d}\right )+2 b x \text {PolyLog}\left (2,-\frac {(-1+c+d) e^{2 (a+b x)}}{-1+c-d}\right )-2 b x \text {PolyLog}\left (2,-\frac {(1+c+d) e^{2 (a+b x)}}{1+c-d}\right )-\text {PolyLog}\left (3,-\frac {(-1+c+d) e^{2 (a+b x)}}{-1+c-d}\right )+\text {PolyLog}\left (3,-\frac {(1+c+d) e^{2 (a+b x)}}{1+c-d}\right )}{8 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.37, size = 4990, normalized size = 21.60
method | result | size |
risch | \(\text {Expression too large to display}\) | \(4990\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 215, normalized size = 0.93 \begin {gather*} -\frac {1}{8} \, b d {\left (\frac {2 \, b^{2} x^{2} \log \left (\frac {{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1} + 1\right ) + 2 \, b x {\rm Li}_2\left (-\frac {{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1}\right ) - {\rm Li}_{3}(-\frac {{\left (c + d + 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d + 1})}{b^{3} d} - \frac {2 \, b^{2} x^{2} \log \left (\frac {{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1} + 1\right ) + 2 \, b x {\rm Li}_2\left (-\frac {{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1}\right ) - {\rm Li}_{3}(-\frac {{\left (c + d - 1\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c - d - 1})}{b^{3} d}\right )} + \frac {1}{2} \, x^{2} \operatorname {arcoth}\left (d \tanh \left (b x + a\right ) + c\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. 745 vs.
\(2 (197) = 394\).
time = 0.38, size = 745, normalized size = 3.23 \begin {gather*} \frac {b^{2} x^{2} \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 ) - 2 \, b x {\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 ) - 2 \, b x {\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 ) + 2 \, b x {\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 ) + 2 \, b x {\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^{2} \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^{2} \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^{2} \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^{2} \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 ) - {\left (b^{2} x^{2} - a^{2}\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^{2} x^{2} - a^{2}\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^{2} x^{2} - a^{2}\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^{2} x^{2} - a^{2}\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 ) + 2 \, {\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 ) + 2 \, {\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 ) - 2 \, {\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 ) - 2 \, {\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 )}{4 \, b^{2}} \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 \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\,\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]
________________________________________________________________________________________