Optimal. Leaf size=20 \[ \frac{\log (\cosh (x))}{a}-\frac{\log (a+b \cosh (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0423172, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {2721, 36, 29, 31} \[ \frac{\log (\cosh (x))}{a}-\frac{\log (a+b \cosh (x))}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2721
Rule 36
Rule 29
Rule 31
Rubi steps
\begin{align*} \int \frac{\tanh (x)}{a+b \cosh (x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{x (a+x)} \, dx,x,b \cosh (x)\right )\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,b \cosh (x)\right )}{a}-\frac{\operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,b \cosh (x)\right )}{a}\\ &=\frac{\log (\cosh (x))}{a}-\frac{\log (a+b \cosh (x))}{a}\\ \end{align*}
Mathematica [A] time = 0.009067, size = 20, normalized size = 1. \[ \frac{\log (\cosh (x))}{a}-\frac{\log (a+b \cosh (x))}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.014, size = 21, normalized size = 1.1 \begin{align*}{\frac{\ln \left ( \cosh \left ( x \right ) \right ) }{a}}-{\frac{\ln \left ( a+b\cosh \left ( x \right ) \right ) }{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.5941, size = 45, normalized size = 2.25 \begin{align*} -\frac{\log \left (2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} + b\right )}{a} + \frac{\log \left (e^{\left (-2 \, x\right )} + 1\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.95711, size = 116, normalized size = 5.8 \begin{align*} -\frac{\log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - \log \left (\frac{2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a} \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{\tanh{\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.23281, size = 45, normalized size = 2.25 \begin{align*} \frac{\log \left (e^{\left (-x\right )} + e^{x}\right )}{a} - \frac{\log \left ({\left | b{\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, a \right |}\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]