Optimal. Leaf size=73 \[ \frac {a \sinh (x)}{a^2-b^2}-\frac {b \cosh (x)}{a^2-b^2}-\frac {b^2 \tan ^{-1}\left (\frac {\cosh (x) (a \tanh (x)+b)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, 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, 2637, 3509, 206} \[ \frac {a \sinh (x)}{a^2-b^2}-\frac {b \cosh (x)}{a^2-b^2}-\frac {b^2 \tan ^{-1}\left (\frac {\cosh (x) (a \tanh (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 2637
Rule 3486
Rule 3509
Rule 3511
Rubi steps
\begin {align*} \int \frac {\cosh (x)}{a+b \tanh (x)} \, dx &=\frac {\int \cosh (x) (a-b \tanh (x)) \, dx}{a^2-b^2}-\frac {b^2 \int \frac {\text {sech}(x)}{a+b \tanh (x)} \, dx}{a^2-b^2}\\ &=-\frac {b \cosh (x)}{a^2-b^2}+\frac {a \int \cosh (x) \, dx}{a^2-b^2}-\frac {\left (i b^2\right ) \operatorname {Subst}\left (\int \frac {1}{a^2-b^2-x^2} \, dx,x,\cosh (x) (-i b-i a \tanh (x))\right )}{a^2-b^2}\\ &=-\frac {b^2 \tan ^{-1}\left (\frac {\cosh (x) (b+a \tanh (x))}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}-\frac {b \cosh (x)}{a^2-b^2}+\frac {a \sinh (x)}{a^2-b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.24, size = 80, normalized size = 1.10 \[ \frac {a \sinh (x)}{a^2-b^2}+\frac {b \cosh (x)}{b^2-a^2}-\frac {2 b^2 \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.71, size = 435, normalized size = 5.96 \[ \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.13, size = 61, normalized size = 0.84 \[ -\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 )}^{\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.12, size = 93, normalized size = 1.27 \[ -\frac {2 b^{2} \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 {2}{\left (2 a -2 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {2}{\left (2 b +2 a \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.15 \[ \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}{{\left (a+b\right )}^{5/2}\,\sqrt {b-a}}-\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 (b-a\right )}^{3/2}}+\frac {b^2\,\ln \left (\frac {2\,b^2}{{\left (a+b\right )}^{5/2}\,\sqrt {b-a}}-\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 (b-a\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 {\cosh {\relax (x )}}{a + b \tanh {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________