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.06, antiderivative size = 29, normalized size of antiderivative = 1.00, 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 44
Rule 3516
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.10, 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]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 117, normalized size = 4.03 \[ -\frac {{\left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} + b\right )} \log \left (\frac {2 \, {\left (b \cosh \relax (x) + a \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - {\left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} + b\right )} \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right ) + 2 \, a}{a^{2} \cosh \relax (x)^{2} + 2 \, a^{2} \cosh \relax (x) \sinh \relax (x) + a^{2} \sinh \relax (x)^{2} + a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.13, size = 76, normalized size = 2.62 \[ -\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 )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 59, normalized size = 2.03 \[ -\frac {b \ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b +2 a \tanh \left (\frac {x}{2}\right )+b \right )}{a^{2}}+\frac {2 \tanh \left (\frac {x}{2}\right )}{a \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}+\frac {b \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 46, normalized size = 1.59 \[ -\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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.58, size = 323, normalized size = 11.14 \[ \frac {2\,\mathrm {atan}\left (\frac {b\,\left (a^4\,{\left (b^2\right )}^{3/2}-a^6\,\sqrt {b^2}\right )\,\left (b^6\,\sqrt {-a^4}-a\,b^5\,\sqrt {-a^4}-a^2\,b^4\,\sqrt {-a^4}+a^3\,b^3\,\sqrt {-a^4}+b^6\,{\mathrm {e}}^{2\,x}\,\sqrt {-a^4}-2\,a^2\,b^4\,{\mathrm {e}}^{2\,x}\,\sqrt {-a^4}+a^4\,b^2\,{\mathrm {e}}^{2\,x}\,\sqrt {-a^4}\right )+b^2\,\left (a^3\,{\left (b^2\right )}^{3/2}-a^5\,\sqrt {b^2}\right )\,\left (b^6\,\sqrt {-a^4}-a\,b^5\,\sqrt {-a^4}-a^2\,b^4\,\sqrt {-a^4}+a^3\,b^3\,\sqrt {-a^4}+b^6\,{\mathrm {e}}^{2\,x}\,\sqrt {-a^4}-2\,a^2\,b^4\,{\mathrm {e}}^{2\,x}\,\sqrt {-a^4}+a^4\,b^2\,{\mathrm {e}}^{2\,x}\,\sqrt {-a^4}\right )}{-a^{12}\,b^4+3\,a^{10}\,b^6-3\,a^8\,b^8+a^6\,b^{10}}\right )\,\sqrt {b^2}}{\sqrt {-a^4}}-\frac {2}{a\,\left ({\mathrm {e}}^{2\,x}+1\right )} \]
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 {\operatorname {sech}^{2}{\relax (x )}}{a + b \coth {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________