Optimal. Leaf size=72 \[ -\frac {b \sinh (x)}{a^2-b^2}+\frac {a \cosh (x)}{a^2-b^2}+\frac {a b \tan ^{-1}\left (\frac {a \sinh (x)+b \cosh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {3518, 3109, 2637, 2638, 3074, 206} \[ -\frac {b \sinh (x)}{a^2-b^2}+\frac {a \cosh (x)}{a^2-b^2}+\frac {a b \tan ^{-1}\left (\frac {a \sinh (x)+b \cosh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2637
Rule 2638
Rule 3074
Rule 3109
Rule 3518
Rubi steps
\begin {align*} \int \frac {\sinh (x)}{a+b \tanh (x)} \, dx &=\int \frac {\cosh (x) \sinh (x)}{a \cosh (x)+b \sinh (x)} \, dx\\ &=\frac {a \int \sinh (x) \, dx}{a^2-b^2}-\frac {b \int \cosh (x) \, dx}{a^2-b^2}+\frac {(a b) \int \frac {1}{a \cosh (x)+b \sinh (x)} \, dx}{a^2-b^2}\\ &=\frac {a \cosh (x)}{a^2-b^2}-\frac {b \sinh (x)}{a^2-b^2}+\frac {(i a b) \operatorname {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )}{a^2-b^2}\\ &=\frac {a b \tan ^{-1}\left (\frac {b \cosh (x)+a \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.24, size = 79, normalized size = 1.10 \[ \frac {b \sinh (x)}{b^2-a^2}+\frac {a \cosh (x)}{a^2-b^2}+\frac {2 a b \tan ^{-1}\left (\frac {a \tanh \left (\frac {x}{2}\right )+b}{\sqrt {a-b} \sqrt {a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.63, size = 427, normalized size = 5.93 \[ \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 (a b \cosh \relax (x) + a b \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 (a b \cosh \relax (x) + a b \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 = 60, normalized size = 0.83 \[ \frac {2 \, a b \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {a^{2} - b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )}^{\frac {3}{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.11, size = 92, normalized size = 1.28 \[ \frac {2 a b \arctan \left (\frac {2 a \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {a^{2}-b^{2}}}+\frac {4}{\left (4 a -4 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {4}{\left (4 a +4 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.36, size = 157, normalized size = 2.18 \[ \frac {{\mathrm {e}}^x}{2\,a+2\,b}+\frac {{\mathrm {e}}^{-x}}{2\,a-2\,b}+\frac {2\,\mathrm {atan}\left (\frac {a\,b\,{\mathrm {e}}^x\,\sqrt {a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}}{a^3\,\sqrt {a^2\,b^2}+b^3\,\sqrt {a^2\,b^2}-a\,b^2\,\sqrt {a^2\,b^2}-a^2\,b\,\sqrt {a^2\,b^2}}\right )\,\sqrt {a^2\,b^2}}{\sqrt {a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}} \]
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 \tanh {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________