Optimal. Leaf size=197 \[ \frac {4 x \text {ArcTan}\left (e^{a+b x}\right )}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {\tanh ^{-1}(\cosh (a+b x))}{b^3}-\frac {x \text {csch}(a+b x)}{b^2}+\frac {3 x \text {PolyLog}\left (2,-e^{a+b x}\right )}{b^2}-\frac {2 i \text {PolyLog}\left (2,-i e^{a+b x}\right )}{b^3}+\frac {2 i \text {PolyLog}\left (2,i e^{a+b x}\right )}{b^3}-\frac {3 x \text {PolyLog}\left (2,e^{a+b x}\right )}{b^2}-\frac {3 \text {PolyLog}\left (3,-e^{a+b x}\right )}{b^3}+\frac {3 \text {PolyLog}\left (3,e^{a+b x}\right )}{b^3}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps
used = 29, number of rules used = 19, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.950, Rules used = {2702, 294,
327, 213, 5570, 14, 6408, 12, 4267, 2611, 2320, 6724, 6874, 4265, 2317, 2438, 2701, 5311, 3855}
\begin {gather*} \frac {4 x \text {ArcTan}\left (e^{a+b x}\right )}{b^2}-\frac {2 i \text {Li}_2\left (-i e^{a+b x}\right )}{b^3}+\frac {2 i \text {Li}_2\left (i e^{a+b x}\right )}{b^3}-\frac {3 \text {Li}_3\left (-e^{a+b x}\right )}{b^3}+\frac {3 \text {Li}_3\left (e^{a+b x}\right )}{b^3}-\frac {\tanh ^{-1}(\cosh (a+b x))}{b^3}+\frac {3 x \text {Li}_2\left (-e^{a+b x}\right )}{b^2}-\frac {3 x \text {Li}_2\left (e^{a+b x}\right )}{b^2}-\frac {x \text {csch}(a+b x)}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 213
Rule 294
Rule 327
Rule 2317
Rule 2320
Rule 2438
Rule 2611
Rule 2701
Rule 2702
Rule 3855
Rule 4265
Rule 4267
Rule 5311
Rule 5570
Rule 6408
Rule 6724
Rule 6874
Rubi steps
\begin {align*} \int x^2 \text {csch}^3(a+b x) \text {sech}^2(a+b x) \, dx &=\frac {3 x^2 \tanh ^{-1}(\cosh (a+b x))}{2 b}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}-2 \int x \left (\frac {3 \tanh ^{-1}(\cosh (a+b x))}{2 b}-\frac {3 \text {sech}(a+b x)}{2 b}-\frac {\text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}\right ) \, dx\\ &=\frac {3 x^2 \tanh ^{-1}(\cosh (a+b x))}{2 b}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}-2 \int \left (\frac {3 x \tanh ^{-1}(\cosh (a+b x))}{2 b}-\frac {x \left (3+\text {csch}^2(a+b x)\right ) \text {sech}(a+b x)}{2 b}\right ) \, dx\\ &=\frac {3 x^2 \tanh ^{-1}(\cosh (a+b x))}{2 b}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}+\frac {\int x \left (3+\text {csch}^2(a+b x)\right ) \text {sech}(a+b x) \, dx}{b}-\frac {3 \int x \tanh ^{-1}(\cosh (a+b x)) \, dx}{b}\\ &=-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}+\frac {\int \left (3 x \text {sech}(a+b x)+x \text {csch}^2(a+b x) \text {sech}(a+b x)\right ) \, dx}{b}-\frac {3 \int b x^2 \text {csch}(a+b x) \, dx}{2 b}\\ &=-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}-\frac {3}{2} \int x^2 \text {csch}(a+b x) \, dx+\frac {\int x \text {csch}^2(a+b x) \text {sech}(a+b x) \, dx}{b}+\frac {3 \int x \text {sech}(a+b x) \, dx}{b}\\ &=\frac {6 x \tan ^{-1}\left (e^{a+b x}\right )}{b^2}-\frac {x \tan ^{-1}(\sinh (a+b x))}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {x \text {csch}(a+b x)}{b^2}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}-\frac {(3 i) \int \log \left (1-i e^{a+b x}\right ) \, dx}{b^2}+\frac {(3 i) \int \log \left (1+i e^{a+b x}\right ) \, dx}{b^2}-\frac {\int \left (-\frac {\tan ^{-1}(\sinh (a+b x))}{b}-\frac {\text {csch}(a+b x)}{b}\right ) \, dx}{b}+\frac {3 \int x \log \left (1-e^{a+b x}\right ) \, dx}{b}-\frac {3 \int x \log \left (1+e^{a+b x}\right ) \, dx}{b}\\ &=\frac {6 x \tan ^{-1}\left (e^{a+b x}\right )}{b^2}-\frac {x \tan ^{-1}(\sinh (a+b x))}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {x \text {csch}(a+b x)}{b^2}+\frac {3 x \text {Li}_2\left (-e^{a+b x}\right )}{b^2}-\frac {3 x \text {Li}_2\left (e^{a+b x}\right )}{b^2}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}-\frac {(3 i) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}+\frac {(3 i) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}+\frac {\int \tan ^{-1}(\sinh (a+b x)) \, dx}{b^2}+\frac {\int \text {csch}(a+b x) \, dx}{b^2}-\frac {3 \int \text {Li}_2\left (-e^{a+b x}\right ) \, dx}{b^2}+\frac {3 \int \text {Li}_2\left (e^{a+b x}\right ) \, dx}{b^2}\\ &=\frac {6 x \tan ^{-1}\left (e^{a+b x}\right )}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {\tanh ^{-1}(\cosh (a+b x))}{b^3}-\frac {x \text {csch}(a+b x)}{b^2}+\frac {3 x \text {Li}_2\left (-e^{a+b x}\right )}{b^2}-\frac {3 i \text {Li}_2\left (-i e^{a+b x}\right )}{b^3}+\frac {3 i \text {Li}_2\left (i e^{a+b x}\right )}{b^3}-\frac {3 x \text {Li}_2\left (e^{a+b x}\right )}{b^2}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}-\frac {3 \text {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}+\frac {3 \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}-\frac {\int b x \text {sech}(a+b x) \, dx}{b^2}\\ &=\frac {6 x \tan ^{-1}\left (e^{a+b x}\right )}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {\tanh ^{-1}(\cosh (a+b x))}{b^3}-\frac {x \text {csch}(a+b x)}{b^2}+\frac {3 x \text {Li}_2\left (-e^{a+b x}\right )}{b^2}-\frac {3 i \text {Li}_2\left (-i e^{a+b x}\right )}{b^3}+\frac {3 i \text {Li}_2\left (i e^{a+b x}\right )}{b^3}-\frac {3 x \text {Li}_2\left (e^{a+b x}\right )}{b^2}-\frac {3 \text {Li}_3\left (-e^{a+b x}\right )}{b^3}+\frac {3 \text {Li}_3\left (e^{a+b x}\right )}{b^3}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}-\frac {\int x \text {sech}(a+b x) \, dx}{b}\\ &=\frac {4 x \tan ^{-1}\left (e^{a+b x}\right )}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {\tanh ^{-1}(\cosh (a+b x))}{b^3}-\frac {x \text {csch}(a+b x)}{b^2}+\frac {3 x \text {Li}_2\left (-e^{a+b x}\right )}{b^2}-\frac {3 i \text {Li}_2\left (-i e^{a+b x}\right )}{b^3}+\frac {3 i \text {Li}_2\left (i e^{a+b x}\right )}{b^3}-\frac {3 x \text {Li}_2\left (e^{a+b x}\right )}{b^2}-\frac {3 \text {Li}_3\left (-e^{a+b x}\right )}{b^3}+\frac {3 \text {Li}_3\left (e^{a+b x}\right )}{b^3}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}+\frac {i \int \log \left (1-i e^{a+b x}\right ) \, dx}{b^2}-\frac {i \int \log \left (1+i e^{a+b x}\right ) \, dx}{b^2}\\ &=\frac {4 x \tan ^{-1}\left (e^{a+b x}\right )}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {\tanh ^{-1}(\cosh (a+b x))}{b^3}-\frac {x \text {csch}(a+b x)}{b^2}+\frac {3 x \text {Li}_2\left (-e^{a+b x}\right )}{b^2}-\frac {3 i \text {Li}_2\left (-i e^{a+b x}\right )}{b^3}+\frac {3 i \text {Li}_2\left (i e^{a+b x}\right )}{b^3}-\frac {3 x \text {Li}_2\left (e^{a+b x}\right )}{b^2}-\frac {3 \text {Li}_3\left (-e^{a+b x}\right )}{b^3}+\frac {3 \text {Li}_3\left (e^{a+b x}\right )}{b^3}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}+\frac {i \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}-\frac {i \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}\\ &=\frac {4 x \tan ^{-1}\left (e^{a+b x}\right )}{b^2}+\frac {3 x^2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {\tanh ^{-1}(\cosh (a+b x))}{b^3}-\frac {x \text {csch}(a+b x)}{b^2}+\frac {3 x \text {Li}_2\left (-e^{a+b x}\right )}{b^2}-\frac {2 i \text {Li}_2\left (-i e^{a+b x}\right )}{b^3}+\frac {2 i \text {Li}_2\left (i e^{a+b x}\right )}{b^3}-\frac {3 x \text {Li}_2\left (e^{a+b x}\right )}{b^2}-\frac {3 \text {Li}_3\left (-e^{a+b x}\right )}{b^3}+\frac {3 \text {Li}_3\left (e^{a+b x}\right )}{b^3}-\frac {3 x^2 \text {sech}(a+b x)}{2 b}-\frac {x^2 \text {csch}^2(a+b x) \text {sech}(a+b x)}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(425\) vs. \(2(197)=394\).
time = 7.54, size = 425, normalized size = 2.16 \begin {gather*} -\frac {x \text {csch}(a)}{b^2}-\frac {x^2 \text {csch}^2\left (\frac {a}{2}+\frac {b x}{2}\right )}{8 b}+\frac {2 \left (-\left (\left (-i a+\frac {\pi }{2}-i b x\right ) \left (\log \left (1-e^{i \left (-i a+\frac {\pi }{2}-i b x\right )}\right )-\log \left (1+e^{i \left (-i a+\frac {\pi }{2}-i b x\right )}\right )\right )\right )+\left (-i a+\frac {\pi }{2}\right ) \log \left (\tan \left (\frac {1}{2} \left (-i a+\frac {\pi }{2}-i b x\right )\right )\right )-i \left (\text {PolyLog}\left (2,-e^{i \left (-i a+\frac {\pi }{2}-i b x\right )}\right )-\text {PolyLog}\left (2,e^{i \left (-i a+\frac {\pi }{2}-i b x\right )}\right )\right )\right )}{b^3}-\frac {4 \tanh ^{-1}\left (e^{a+b x}\right )+3 b^2 x^2 \log \left (1-e^{a+b x}\right )-3 b^2 x^2 \log \left (1+e^{a+b x}\right )-6 b x \text {PolyLog}\left (2,-e^{a+b x}\right )+6 b x \text {PolyLog}\left (2,e^{a+b x}\right )+6 \text {PolyLog}\left (3,-e^{a+b x}\right )-6 \text {PolyLog}\left (3,e^{a+b x}\right )}{2 b^3}-\frac {x^2 \text {sech}^2\left (\frac {a}{2}+\frac {b x}{2}\right )}{8 b}-\frac {x^2 \text {sech}(a+b x)}{b}+\frac {x \text {csch}\left (\frac {a}{2}\right ) \text {csch}\left (\frac {a}{2}+\frac {b x}{2}\right ) \sinh \left (\frac {b x}{2}\right )}{2 b^2}+\frac {x \text {sech}\left (\frac {a}{2}\right ) \text {sech}\left (\frac {a}{2}+\frac {b x}{2}\right ) \sinh \left (\frac {b x}{2}\right )}{2 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.58, size = 0, normalized size = 0.00 \[\int x^{2} \mathrm {csch}\left (b x +a \right )^{3} \mathrm {sech}\left (b x +a \right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 3804 vs. \(2 (173) = 346\).
time = 0.44, size = 3804, normalized size = 19.31 \begin {gather*} \text {Too large to display} \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 {csch}^{3}{\left (a + b x \right )} \operatorname {sech}^{2}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: AttributeError} \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 \frac {x^2}{{\mathrm {cosh}\left (a+b\,x\right )}^2\,{\mathrm {sinh}\left (a+b\,x\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________