Optimal. Leaf size=60 \[ -\frac {2 b \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{3/2}}+\frac {a \cosh (x)}{\left (a^2+b^2\right ) (a+b \sinh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.454, Rules used = {2833, 12, 2739,
632, 212} \begin {gather*} \frac {a \cosh (x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {2 b \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 212
Rule 632
Rule 2739
Rule 2833
Rubi steps
\begin {align*} \int \frac {\sinh (x)}{(a+b \sinh (x))^2} \, dx &=\frac {a \cosh (x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac {\int \frac {b}{a+b \sinh (x)} \, dx}{a^2+b^2}\\ &=\frac {a \cosh (x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac {b \int \frac {1}{a+b \sinh (x)} \, dx}{a^2+b^2}\\ &=\frac {a \cosh (x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}+\frac {(2 b) \text {Subst}\left (\int \frac {1}{a+2 b x-a x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{a^2+b^2}\\ &=\frac {a \cosh (x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}-\frac {(4 b) \text {Subst}\left (\int \frac {1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 b-2 a \tanh \left (\frac {x}{2}\right )\right )}{a^2+b^2}\\ &=-\frac {2 b \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{3/2}}+\frac {a \cosh (x)}{\left (a^2+b^2\right ) (a+b \sinh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 68, normalized size = 1.13 \begin {gather*} -\frac {2 b \text {ArcTan}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\left (-a^2-b^2\right )^{3/2}}+\frac {a \cosh (x)}{\left (a^2+b^2\right ) (a+b \sinh (x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.45, size = 97, normalized size = 1.62
method | result | size |
default | \(\frac {8 b \tanh \left (\frac {x}{2}\right )+8 a}{\left (-4 a^{2}-4 b^{2}\right ) \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 b \tanh \left (\frac {x}{2}\right )-a \right )}-\frac {8 b \arctanh \left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\left (-4 a^{2}-4 b^{2}\right ) \sqrt {a^{2}+b^{2}}}\) | \(97\) |
risch | \(-\frac {2 a \left (a \,{\mathrm e}^{x}-b \right )}{b \left (a^{2}+b^{2}\right ) \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}-b \right )}+\frac {b \ln \left ({\mathrm e}^{x}+\frac {a \left (a^{2}+b^{2}\right )^{\frac {3}{2}}-a^{4}-2 a^{2} b^{2}-b^{4}}{b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {3}{2}}}-\frac {b \ln \left ({\mathrm e}^{x}+\frac {a \left (a^{2}+b^{2}\right )^{\frac {3}{2}}+a^{4}+2 a^{2} b^{2}+b^{4}}{b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\) | \(155\) |
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 (56) = 112\).
time = 0.49, size = 117, normalized size = 1.95 \begin {gather*} \frac {b \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{{\left (a^{2} + b^{2}\right )}^{\frac {3}{2}}} + \frac {2 \, {\left (a^{2} e^{\left (-x\right )} + a b\right )}}{a^{2} b^{2} + b^{4} + 2 \, {\left (a^{3} b + a b^{3}\right )} e^{\left (-x\right )} - {\left (a^{2} b^{2} + b^{4}\right )} e^{\left (-2 \, x\right )}} \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. 341 vs.
\(2 (56) = 112\).
time = 0.44, size = 341, normalized size = 5.68 \begin {gather*} -\frac {2 \, a^{3} b + 2 \, a b^{3} + {\left (b^{3} \cosh \left (x\right )^{2} + b^{3} \sinh \left (x\right )^{2} + 2 \, a b^{2} \cosh \left (x\right ) - b^{3} + 2 \, {\left (b^{3} \cosh \left (x\right ) + a b^{2}\right )} \sinh \left (x\right )\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {b^{2} \cosh \left (x\right )^{2} + b^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \left (x\right ) + b \sinh \left (x\right ) + a\right )}}{b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) - b}\right ) - 2 \, {\left (a^{4} + a^{2} b^{2}\right )} \cosh \left (x\right ) - 2 \, {\left (a^{4} + a^{2} b^{2}\right )} \sinh \left (x\right )}{a^{4} b^{2} + 2 \, a^{2} b^{4} + b^{6} - {\left (a^{4} b^{2} + 2 \, a^{2} b^{4} + b^{6}\right )} \cosh \left (x\right )^{2} - {\left (a^{4} b^{2} + 2 \, a^{2} b^{4} + b^{6}\right )} \sinh \left (x\right )^{2} - 2 \, {\left (a^{5} b + 2 \, a^{3} b^{3} + a b^{5}\right )} \cosh \left (x\right ) - 2 \, {\left (a^{5} b + 2 \, a^{3} b^{3} + a b^{5} + {\left (a^{4} b^{2} + 2 \, a^{2} b^{4} + b^{6}\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 [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 99, normalized size = 1.65 \begin {gather*} \frac {b \log \left (\frac {{\left | 2 \, b e^{x} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{x} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{{\left (a^{2} + b^{2}\right )}^{\frac {3}{2}}} - \frac {2 \, {\left (a^{2} e^{x} - a b\right )}}{{\left (a^{2} b + b^{3}\right )} {\left (b e^{\left (2 \, x\right )} + 2 \, a e^{x} - b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.70, size = 142, normalized size = 2.37 \begin {gather*} \frac {\frac {2\,a\,b}{a^2\,b+b^3}-\frac {2\,a^2\,{\mathrm {e}}^x}{a^2\,b+b^3}}{2\,a\,{\mathrm {e}}^x-b+b\,{\mathrm {e}}^{2\,x}}-\frac {b\,\ln \left (-\frac {2\,{\mathrm {e}}^x}{a^2+b^2}-\frac {2\,\left (b-a\,{\mathrm {e}}^x\right )}{{\left (a^2+b^2\right )}^{3/2}}\right )}{{\left (a^2+b^2\right )}^{3/2}}+\frac {b\,\ln \left (\frac {2\,\left (b-a\,{\mathrm {e}}^x\right )}{{\left (a^2+b^2\right )}^{3/2}}-\frac {2\,{\mathrm {e}}^x}{a^2+b^2}\right )}{{\left (a^2+b^2\right )}^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________