Optimal. Leaf size=48 \[ \frac {\log (a+b \sinh (x))}{b^3}-\frac {a^2+b^2}{2 b^3 (a+b \sinh (x))^2}+\frac {2 a}{b^3 (a+b \sinh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4476, 2747,
711} \begin {gather*} -\frac {a^2+b^2}{2 b^3 (a+b \sinh (x))^2}+\frac {2 a}{b^3 (a+b \sinh (x))}+\frac {\log (a+b \sinh (x))}{b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 2747
Rule 4476
Rubi steps
\begin {align*} \int \frac {1}{(a \text {sech}(x)+b \tanh (x))^3} \, dx &=\int \frac {\cosh ^3(x)}{(a+b \sinh (x))^3} \, dx\\ &=-\frac {\text {Subst}\left (\int \frac {-b^2-x^2}{(a+x)^3} \, dx,x,b \sinh (x)\right )}{b^3}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {1}{-a-x}+\frac {-a^2-b^2}{(a+x)^3}+\frac {2 a}{(a+x)^2}\right ) \, dx,x,b \sinh (x)\right )}{b^3}\\ &=\frac {\log (a+b \sinh (x))}{b^3}-\frac {a^2+b^2}{2 b^3 (a+b \sinh (x))^2}+\frac {2 a}{b^3 (a+b \sinh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 80, normalized size = 1.67 \begin {gather*} \frac {3 a^2-b^2+2 a^2 \log (a+b \sinh (x))-b^2 \log (a+b \sinh (x))+b^2 \cosh (2 x) \log (a+b \sinh (x))+4 a b (1+\log (a+b \sinh (x))) \sinh (x)}{2 b^3 (a+b \sinh (x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(140\) vs.
\(2(50)=100\).
time = 1.22, size = 141, normalized size = 2.94
method | result | size |
risch | \(-\frac {x}{b^{3}}+\frac {2 \,{\mathrm e}^{x} \left (2 a b \,{\mathrm e}^{2 x}+3 a^{2} {\mathrm e}^{x}-b^{2} {\mathrm e}^{x}-2 a b \right )}{b^{3} \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}-b \right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}-1\right )}{b^{3}}\) | \(78\) |
default | \(\frac {\frac {2 \left (\frac {b \left (a^{2}-b^{2}\right ) \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{a}-\frac {b^{2} \left (3 a^{2}-b^{2}\right ) \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{a^{2}}-\frac {b \left (a^{2}-b^{2}\right ) \tanh \left (\frac {x}{2}\right )}{a}\right )}{\left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 b \tanh \left (\frac {x}{2}\right )-a \right )^{2}}+\ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 b \tanh \left (\frac {x}{2}\right )-a \right )}{b^{3}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b^{3}}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b^{3}}\) | \(141\) |
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. 117 vs.
\(2 (46) = 92\).
time = 0.29, size = 117, normalized size = 2.44 \begin {gather*} \frac {2 \, {\left (2 \, a b e^{\left (-x\right )} - 2 \, a b e^{\left (-3 \, x\right )} + {\left (3 \, a^{2} - b^{2}\right )} e^{\left (-2 \, x\right )}\right )}}{4 \, a b^{4} e^{\left (-x\right )} - 4 \, a b^{4} e^{\left (-3 \, x\right )} + b^{5} e^{\left (-4 \, x\right )} + b^{5} + 2 \, {\left (2 \, a^{2} b^{3} - b^{5}\right )} e^{\left (-2 \, x\right )}} + \frac {x}{b^{3}} + \frac {\log \left (-2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} - b\right )}{b^{3}} \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. 543 vs.
\(2 (46) = 92\).
time = 0.43, size = 543, normalized size = 11.31 \begin {gather*} -\frac {b^{2} x \cosh \left (x\right )^{4} + b^{2} x \sinh \left (x\right )^{4} + 4 \, {\left (a b x - a b\right )} \cosh \left (x\right )^{3} + 4 \, {\left (b^{2} x \cosh \left (x\right ) + a b x - a b\right )} \sinh \left (x\right )^{3} + b^{2} x - 2 \, {\left (3 \, a^{2} - b^{2} - {\left (2 \, a^{2} - b^{2}\right )} x\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} x \cosh \left (x\right )^{2} - 3 \, a^{2} + b^{2} + {\left (2 \, a^{2} - b^{2}\right )} x + 6 \, {\left (a b x - a b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} - 4 \, {\left (a b x - a b\right )} \cosh \left (x\right ) - {\left (b^{2} \cosh \left (x\right )^{4} + b^{2} \sinh \left (x\right )^{4} + 4 \, a b \cosh \left (x\right )^{3} + 4 \, {\left (b^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right )^{3} - 4 \, a b \cosh \left (x\right ) + 2 \, {\left (2 \, a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} + 6 \, a b \cosh \left (x\right ) + 2 \, a^{2} - b^{2}\right )} \sinh \left (x\right )^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} + 3 \, a b \cosh \left (x\right )^{2} - a b + {\left (2 \, a^{2} - b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (b \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 4 \, {\left (b^{2} x \cosh \left (x\right )^{3} - a b x + 3 \, {\left (a b x - a b\right )} \cosh \left (x\right )^{2} + a b - {\left (3 \, a^{2} - b^{2} - {\left (2 \, a^{2} - b^{2}\right )} x\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}{b^{5} \cosh \left (x\right )^{4} + b^{5} \sinh \left (x\right )^{4} + 4 \, a b^{4} \cosh \left (x\right )^{3} - 4 \, a b^{4} \cosh \left (x\right ) + b^{5} + 4 \, {\left (b^{5} \cosh \left (x\right ) + a b^{4}\right )} \sinh \left (x\right )^{3} + 2 \, {\left (2 \, a^{2} b^{3} - b^{5}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{5} \cosh \left (x\right )^{2} + 6 \, a b^{4} \cosh \left (x\right ) + 2 \, a^{2} b^{3} - b^{5}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b^{5} \cosh \left (x\right )^{3} + 3 \, a b^{4} \cosh \left (x\right )^{2} - a b^{4} + {\left (2 \, a^{2} b^{3} - b^{5}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 651 vs.
\(2 (48) = 96\).
time = 1.30, size = 651, normalized size = 13.56 \begin {gather*} \begin {cases} \frac {2 a^{2} x \operatorname {sech}^{2}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} + \frac {2 a^{2} \log {\left (\frac {a \operatorname {sech}{\left (x \right )}}{b} + \tanh {\left (x \right )} \right )} \operatorname {sech}^{2}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} - \frac {2 a^{2} \log {\left (\tanh {\left (x \right )} + 1 \right )} \operatorname {sech}^{2}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} + \frac {a^{2} \operatorname {sech}^{2}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} + \frac {4 a b x \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} + \frac {4 a b \log {\left (\frac {a \operatorname {sech}{\left (x \right )}}{b} + \tanh {\left (x \right )} \right )} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} - \frac {4 a b \log {\left (\tanh {\left (x \right )} + 1 \right )} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} + \frac {2 b^{2} x \tanh ^{2}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} + \frac {2 b^{2} \log {\left (\frac {a \operatorname {sech}{\left (x \right )}}{b} + \tanh {\left (x \right )} \right )} \tanh ^{2}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} - \frac {2 b^{2} \log {\left (\tanh {\left (x \right )} + 1 \right )} \tanh ^{2}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} - \frac {b^{2} \tanh ^{2}{\left (x \right )}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} - \frac {b^{2}}{2 a^{2} b^{3} \operatorname {sech}^{2}{\left (x \right )} + 4 a b^{4} \tanh {\left (x \right )} \operatorname {sech}{\left (x \right )} + 2 b^{5} \tanh ^{2}{\left (x \right )}} & \text {for}\: b \neq 0 \\\frac {- \frac {2 \tanh ^{3}{\left (x \right )}}{3 \operatorname {sech}^{3}{\left (x \right )}} + \frac {\tanh {\left (x \right )}}{\operatorname {sech}^{3}{\left (x \right )}}}{a^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 75, normalized size = 1.56 \begin {gather*} \frac {\log \left ({\left | -b {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, a \right |}\right )}{b^{3}} - \frac {3 \, b {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} - 4 \, a {\left (e^{\left (-x\right )} - e^{x}\right )} + 4 \, b}{2 \, {\left (b {\left (e^{\left (-x\right )} - e^{x}\right )} - 2 \, a\right )}^{2} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {1}{{\left (b\,\mathrm {tanh}\left (x\right )+\frac {a}{\mathrm {cosh}\left (x\right )}\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________