Optimal. Leaf size=135 \[ -\frac {2 i \text {Li}_3\left (-i e^{a+b x}\right )}{b^3}+\frac {2 i \text {Li}_3\left (i e^{a+b x}\right )}{b^3}+\frac {2 \sinh (a+b x)}{b^3}+\frac {2 i x \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}-\frac {2 i x \text {Li}_2\left (i e^{a+b x}\right )}{b^2}-\frac {2 x \cosh (a+b x)}{b^2}-\frac {2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {5449, 3296, 2637, 4180, 2531, 2282, 6589} \[ \frac {2 i x \text {PolyLog}\left (2,-i e^{a+b x}\right )}{b^2}-\frac {2 i x \text {PolyLog}\left (2,i e^{a+b x}\right )}{b^2}-\frac {2 i \text {PolyLog}\left (3,-i e^{a+b x}\right )}{b^3}+\frac {2 i \text {PolyLog}\left (3,i e^{a+b x}\right )}{b^3}+\frac {2 \sinh (a+b x)}{b^3}-\frac {2 x \cosh (a+b x)}{b^2}-\frac {2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 2531
Rule 2637
Rule 3296
Rule 4180
Rule 5449
Rule 6589
Rubi steps
\begin {align*} \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx &=\int x^2 \cosh (a+b x) \, dx-\int x^2 \text {sech}(a+b x) \, dx\\ &=-\frac {2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b}+\frac {(2 i) \int x \log \left (1-i e^{a+b x}\right ) \, dx}{b}-\frac {(2 i) \int x \log \left (1+i e^{a+b x}\right ) \, dx}{b}-\frac {2 \int x \sinh (a+b x) \, dx}{b}\\ &=-\frac {2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac {2 x \cosh (a+b x)}{b^2}+\frac {2 i x \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}-\frac {2 i x \text {Li}_2\left (i e^{a+b x}\right )}{b^2}+\frac {x^2 \sinh (a+b x)}{b}-\frac {(2 i) \int \text {Li}_2\left (-i e^{a+b x}\right ) \, dx}{b^2}+\frac {(2 i) \int \text {Li}_2\left (i e^{a+b x}\right ) \, dx}{b^2}+\frac {2 \int \cosh (a+b x) \, dx}{b^2}\\ &=-\frac {2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac {2 x \cosh (a+b x)}{b^2}+\frac {2 i x \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}-\frac {2 i x \text {Li}_2\left (i e^{a+b x}\right )}{b^2}+\frac {2 \sinh (a+b x)}{b^3}+\frac {x^2 \sinh (a+b x)}{b}-\frac {(2 i) \operatorname {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}+\frac {(2 i) \operatorname {Subst}\left (\int \frac {\text {Li}_2(i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}\\ &=-\frac {2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac {2 x \cosh (a+b x)}{b^2}+\frac {2 i x \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}-\frac {2 i x \text {Li}_2\left (i e^{a+b x}\right )}{b^2}-\frac {2 i \text {Li}_3\left (-i e^{a+b x}\right )}{b^3}+\frac {2 i \text {Li}_3\left (i e^{a+b x}\right )}{b^3}+\frac {2 \sinh (a+b x)}{b^3}+\frac {x^2 \sinh (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.47, size = 153, normalized size = 1.13 \[ -\frac {i \left (b^2 x^2 \log \left (1-i e^{a+b x}\right )-b^2 x^2 \log \left (1+i e^{a+b x}\right )+i b^2 x^2 \sinh (a+b x)-2 b x \text {Li}_2\left (-i e^{a+b x}\right )+2 b x \text {Li}_2\left (i e^{a+b x}\right )+2 \text {Li}_3\left (-i e^{a+b x}\right )-2 \text {Li}_3\left (i e^{a+b x}\right )+2 i \sinh (a+b x)-2 i b x \cosh (a+b x)\right )}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.51, size = 477, normalized size = 3.53 \[ -\frac {b^{2} x^{2} - {\left (b^{2} x^{2} - 2 \, b x + 2\right )} \cosh \left (b x + a\right )^{2} - 2 \, {\left (b^{2} x^{2} - 2 \, b x + 2\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) - {\left (b^{2} x^{2} - 2 \, b x + 2\right )} \sinh \left (b x + a\right )^{2} + 2 \, b x - {\left (-4 i \, b x \cosh \left (b x + a\right ) - 4 i \, b x \sinh \left (b x + a\right )\right )} {\rm Li}_2\left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) - {\left (4 i \, b x \cosh \left (b x + a\right ) + 4 i \, b x \sinh \left (b x + a\right )\right )} {\rm Li}_2\left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right ) - {\left (-2 i \, a^{2} \cosh \left (b x + a\right ) - 2 i \, a^{2} \sinh \left (b x + a\right )\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + i\right ) - {\left (2 i \, a^{2} \cosh \left (b x + a\right ) + 2 i \, a^{2} \sinh \left (b x + a\right )\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - i\right ) - {\left ({\left (2 i \, b^{2} x^{2} - 2 i \, a^{2}\right )} \cosh \left (b x + a\right ) + {\left (2 i \, b^{2} x^{2} - 2 i \, a^{2}\right )} \sinh \left (b x + a\right )\right )} \log \left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right ) + 1\right ) - {\left ({\left (-2 i \, b^{2} x^{2} + 2 i \, a^{2}\right )} \cosh \left (b x + a\right ) + {\left (-2 i \, b^{2} x^{2} + 2 i \, a^{2}\right )} \sinh \left (b x + a\right )\right )} \log \left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right ) + 1\right ) - {\left (4 i \, \cosh \left (b x + a\right ) + 4 i \, \sinh \left (b x + a\right )\right )} {\rm polylog}\left (3, i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) - {\left (-4 i \, \cosh \left (b x + a\right ) - 4 i \, \sinh \left (b x + a\right )\right )} {\rm polylog}\left (3, -i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right ) + 2}{2 \, {\left (b^{3} \cosh \left (b x + a\right ) + b^{3} \sinh \left (b x + a\right )\right )}} \]
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^{2} \operatorname {sech}\left (b x + a\right ) \sinh \left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.74, size = 0, normalized size = 0.00 \[ \int x^{2} \mathrm {sech}\left (b x +a \right ) \left (\sinh ^{2}\left (b x +a \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {{\left ({\left (b^{2} x^{2} e^{\left (2 \, a\right )} - 2 \, b x e^{\left (2 \, a\right )} + 2 \, e^{\left (2 \, a\right )}\right )} e^{\left (b x\right )} - {\left (b^{2} x^{2} + 2 \, b x + 2\right )} e^{\left (-b x\right )}\right )} e^{\left (-a\right )}}{2 \, b^{3}} - 2 \, \int \frac {x^{2} e^{\left (b x + a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {x^2\,{\mathrm {sinh}\left (a+b\,x\right )}^2}{\mathrm {cosh}\left (a+b\,x\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^{2} \sinh ^{2}{\left (a + b x \right )} \operatorname {sech}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________