Optimal. Leaf size=204 \[ \frac {1}{2} x^2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}-2 x^2 \tanh ^{-1}\left (e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+\cosh ^2(x) \log (\cosh (x)) \sqrt {a \text {sech}^4(x)}-x \cosh ^2(x) \text {PolyLog}\left (2,-e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}+x \cosh ^2(x) \text {PolyLog}\left (2,e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}+\frac {1}{2} \cosh ^2(x) \text {PolyLog}\left (3,-e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}-\frac {1}{2} \cosh ^2(x) \text {PolyLog}\left (3,e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}-x \cosh (x) \sqrt {a \text {sech}^4(x)} \sinh (x)-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.46, antiderivative size = 204, normalized size of antiderivative = 1.00, number
of steps used = 16, number of rules used = 13, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.722, Rules
used = {6852, 2700, 14, 5570, 2631, 5569, 4267, 2611, 2320, 6724, 3801, 3556, 30}
\begin {gather*} -x \text {Li}_2\left (-e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+x \text {Li}_2\left (e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+\frac {1}{2} \text {Li}_3\left (-e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}-\frac {1}{2} \text {Li}_3\left (e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+\frac {1}{2} x^2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}-\frac {1}{2} x^2 \sinh ^2(x) \sqrt {a \text {sech}^4(x)}-2 x^2 \cosh ^2(x) \tanh ^{-1}\left (e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}+\cosh ^2(x) \sqrt {a \text {sech}^4(x)} \log (\cosh (x))-x \sinh (x) \cosh (x) \sqrt {a \text {sech}^4(x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 2320
Rule 2611
Rule 2631
Rule 2700
Rule 3556
Rule 3801
Rule 4267
Rule 5569
Rule 5570
Rule 6724
Rule 6852
Rubi steps
\begin {align*} \int x^2 \text {csch}(x) \text {sech}(x) \sqrt {a \text {sech}^4(x)} \, dx &=\left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x^2 \text {csch}(x) \text {sech}^3(x) \, dx\\ &=x^2 \cosh ^2(x) \log (\tanh (x)) \sqrt {a \text {sech}^4(x)}-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)-\left (2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x \left (\log (\tanh (x))-\frac {\tanh ^2(x)}{2}\right ) \, dx\\ &=x^2 \cosh ^2(x) \log (\tanh (x)) \sqrt {a \text {sech}^4(x)}-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)-\left (2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int \left (x \log (\tanh (x))-\frac {1}{2} x \tanh ^2(x)\right ) \, dx\\ &=x^2 \cosh ^2(x) \log (\tanh (x)) \sqrt {a \text {sech}^4(x)}-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)+\left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x \tanh ^2(x) \, dx-\left (2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x \log (\tanh (x)) \, dx\\ &=-x \cosh (x) \sqrt {a \text {sech}^4(x)} \sinh (x)-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)+\left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x \, dx+\left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x^2 \text {csch}(x) \text {sech}(x) \, dx+\left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int \tanh (x) \, dx\\ &=\frac {1}{2} x^2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+\cosh ^2(x) \log (\cosh (x)) \sqrt {a \text {sech}^4(x)}-x \cosh (x) \sqrt {a \text {sech}^4(x)} \sinh (x)-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)+\left (2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x^2 \text {csch}(2 x) \, dx\\ &=\frac {1}{2} x^2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}-2 x^2 \tanh ^{-1}\left (e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+\cosh ^2(x) \log (\cosh (x)) \sqrt {a \text {sech}^4(x)}-x \cosh (x) \sqrt {a \text {sech}^4(x)} \sinh (x)-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)-\left (2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x \log \left (1-e^{2 x}\right ) \, dx+\left (2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int x \log \left (1+e^{2 x}\right ) \, dx\\ &=\frac {1}{2} x^2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}-2 x^2 \tanh ^{-1}\left (e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+\cosh ^2(x) \log (\cosh (x)) \sqrt {a \text {sech}^4(x)}-x \cosh ^2(x) \text {Li}_2\left (-e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}+x \cosh ^2(x) \text {Li}_2\left (e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}-x \cosh (x) \sqrt {a \text {sech}^4(x)} \sinh (x)-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)+\left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int \text {Li}_2\left (-e^{2 x}\right ) \, dx-\left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \int \text {Li}_2\left (e^{2 x}\right ) \, dx\\ &=\frac {1}{2} x^2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}-2 x^2 \tanh ^{-1}\left (e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+\cosh ^2(x) \log (\cosh (x)) \sqrt {a \text {sech}^4(x)}-x \cosh ^2(x) \text {Li}_2\left (-e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}+x \cosh ^2(x) \text {Li}_2\left (e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}-x \cosh (x) \sqrt {a \text {sech}^4(x)} \sinh (x)-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)+\frac {1}{2} \left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 x}\right )-\frac {1}{2} \left (\cosh ^2(x) \sqrt {a \text {sech}^4(x)}\right ) \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{2 x}\right )\\ &=\frac {1}{2} x^2 \cosh ^2(x) \sqrt {a \text {sech}^4(x)}-2 x^2 \tanh ^{-1}\left (e^{2 x}\right ) \cosh ^2(x) \sqrt {a \text {sech}^4(x)}+\cosh ^2(x) \log (\cosh (x)) \sqrt {a \text {sech}^4(x)}-x \cosh ^2(x) \text {Li}_2\left (-e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}+x \cosh ^2(x) \text {Li}_2\left (e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}+\frac {1}{2} \cosh ^2(x) \text {Li}_3\left (-e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}-\frac {1}{2} \cosh ^2(x) \text {Li}_3\left (e^{2 x}\right ) \sqrt {a \text {sech}^4(x)}-x \cosh (x) \sqrt {a \text {sech}^4(x)} \sinh (x)-\frac {1}{2} x^2 \sqrt {a \text {sech}^4(x)} \sinh ^2(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.42, size = 120, normalized size = 0.59 \begin {gather*} \frac {1}{24} \cosh ^2(x) \sqrt {a \text {sech}^4(x)} \left (i \pi ^3-16 x^3-24 x^2 \log \left (1+e^{-2 x}\right )+24 x^2 \log \left (1-e^{2 x}\right )+24 \log (\cosh (x))+24 x \text {PolyLog}\left (2,-e^{-2 x}\right )+24 x \text {PolyLog}\left (2,e^{2 x}\right )+12 \text {PolyLog}\left (3,-e^{-2 x}\right )-12 \text {PolyLog}\left (3,e^{2 x}\right )+12 x^2 \text {sech}^2(x)-24 x \tanh (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(440\) vs.
\(2(173)=346\).
time = 1.50, size = 441, normalized size = 2.16
method | result | size |
risch | \(2 \sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} x \left (x \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x}+1\right )-2 \sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} \ln \left ({\mathrm e}^{x}\right )+\sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} \ln \left (1+{\mathrm e}^{2 x}\right )+\sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} x^{2} \ln \left ({\mathrm e}^{x}+1\right )+2 \sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} x \polylog \left (2, -{\mathrm e}^{x}\right )-2 \sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} \polylog \left (3, -{\mathrm e}^{x}\right )-\sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} x^{2} \ln \left (1+{\mathrm e}^{2 x}\right )-\sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} x \polylog \left (2, -{\mathrm e}^{2 x}\right )+\frac {\sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} \polylog \left (3, -{\mathrm e}^{2 x}\right )}{2}+\sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} x^{2} \ln \left (1-{\mathrm e}^{x}\right )+2 \sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} x \polylog \left (2, {\mathrm e}^{x}\right )-2 \sqrt {\frac {a \,{\mathrm e}^{4 x}}{\left (1+{\mathrm e}^{2 x}\right )^{4}}}\, {\mathrm e}^{-2 x} \left (1+{\mathrm e}^{2 x}\right )^{2} \polylog \left (3, {\mathrm e}^{x}\right )\) | \(441\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 154, normalized size = 0.75 \begin {gather*} -\frac {1}{2} \, {\left (2 \, x^{2} \log \left (e^{\left (2 \, x\right )} + 1\right ) + 2 \, x {\rm Li}_2\left (-e^{\left (2 \, x\right )}\right ) - {\rm Li}_{3}(-e^{\left (2 \, x\right )})\right )} \sqrt {a} + {\left (x^{2} \log \left (e^{x} + 1\right ) + 2 \, x {\rm Li}_2\left (-e^{x}\right ) - 2 \, {\rm Li}_{3}(-e^{x})\right )} \sqrt {a} + {\left (x^{2} \log \left (-e^{x} + 1\right ) + 2 \, x {\rm Li}_2\left (e^{x}\right ) - 2 \, {\rm Li}_{3}(e^{x})\right )} \sqrt {a} - 2 \, \sqrt {a} x + \sqrt {a} \log \left (e^{\left (2 \, x\right )} + 1\right ) + \frac {2 \, {\left ({\left (\sqrt {a} x^{2} + \sqrt {a} x\right )} e^{\left (2 \, x\right )} + \sqrt {a} x\right )}}{e^{\left (4 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 0.46, size = 3431, normalized size = 16.82 \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} \sqrt {a \operatorname {sech}^{4}{\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.00 \begin {gather*} \int \frac {x^2\,\sqrt {\frac {a}{{\mathrm {cosh}\left (x\right )}^4}}}{\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]
________________________________________________________________________________________