Optimal. Leaf size=61 \[ -\frac {\left (a^2-b^2\right ) \cosh (x)}{a^3}-\frac {b \cosh ^2(x)}{2 a^2}+\frac {\cosh ^3(x)}{3 a}+\frac {b \left (a^2-b^2\right ) \log (b+a \cosh (x))}{a^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3957, 2916, 12,
786} \begin {gather*} -\frac {b \cosh ^2(x)}{2 a^2}+\frac {b \left (a^2-b^2\right ) \log (a \cosh (x)+b)}{a^4}-\frac {\left (a^2-b^2\right ) \cosh (x)}{a^3}+\frac {\cosh ^3(x)}{3 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 786
Rule 2916
Rule 3957
Rubi steps
\begin {align*} \int \frac {\sinh ^3(x)}{a+b \text {sech}(x)} \, dx &=-\int \frac {\cosh (x) \sinh ^3(x)}{-b-a \cosh (x)} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {x \left (a^2-x^2\right )}{a (-b+x)} \, dx,x,-a \cosh (x)\right )}{a^3}\\ &=\frac {\text {Subst}\left (\int \frac {x \left (a^2-x^2\right )}{-b+x} \, dx,x,-a \cosh (x)\right )}{a^4}\\ &=\frac {\text {Subst}\left (\int \left (a^2 \left (1-\frac {b^2}{a^2}\right )+\frac {-a^2 b+b^3}{b-x}-b x-x^2\right ) \, dx,x,-a \cosh (x)\right )}{a^4}\\ &=-\frac {\left (a^2-b^2\right ) \cosh (x)}{a^3}-\frac {b \cosh ^2(x)}{2 a^2}+\frac {\cosh ^3(x)}{3 a}+\frac {b \left (a^2-b^2\right ) \log (b+a \cosh (x))}{a^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 66, normalized size = 1.08 \begin {gather*} \frac {\left (-9 a^3+12 a b^2\right ) \cosh (x)-3 a^2 b \cosh (2 x)+a^3 \cosh (3 x)+12 a^2 b \log (b+a \cosh (x))-12 b^3 \log (b+a \cosh (x))}{12 a^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(208\) vs.
\(2(57)=114\).
time = 0.66, size = 209, normalized size = 3.43
method | result | size |
risch | \(-\frac {b x}{a^{2}}+\frac {x \,b^{3}}{a^{4}}+\frac {{\mathrm e}^{3 x}}{24 a}-\frac {b \,{\mathrm e}^{2 x}}{8 a^{2}}-\frac {3 \,{\mathrm e}^{x}}{8 a}+\frac {{\mathrm e}^{x} b^{2}}{2 a^{3}}-\frac {3 \,{\mathrm e}^{-x}}{8 a}+\frac {{\mathrm e}^{-x} b^{2}}{2 a^{3}}-\frac {b \,{\mathrm e}^{-2 x}}{8 a^{2}}+\frac {{\mathrm e}^{-3 x}}{24 a}+\frac {b \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{a^{2}}-\frac {b^{3} \ln \left ({\mathrm e}^{2 x}+\frac {2 b \,{\mathrm e}^{x}}{a}+1\right )}{a^{4}}\) | \(136\) |
default | \(\frac {b \left (a^{3}-a^{2} b -a \,b^{2}+b^{3}\right ) \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-b \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+a +b \right )}{a^{4} \left (a -b \right )}-\frac {-a^{2}+a b +2 b^{2}}{2 a^{3} \left (\tanh \left (\frac {x}{2}\right )-1\right )}-\frac {a +b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {1}{3 a \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {b \left (a^{2}-b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{a^{4}}-\frac {a +b}{2 a^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {a^{2}-a b -2 b^{2}}{2 a^{3} \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {1}{3 a \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {b \left (a^{2}-b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{a^{4}}\) | \(209\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 128 vs.
\(2 (57) = 114\).
time = 0.27, size = 128, normalized size = 2.10 \begin {gather*} -\frac {{\left (3 \, a b e^{\left (-x\right )} - a^{2} + 3 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} e^{\left (-2 \, x\right )}\right )} e^{\left (3 \, x\right )}}{24 \, a^{3}} - \frac {3 \, a b e^{\left (-2 \, x\right )} - a^{2} e^{\left (-3 \, x\right )} + 3 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )} e^{\left (-x\right )}}{24 \, a^{3}} + \frac {{\left (a^{2} b - b^{3}\right )} x}{a^{4}} + \frac {{\left (a^{2} b - b^{3}\right )} \log \left (2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} + a\right )}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 490 vs.
\(2 (57) = 114\).
time = 0.37, size = 490, normalized size = 8.03 \begin {gather*} \frac {a^{3} \cosh \left (x\right )^{6} + a^{3} \sinh \left (x\right )^{6} - 3 \, a^{2} b \cosh \left (x\right )^{5} + 3 \, {\left (2 \, a^{3} \cosh \left (x\right ) - a^{2} b\right )} \sinh \left (x\right )^{5} - 24 \, {\left (a^{2} b - b^{3}\right )} x \cosh \left (x\right )^{3} - 3 \, {\left (3 \, a^{3} - 4 \, a b^{2}\right )} \cosh \left (x\right )^{4} + 3 \, {\left (5 \, a^{3} \cosh \left (x\right )^{2} - 5 \, a^{2} b \cosh \left (x\right ) - 3 \, a^{3} + 4 \, a b^{2}\right )} \sinh \left (x\right )^{4} - 3 \, a^{2} b \cosh \left (x\right ) + 2 \, {\left (10 \, a^{3} \cosh \left (x\right )^{3} - 15 \, a^{2} b \cosh \left (x\right )^{2} - 12 \, {\left (a^{2} b - b^{3}\right )} x - 6 \, {\left (3 \, a^{3} - 4 \, a b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{3} + a^{3} - 3 \, {\left (3 \, a^{3} - 4 \, a b^{2}\right )} \cosh \left (x\right )^{2} + 3 \, {\left (5 \, a^{3} \cosh \left (x\right )^{4} - 10 \, a^{2} b \cosh \left (x\right )^{3} - 3 \, a^{3} + 4 \, a b^{2} - 24 \, {\left (a^{2} b - b^{3}\right )} x \cosh \left (x\right ) - 6 \, {\left (3 \, a^{3} - 4 \, a b^{2}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + 24 \, {\left ({\left (a^{2} b - b^{3}\right )} \cosh \left (x\right )^{3} + 3 \, {\left (a^{2} b - b^{3}\right )} \cosh \left (x\right )^{2} \sinh \left (x\right ) + 3 \, {\left (a^{2} b - b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{2} + {\left (a^{2} b - b^{3}\right )} \sinh \left (x\right )^{3}\right )} \log \left (\frac {2 \, {\left (a \cosh \left (x\right ) + b\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 3 \, {\left (2 \, a^{3} \cosh \left (x\right )^{5} - 5 \, a^{2} b \cosh \left (x\right )^{4} - 24 \, {\left (a^{2} b - b^{3}\right )} x \cosh \left (x\right )^{2} - 4 \, {\left (3 \, a^{3} - 4 \, a b^{2}\right )} \cosh \left (x\right )^{3} - a^{2} b - 2 \, {\left (3 \, a^{3} - 4 \, a b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{24 \, {\left (a^{4} \cosh \left (x\right )^{3} + 3 \, a^{4} \cosh \left (x\right )^{2} \sinh \left (x\right ) + 3 \, a^{4} \cosh \left (x\right ) \sinh \left (x\right )^{2} + a^{4} \sinh \left (x\right )^{3}\right )}} \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 \frac {\sinh ^{3}{\left (x \right )}}{a + b \operatorname {sech}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 87, normalized size = 1.43 \begin {gather*} \frac {a^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{3} - 3 \, a b {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 12 \, a^{2} {\left (e^{\left (-x\right )} + e^{x}\right )} + 12 \, b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}}{24 \, a^{3}} + \frac {{\left (a^{2} b - b^{3}\right )} \log \left ({\left | a {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, b \right |}\right )}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.60, size = 123, normalized size = 2.02 \begin {gather*} \frac {{\mathrm {e}}^{-3\,x}}{24\,a}+\frac {{\mathrm {e}}^{3\,x}}{24\,a}-\frac {x\,\left (a^2\,b-b^3\right )}{a^4}-\frac {{\mathrm {e}}^x\,\left (3\,a^2-4\,b^2\right )}{8\,a^3}-\frac {b\,{\mathrm {e}}^{-2\,x}}{8\,a^2}-\frac {b\,{\mathrm {e}}^{2\,x}}{8\,a^2}+\frac {\ln \left (a+2\,b\,{\mathrm {e}}^x+a\,{\mathrm {e}}^{2\,x}\right )\,\left (a^2\,b-b^3\right )}{a^4}-\frac {{\mathrm {e}}^{-x}\,\left (3\,a^2-4\,b^2\right )}{8\,a^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________