Optimal. Leaf size=73 \[ -\frac {b \sinh (x)}{a^2-b^2}+\frac {a \cosh (x)}{a^2-b^2}-\frac {b^2 \tanh ^{-1}\left (\frac {\sinh (x) (a \coth (x)+b)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 73, 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 = {3511, 3486, 2638, 3509, 206} \[ -\frac {b \sinh (x)}{a^2-b^2}+\frac {a \cosh (x)}{a^2-b^2}-\frac {b^2 \tanh ^{-1}\left (\frac {\sinh (x) (a \coth (x)+b)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2638
Rule 3486
Rule 3509
Rule 3511
Rubi steps
\begin {align*} \int \frac {\sinh (x)}{a+b \coth (x)} \, dx &=\frac {\int (a-b \coth (x)) \sinh (x) \, dx}{a^2-b^2}+\frac {b^2 \int \frac {\text {csch}(x)}{a+b \coth (x)} \, dx}{a^2-b^2}\\ &=-\frac {b \sinh (x)}{a^2-b^2}+\frac {a \int \sinh (x) \, dx}{a^2-b^2}-\frac {b^2 \operatorname {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,i (-i b-i a \coth (x)) \sinh (x)\right )}{a^2-b^2}\\ &=-\frac {b^2 \tanh ^{-1}\left (\frac {(b+a \coth (x)) \sinh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}+\frac {a \cosh (x)}{a^2-b^2}-\frac {b \sinh (x)}{a^2-b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.46, size = 80, normalized size = 1.10 \[ \frac {a \cosh (x)}{a^2-b^2}+b \left (\frac {\sinh (x)}{b^2-a^2}-\frac {2 b \tan ^{-1}\left (\frac {a+b \tanh \left (\frac {x}{2}\right )}{\sqrt {b-a} \sqrt {a+b}}\right )}{(b-a)^{3/2} (a+b)^{3/2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 431, normalized size = 5.90 \[ \left [\frac {a^{3} + a^{2} b - a b^{2} - b^{3} + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \relax (x)^{2} + 2 \, {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \relax (x)^{2} - 2 \, {\left (b^{2} \cosh \relax (x) + b^{2} \sinh \relax (x)\right )} \sqrt {a^{2} - b^{2}} \log \left (\frac {{\left (a + b\right )} \cosh \relax (x)^{2} + 2 \, {\left (a + b\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a + b\right )} \sinh \relax (x)^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (\cosh \relax (x) + \sinh \relax (x)\right )} + a - b}{{\left (a + b\right )} \cosh \relax (x)^{2} + 2 \, {\left (a + b\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a + b\right )} \sinh \relax (x)^{2} - a + b}\right )}{2 \, {\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \relax (x) + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \relax (x)\right )}}, \frac {a^{3} + a^{2} b - a b^{2} - b^{3} + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \relax (x)^{2} + 2 \, {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \relax (x)^{2} + 4 \, {\left (b^{2} \cosh \relax (x) + b^{2} \sinh \relax (x)\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (\frac {\sqrt {-a^{2} + b^{2}}}{{\left (a + b\right )} \cosh \relax (x) + {\left (a + b\right )} \sinh \relax (x)}\right )}{2 \, {\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \relax (x) + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \relax (x)\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 72, normalized size = 0.99 \[ \frac {2 \, b^{2} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {-a^{2} + b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )} \sqrt {-a^{2} + b^{2}}} + \frac {e^{\left (-x\right )}}{2 \, {\left (a - b\right )}} + \frac {e^{x}}{2 \, {\left (a + b\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 93, normalized size = 1.27 \[ \frac {2 b^{2} \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right ) b +2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {-a^{2}+b^{2}}}+\frac {8}{\left (8 a -8 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {8}{\left (8 a +8 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.50, size = 156, normalized size = 2.14 \[ \frac {{\mathrm {e}}^x}{2\,a+2\,b}+\frac {{\mathrm {e}}^{-x}}{2\,a-2\,b}-\frac {b^2\,\ln \left (\frac {2\,b^2\,{\mathrm {e}}^x}{-a^3-a^2\,b+a\,b^2+b^3}-\frac {2\,b^2}{{\left (a+b\right )}^{5/2}\,\sqrt {a-b}}\right )}{{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}+\frac {b^2\,\ln \left (\frac {2\,b^2}{{\left (a+b\right )}^{5/2}\,\sqrt {a-b}}+\frac {2\,b^2\,{\mathrm {e}}^x}{-a^3-a^2\,b+a\,b^2+b^3}\right )}{{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sinh {\relax (x )}}{a + b \coth {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________