Optimal. Leaf size=48 \[ \frac {b \log (a+b \sinh (x))}{a^2+b^2}+\frac {a \tan ^{-1}(\sinh (x))}{a^2+b^2}-\frac {b \log (\cosh (x))}{a^2+b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {2668, 706, 31, 635, 204, 260} \[ \frac {b \log (a+b \sinh (x))}{a^2+b^2}+\frac {a \tan ^{-1}(\sinh (x))}{a^2+b^2}-\frac {b \log (\cosh (x))}{a^2+b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 204
Rule 260
Rule 635
Rule 706
Rule 2668
Rubi steps
\begin {align*} \int \frac {\text {sech}(x)}{a+b \sinh (x)} \, dx &=-\left (b \operatorname {Subst}\left (\int \frac {1}{(a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (x)\right )\right )\\ &=\frac {b \operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \sinh (x)\right )}{a^2+b^2}+\frac {b \operatorname {Subst}\left (\int \frac {-a+x}{-b^2-x^2} \, dx,x,b \sinh (x)\right )}{a^2+b^2}\\ &=\frac {b \log (a+b \sinh (x))}{a^2+b^2}+\frac {b \operatorname {Subst}\left (\int \frac {x}{-b^2-x^2} \, dx,x,b \sinh (x)\right )}{a^2+b^2}-\frac {(a b) \operatorname {Subst}\left (\int \frac {1}{-b^2-x^2} \, dx,x,b \sinh (x)\right )}{a^2+b^2}\\ &=\frac {a \tan ^{-1}(\sinh (x))}{a^2+b^2}-\frac {b \log (\cosh (x))}{a^2+b^2}+\frac {b \log (a+b \sinh (x))}{a^2+b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.10, size = 99, normalized size = 2.06 \[ -\frac {b \left (\left (\sqrt {-b^2}-a\right ) \log \left (\sqrt {-b^2}-b \sinh (x)\right )-2 \sqrt {-b^2} \log (a+b \sinh (x))+\left (a+\sqrt {-b^2}\right ) \log \left (\sqrt {-b^2}+b \sinh (x)\right )\right )}{2 \sqrt {-b^2} \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.02, size = 57, normalized size = 1.19 \[ \frac {2 \, a \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + b \log \left (\frac {2 \, {\left (b \sinh \relax (x) + a\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - b \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} + b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 89, normalized size = 1.85 \[ \frac {b^{2} \log \left ({\left | -b {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, a \right |}\right )}{a^{2} b + b^{3}} + \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, x\right )} - 1\right )} e^{\left (-x\right )}\right )\right )} a}{2 \, {\left (a^{2} + b^{2}\right )}} - \frac {b \log \left ({\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4\right )}{2 \, {\left (a^{2} + b^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 71, normalized size = 1.48 \[ \frac {b \ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 \tanh \left (\frac {x}{2}\right ) b -a \right )}{a^{2}+b^{2}}-\frac {b \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}{a^{2}+b^{2}}+\frac {2 a \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a^{2}+b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 66, normalized size = 1.38 \[ -\frac {2 \, a \arctan \left (e^{\left (-x\right )}\right )}{a^{2} + b^{2}} + \frac {b \log \left (-2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} - b\right )}{a^{2} + b^{2}} - \frac {b \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{2} + b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.35, size = 93, normalized size = 1.94 \[ \frac {b\,\ln \left (4\,b^3\,{\mathrm {e}}^{2\,x}-a^2\,b-4\,b^3+2\,a^3\,{\mathrm {e}}^x+8\,a\,b^2\,{\mathrm {e}}^x+a^2\,b\,{\mathrm {e}}^{2\,x}\right )}{a^2+b^2}-\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )}{b+a\,1{}\mathrm {i}}-\frac {\ln \left (1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{a+b\,1{}\mathrm {i}} \]
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}{\relax (x )}}{a + b \sinh {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________