Optimal. Leaf size=54 \[ -\frac{a \log (a+b \cosh (x))}{a^2-b^2}+\frac{\log (1-\cosh (x))}{2 (a+b)}+\frac{\log (\cosh (x)+1)}{2 (a-b)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0704049, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {2721, 801} \[ -\frac{a \log (a+b \cosh (x))}{a^2-b^2}+\frac{\log (1-\cosh (x))}{2 (a+b)}+\frac{\log (\cosh (x)+1)}{2 (a-b)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2721
Rule 801
Rubi steps
\begin{align*} \int \frac{\coth (x)}{a+b \cosh (x)} \, dx &=-\operatorname{Subst}\left (\int \frac{x}{(a+x) \left (b^2-x^2\right )} \, dx,x,b \cosh (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{1}{2 (a+b) (b-x)}+\frac{a}{(a-b) (a+b) (a+x)}-\frac{1}{2 (a-b) (b+x)}\right ) \, dx,x,b \cosh (x)\right )\\ &=\frac{\log (1-\cosh (x))}{2 (a+b)}+\frac{\log (1+\cosh (x))}{2 (a-b)}-\frac{a \log (a+b \cosh (x))}{a^2-b^2}\\ \end{align*}
Mathematica [A] time = 0.0695403, size = 38, normalized size = 0.7 \[ -\frac{a \log (a+b \cosh (x))-a \log (\sinh (x))+b \log \left (\tanh \left (\frac{x}{2}\right )\right )}{a^2-b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.02, size = 53, normalized size = 1. \begin{align*} -{\frac{a}{ \left ( a+b \right ) \left ( a-b \right ) }\ln \left ( a \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}- \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b-a-b \right ) }+{\frac{1}{a+b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.03312, size = 80, normalized size = 1.48 \begin{align*} -\frac{a \log \left (2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} + b\right )}{a^{2} - b^{2}} + \frac{\log \left (e^{\left (-x\right )} + 1\right )}{a - b} + \frac{\log \left (e^{\left (-x\right )} - 1\right )}{a + b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.09963, size = 182, normalized size = 3.37 \begin{align*} -\frac{a \log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) -{\left (a + b\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) -{\left (a - b\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right )}{a^{2} - b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\coth{\left (x \right )}}{a + b \cosh{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2286, size = 90, normalized size = 1.67 \begin{align*} -\frac{a b \log \left ({\left | b{\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, a \right |}\right )}{a^{2} b - b^{3}} + \frac{\log \left (e^{\left (-x\right )} + e^{x} + 2\right )}{2 \,{\left (a - b\right )}} + \frac{\log \left (e^{\left (-x\right )} + e^{x} - 2\right )}{2 \,{\left (a + b\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]