Optimal. Leaf size=187 \[ x^2 \sqrt {a \text {sech}^2(x)}-4 x \text {ArcTan}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x^2 \tanh ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x \cosh (x) \text {PolyLog}\left (2,-e^x\right ) \sqrt {a \text {sech}^2(x)}+2 i \cosh (x) \text {PolyLog}\left (2,-i e^x\right ) \sqrt {a \text {sech}^2(x)}-2 i \cosh (x) \text {PolyLog}\left (2,i e^x\right ) \sqrt {a \text {sech}^2(x)}+2 x \cosh (x) \text {PolyLog}\left (2,e^x\right ) \sqrt {a \text {sech}^2(x)}+2 \cosh (x) \text {PolyLog}\left (3,-e^x\right ) \sqrt {a \text {sech}^2(x)}-2 \cosh (x) \text {PolyLog}\left (3,e^x\right ) \sqrt {a \text {sech}^2(x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.36, antiderivative size = 187, normalized size of antiderivative = 1.00, number of
steps used = 17, number of rules used = 14, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.778, Rules used
= {6852, 2702, 327, 213, 5570, 14, 6408, 4267, 2611, 2320, 6724, 4265, 2317, 2438}
\begin {gather*} -4 x \text {ArcTan}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x \text {Li}_2\left (-e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}+2 x \text {Li}_2\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}+2 i \text {Li}_2\left (-i e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 i \text {Li}_2\left (i e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}+2 \text {Li}_3\left (-e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 \text {Li}_3\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}+x^2 \sqrt {a \text {sech}^2(x)}-2 x^2 \cosh (x) \tanh ^{-1}\left (e^x\right ) \sqrt {a \text {sech}^2(x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 213
Rule 327
Rule 2317
Rule 2320
Rule 2438
Rule 2611
Rule 2702
Rule 4265
Rule 4267
Rule 5570
Rule 6408
Rule 6724
Rule 6852
Rubi steps
\begin {align*} \int x^2 \text {csch}(x) \text {sech}(x) \sqrt {a \text {sech}^2(x)} \, dx &=\left (\cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int x^2 \text {csch}(x) \text {sech}^2(x) \, dx\\ &=x^2 \sqrt {a \text {sech}^2(x)}-x^2 \tanh ^{-1}(\cosh (x)) \cosh (x) \sqrt {a \text {sech}^2(x)}-\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int x \left (-\tanh ^{-1}(\cosh (x))+\text {sech}(x)\right ) \, dx\\ &=x^2 \sqrt {a \text {sech}^2(x)}-x^2 \tanh ^{-1}(\cosh (x)) \cosh (x) \sqrt {a \text {sech}^2(x)}-\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int \left (-x \tanh ^{-1}(\cosh (x))+x \text {sech}(x)\right ) \, dx\\ &=x^2 \sqrt {a \text {sech}^2(x)}-x^2 \tanh ^{-1}(\cosh (x)) \cosh (x) \sqrt {a \text {sech}^2(x)}+\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int x \tanh ^{-1}(\cosh (x)) \, dx-\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int x \text {sech}(x) \, dx\\ &=x^2 \sqrt {a \text {sech}^2(x)}-4 x \tan ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}+\left (2 i \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int \log \left (1-i e^x\right ) \, dx-\left (2 i \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int \log \left (1+i e^x\right ) \, dx+\left (\cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int x^2 \text {csch}(x) \, dx\\ &=x^2 \sqrt {a \text {sech}^2(x)}-4 x \tan ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x^2 \tanh ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}+\left (2 i \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^x\right )-\left (2 i \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^x\right )-\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int x \log \left (1-e^x\right ) \, dx+\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int x \log \left (1+e^x\right ) \, dx\\ &=x^2 \sqrt {a \text {sech}^2(x)}-4 x \tan ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x^2 \tanh ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x \cosh (x) \text {Li}_2\left (-e^x\right ) \sqrt {a \text {sech}^2(x)}+2 i \cosh (x) \text {Li}_2\left (-i e^x\right ) \sqrt {a \text {sech}^2(x)}-2 i \cosh (x) \text {Li}_2\left (i e^x\right ) \sqrt {a \text {sech}^2(x)}+2 x \cosh (x) \text {Li}_2\left (e^x\right ) \sqrt {a \text {sech}^2(x)}+\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int \text {Li}_2\left (-e^x\right ) \, dx-\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \int \text {Li}_2\left (e^x\right ) \, dx\\ &=x^2 \sqrt {a \text {sech}^2(x)}-4 x \tan ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x^2 \tanh ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x \cosh (x) \text {Li}_2\left (-e^x\right ) \sqrt {a \text {sech}^2(x)}+2 i \cosh (x) \text {Li}_2\left (-i e^x\right ) \sqrt {a \text {sech}^2(x)}-2 i \cosh (x) \text {Li}_2\left (i e^x\right ) \sqrt {a \text {sech}^2(x)}+2 x \cosh (x) \text {Li}_2\left (e^x\right ) \sqrt {a \text {sech}^2(x)}+\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^x\right )-\left (2 \cosh (x) \sqrt {a \text {sech}^2(x)}\right ) \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^x\right )\\ &=x^2 \sqrt {a \text {sech}^2(x)}-4 x \tan ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x^2 \tanh ^{-1}\left (e^x\right ) \cosh (x) \sqrt {a \text {sech}^2(x)}-2 x \cosh (x) \text {Li}_2\left (-e^x\right ) \sqrt {a \text {sech}^2(x)}+2 i \cosh (x) \text {Li}_2\left (-i e^x\right ) \sqrt {a \text {sech}^2(x)}-2 i \cosh (x) \text {Li}_2\left (i e^x\right ) \sqrt {a \text {sech}^2(x)}+2 x \cosh (x) \text {Li}_2\left (e^x\right ) \sqrt {a \text {sech}^2(x)}+2 \cosh (x) \text {Li}_3\left (-e^x\right ) \sqrt {a \text {sech}^2(x)}-2 \cosh (x) \text {Li}_3\left (e^x\right ) \sqrt {a \text {sech}^2(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 154, normalized size = 0.82 \begin {gather*} \left (x^2+2 i x \cosh (x) \left (\log \left (1-i e^{-x}\right )-\log \left (1+i e^{-x}\right )\right )+x^2 \cosh (x) \left (\log \left (1-e^{-x}\right )-\log \left (1+e^{-x}\right )\right )+2 i \cosh (x) \left (\text {PolyLog}\left (2,-i e^{-x}\right )-\text {PolyLog}\left (2,i e^{-x}\right )\right )+2 x \cosh (x) \left (\text {PolyLog}\left (2,-e^{-x}\right )-\text {PolyLog}\left (2,e^{-x}\right )\right )+2 \cosh (x) \left (\text {PolyLog}\left (3,-e^{-x}\right )-\text {PolyLog}\left (3,e^{-x}\right )\right )\right ) \sqrt {a \text {sech}^2(x)} \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 (x \right ) \mathrm {sech}\left (x \right ) \sqrt {a \mathrm {sech}\left (x \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. 786 vs. \(2 (149) = 298\).
time = 0.41, size = 786, normalized size = 4.20 \begin {gather*} -\frac {2 \, {\left ({\left (e^{\left (2 \, x\right )} + 1\right )} \sinh \left (x\right )^{2} + \cosh \left (x\right )^{2} + {\left (\cosh \left (x\right )^{2} + 1\right )} e^{\left (2 \, x\right )} + 2 \, {\left (\cosh \left (x\right ) e^{\left (2 \, x\right )} + \cosh \left (x\right )\right )} \sinh \left (x\right ) + 1\right )} \sqrt {\frac {a}{e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 1}} e^{x} {\rm polylog}\left (3, \cosh \left (x\right ) + \sinh \left (x\right )\right ) - 2 \, {\left ({\left (e^{\left (2 \, x\right )} + 1\right )} \sinh \left (x\right )^{2} + \cosh \left (x\right )^{2} + {\left (\cosh \left (x\right )^{2} + 1\right )} e^{\left (2 \, x\right )} + 2 \, {\left (\cosh \left (x\right ) e^{\left (2 \, x\right )} + \cosh \left (x\right )\right )} \sinh \left (x\right ) + 1\right )} \sqrt {\frac {a}{e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 1}} e^{x} {\rm polylog}\left (3, -\cosh \left (x\right ) - \sinh \left (x\right )\right ) - {\left (2 \, x^{2} \cosh \left (x\right ) e^{\left (2 \, x\right )} + 2 \, x^{2} \cosh \left (x\right ) + 2 \, {\left (x \cosh \left (x\right )^{2} + {\left (x e^{\left (2 \, x\right )} + x\right )} \sinh \left (x\right )^{2} + {\left (x \cosh \left (x\right )^{2} + x\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x \cosh \left (x\right ) e^{\left (2 \, x\right )} + x \cosh \left (x\right )\right )} \sinh \left (x\right ) + x\right )} {\rm Li}_2\left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) - 2 \, {\left ({\left (i \, e^{\left (2 \, x\right )} + i\right )} \sinh \left (x\right )^{2} + i \, \cosh \left (x\right )^{2} + {\left (i \, \cosh \left (x\right )^{2} + i\right )} e^{\left (2 \, x\right )} + 2 \, {\left (i \, \cosh \left (x\right ) e^{\left (2 \, x\right )} + i \, \cosh \left (x\right )\right )} \sinh \left (x\right ) + i\right )} {\rm Li}_2\left (i \, \cosh \left (x\right ) + i \, \sinh \left (x\right )\right ) - 2 \, {\left ({\left (-i \, e^{\left (2 \, x\right )} - i\right )} \sinh \left (x\right )^{2} - i \, \cosh \left (x\right )^{2} + {\left (-i \, \cosh \left (x\right )^{2} - i\right )} e^{\left (2 \, x\right )} + 2 \, {\left (-i \, \cosh \left (x\right ) e^{\left (2 \, x\right )} - i \, \cosh \left (x\right )\right )} \sinh \left (x\right ) - i\right )} {\rm Li}_2\left (-i \, \cosh \left (x\right ) - i \, \sinh \left (x\right )\right ) - 2 \, {\left (x \cosh \left (x\right )^{2} + {\left (x e^{\left (2 \, x\right )} + x\right )} \sinh \left (x\right )^{2} + {\left (x \cosh \left (x\right )^{2} + x\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x \cosh \left (x\right ) e^{\left (2 \, x\right )} + x \cosh \left (x\right )\right )} \sinh \left (x\right ) + x\right )} {\rm Li}_2\left (-\cosh \left (x\right ) - \sinh \left (x\right )\right ) - {\left (x^{2} \cosh \left (x\right )^{2} + {\left (x^{2} e^{\left (2 \, x\right )} + x^{2}\right )} \sinh \left (x\right )^{2} + x^{2} + {\left (x^{2} \cosh \left (x\right )^{2} + x^{2}\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x^{2} \cosh \left (x\right ) e^{\left (2 \, x\right )} + x^{2} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) - 2 \, {\left (-i \, x \cosh \left (x\right )^{2} + {\left (-i \, x e^{\left (2 \, x\right )} - i \, x\right )} \sinh \left (x\right )^{2} + {\left (-i \, x \cosh \left (x\right )^{2} - i \, x\right )} e^{\left (2 \, x\right )} + 2 \, {\left (-i \, x \cosh \left (x\right ) e^{\left (2 \, x\right )} - i \, x \cosh \left (x\right )\right )} \sinh \left (x\right ) - i \, x\right )} \log \left (i \, \cosh \left (x\right ) + i \, \sinh \left (x\right ) + 1\right ) - 2 \, {\left (i \, x \cosh \left (x\right )^{2} + {\left (i \, x e^{\left (2 \, x\right )} + i \, x\right )} \sinh \left (x\right )^{2} + {\left (i \, x \cosh \left (x\right )^{2} + i \, x\right )} e^{\left (2 \, x\right )} + 2 \, {\left (i \, x \cosh \left (x\right ) e^{\left (2 \, x\right )} + i \, x \cosh \left (x\right )\right )} \sinh \left (x\right ) + i \, x\right )} \log \left (-i \, \cosh \left (x\right ) - i \, \sinh \left (x\right ) + 1\right ) + {\left (x^{2} \cosh \left (x\right )^{2} + {\left (x^{2} e^{\left (2 \, x\right )} + x^{2}\right )} \sinh \left (x\right )^{2} + x^{2} + {\left (x^{2} \cosh \left (x\right )^{2} + x^{2}\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x^{2} \cosh \left (x\right ) e^{\left (2 \, x\right )} + x^{2} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (-\cosh \left (x\right ) - \sinh \left (x\right ) + 1\right ) + 2 \, {\left (x^{2} e^{\left (2 \, x\right )} + x^{2}\right )} \sinh \left (x\right )\right )} \sqrt {\frac {a}{e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 1}} e^{x}}{2 \, \cosh \left (x\right ) e^{x} \sinh \left (x\right ) + e^{x} \sinh \left (x\right )^{2} + {\left (\cosh \left (x\right )^{2} + 1\right )} e^{x}} \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} \sqrt {a \operatorname {sech}^{2}{\left (x \right )}} \operatorname {csch}{\left (x \right )} \operatorname {sech}{\left (x \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.01 \begin {gather*} \int \frac {x^2\,\sqrt {\frac {a}{{\mathrm {cosh}\left (x\right )}^2}}}{\mathrm {cosh}\left (x\right )\,\mathrm {sinh}\left (x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________