Optimal. Leaf size=64 \[ -\frac {b \log (a \sinh (x)+b)}{a^2+b^2}+\frac {\log (-\sinh (x)+i)}{2 (b+i a)}-\frac {\log (\sinh (x)+i)}{2 (-b+i a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3872, 2721, 801} \[ -\frac {b \log (a \sinh (x)+b)}{a^2+b^2}+\frac {\log (-\sinh (x)+i)}{2 (b+i a)}-\frac {\log (\sinh (x)+i)}{2 (-b+i a)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 801
Rule 2721
Rule 3872
Rubi steps
\begin {align*} \int \frac {\text {sech}(x)}{a+b \text {csch}(x)} \, dx &=i \int \frac {\tanh (x)}{i b+i a \sinh (x)} \, dx\\ &=-\left (i \operatorname {Subst}\left (\int \frac {x}{(i b+x) \left (a^2-x^2\right )} \, dx,x,i a \sinh (x)\right )\right )\\ &=-\left (i \operatorname {Subst}\left (\int \left (\frac {1}{2 (a+i b) (a-x)}-\frac {b}{\left (a^2+b^2\right ) (b-i x)}+\frac {1}{2 (a-i b) (a+x)}\right ) \, dx,x,i a \sinh (x)\right )\right )\\ &=\frac {\log (i-\sinh (x))}{2 (i a+b)}-\frac {\log (i+\sinh (x))}{2 (i a-b)}-\frac {b \log (b+a \sinh (x))}{a^2+b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 36, normalized size = 0.56 \[ \frac {-b \log (a \sinh (x)+b)+2 a \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )+b \log (\cosh (x))}{a^2+b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.57, size = 57, normalized size = 0.89 \[ \frac {2 \, a \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) - b \log \left (\frac {2 \, {\left (a \sinh \relax (x) + b\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.15, size = 89, normalized size = 1.39 \[ -\frac {a b \log \left ({\left | -a {\left (e^{\left (-x\right )} - e^{x}\right )} + 2 \, b \right |}\right )}{a^{3} + a b^{2}} + \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.15, size = 84, normalized size = 1.31 \[ -\frac {2 b \ln \left (\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) b -2 a \tanh \left (\frac {x}{2}\right )-b \right )}{2 a^{2}+2 b^{2}}+\frac {2 b \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}{2 a^{2}+2 b^{2}}+\frac {4 a \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{2 a^{2}+2 b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 66, normalized size = 1.03 \[ -\frac {2 \, a \arctan \left (e^{\left (-x\right )}\right )}{a^{2} + b^{2}} - \frac {b \log \left (-2 \, b e^{\left (-x\right )} + a e^{\left (-2 \, x\right )} - a\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 = 2.36, size = 93, normalized size = 1.45 \[ \frac {\ln \left (1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )}{b+a\,1{}\mathrm {i}}-\frac {b\,\ln \left (a^3\,{\mathrm {e}}^{2\,x}-4\,a\,b^2-a^3+8\,b^3\,{\mathrm {e}}^x+2\,a^2\,b\,{\mathrm {e}}^x+4\,a\,b^2\,{\mathrm {e}}^{2\,x}\right )}{a^2+b^2}+\frac {\ln \left ({\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 \operatorname {csch}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________