Optimal. Leaf size=231 \[ -\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 \tanh ^{-1}(d \tanh (a+b x)+c) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.37, 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 = {6243, 2190, 2531, 2282, 6589} \[ -\frac {\text {PolyLog}\left (3,-\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{8 b^2}+\frac {\text {PolyLog}\left (3,-\frac {(c+d+1) e^{2 a+2 b x}}{c-d+1}\right )}{8 b^2}+\frac {x \text {PolyLog}\left (2,-\frac {(-c-d+1) e^{2 a+2 b x}}{-c+d+1}\right )}{4 b}-\frac {x \text {PolyLog}\left (2,-\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 \tanh ^{-1}(d \tanh (a+b x)+c) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2282
Rule 2531
Rule 6243
Rule 6589
Rubi steps
\begin {align*} \int x \tanh ^{-1}(c+d \tanh (a+b x)) \, dx &=\frac {1}{2} x^2 \tanh ^{-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 \tanh ^{-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 \tanh ^{-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 \tanh ^{-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 {\operatorname {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 {\operatorname {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 \tanh ^{-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 = 10.38, size = 259, normalized size = 1.12 \[ \frac {2 b^2 x^2 \log \left (\frac {(c-d-1) (\cosh (2 (a+b x))-\sinh (2 (a+b x)))}{c+d-1}+1\right )-2 b^2 x^2 \log \left (\frac {(c-d+1) (\cosh (2 (a+b x))-\sinh (2 (a+b x)))}{c+d+1}+1\right )-2 b x \text {Li}_2\left (\frac {(c-d-1) (\sinh (2 (a+b x))-\cosh (2 (a+b x)))}{c+d-1}\right )+2 b x \text {Li}_2\left (\frac {(c-d+1) (\sinh (2 (a+b x))-\cosh (2 (a+b x)))}{c+d+1}\right )-\text {Li}_3\left (\frac {(c-d-1) (\sinh (2 (a+b x))-\cosh (2 (a+b x)))}{c+d-1}\right )+\text {Li}_3\left (\frac {(c-d+1) (\sinh (2 (a+b x))-\cosh (2 (a+b x)))}{c+d+1}\right )}{8 b^2}+\frac {1}{2} x^2 \tanh ^{-1}(d \tanh (a+b x)+c) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.58, size = 746, normalized size = 3.23 \[ \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}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \operatorname {artanh}\left (d \tanh \left (b x + a\right ) + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 3.94, size = 5062, normalized size = 21.91 \[ \text {output too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.72, size = 215, normalized size = 0.93 \[ -\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 {artanh}\left (d \tanh \left (b x + a\right ) + c\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int x\,\mathrm {atanh}\left (c+d\,\mathrm {tanh}\left (a+b\,x\right )\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \operatorname {atanh}{\left (c + d \tanh {\left (a + b x \right )} \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________