Optimal. Leaf size=29 \[ -\frac{b \log (\tanh (x))}{a^2}-\frac{b \log (a+b \coth (x))}{a^2}+\frac{\tanh (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0554407, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3516, 44} \[ -\frac{b \log (\tanh (x))}{a^2}-\frac{b \log (a+b \coth (x))}{a^2}+\frac{\tanh (x)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 44
Rubi steps
\begin{align*} \int \frac{\text{sech}^2(x)}{a+b \coth (x)} \, dx &=-\left (b \operatorname{Subst}\left (\int \frac{1}{x^2 (a+x)} \, dx,x,b \coth (x)\right )\right )\\ &=-\left (b \operatorname{Subst}\left (\int \left (\frac{1}{a x^2}-\frac{1}{a^2 x}+\frac{1}{a^2 (a+x)}\right ) \, dx,x,b \coth (x)\right )\right )\\ &=-\frac{b \log (a+b \coth (x))}{a^2}-\frac{b \log (\tanh (x))}{a^2}+\frac{\tanh (x)}{a}\\ \end{align*}
Mathematica [A] time = 0.0806487, size = 27, normalized size = 0.93 \[ \frac{-b \log (a \sinh (x)+b \cosh (x))+a \tanh (x)+b \log (\cosh (x))}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.04, size = 59, normalized size = 2. \begin{align*} 2\,{\frac{\tanh \left ( x/2 \right ) }{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) }}+{\frac{b}{{a}^{2}}\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) }-{\frac{b}{{a}^{2}}\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}b+2\,a\tanh \left ( x/2 \right ) +b \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.76628, size = 62, normalized size = 2.14 \begin{align*} -\frac{b \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} + a + b\right )}{a^{2}} + \frac{b \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{2}} + \frac{2}{a e^{\left (-2 \, x\right )} + a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.61689, size = 362, normalized size = 12.48 \begin{align*} -\frac{{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + b\right )} \log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + a \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) -{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + b\right )} \log \left (\frac{2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, a}{a^{2} \cosh \left (x\right )^{2} + 2 \, a^{2} \cosh \left (x\right ) \sinh \left (x\right ) + a^{2} \sinh \left (x\right )^{2} + a^{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{\operatorname{sech}^{2}{\left (x \right )}}{a + b \coth{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.1468, size = 103, normalized size = 3.55 \begin{align*} -\frac{{\left (a b + b^{2}\right )} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b \right |}\right )}{a^{3} + a^{2} b} + \frac{b \log \left (e^{\left (2 \, x\right )} + 1\right )}{a^{2}} - \frac{b e^{\left (2 \, x\right )} + 2 \, a + b}{a^{2}{\left (e^{\left (2 \, x\right )} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]