Optimal. Leaf size=31 \[ -i \tan ^{-1}(\sinh (x))-\frac {2 \tanh ^{-1}\left (\frac {\cosh (x)-2 i \sinh (x)}{\sqrt {5}}\right )}{\sqrt {5}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3518, 3110, 3770, 3074, 206} \[ -i \tan ^{-1}(\sinh (x))-\frac {2 \tanh ^{-1}\left (\frac {\cosh (x)-2 i \sinh (x)}{\sqrt {5}}\right )}{\sqrt {5}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3074
Rule 3110
Rule 3518
Rule 3770
Rubi steps
\begin {align*} \int \frac {\text {sech}(x)}{i+2 \coth (x)} \, dx &=-\left (i \int \frac {\tanh (x)}{-2 i \cosh (x)+\sinh (x)} \, dx\right )\\ &=-\int \left (i \text {sech}(x)-\frac {2 i}{2 \cosh (x)+i \sinh (x)}\right ) \, dx\\ &=-(i \int \text {sech}(x) \, dx)+2 i \int \frac {1}{2 \cosh (x)+i \sinh (x)} \, dx\\ &=-i \tan ^{-1}(\sinh (x))-2 \operatorname {Subst}\left (\int \frac {1}{5-x^2} \, dx,x,\cosh (x)-2 i \sinh (x)\right )\\ &=-i \tan ^{-1}(\sinh (x))-\frac {2 \tanh ^{-1}\left (\frac {\cosh (x)-2 i \sinh (x)}{\sqrt {5}}\right )}{\sqrt {5}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 38, normalized size = 1.23 \[ -\frac {4 \tanh ^{-1}\left (\frac {1-2 i \tanh \left (\frac {x}{2}\right )}{\sqrt {5}}\right )}{\sqrt {5}}-2 i \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 41, normalized size = 1.32 \[ -\frac {2}{5} \, \sqrt {5} \log \left (\left (\frac {2}{5} i + \frac {1}{5}\right ) \, \sqrt {5} + e^{x}\right ) + \frac {2}{5} \, \sqrt {5} \log \left (-\left (\frac {2}{5} i + \frac {1}{5}\right ) \, \sqrt {5} + e^{x}\right ) + \log \left (e^{x} + i\right ) - \log \left (e^{x} - i\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 26, normalized size = 0.84 \[ \frac {4}{5} i \, \sqrt {5} \arctan \left (\left (\frac {1}{5} i + \frac {2}{5}\right ) \, \sqrt {5} e^{x}\right ) + \log \left (e^{x} + i\right ) - \log \left (e^{x} - i\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.17, size = 41, normalized size = 1.32 \[ \frac {4 i \sqrt {5}\, \arctan \left (\frac {\left (2 \tanh \left (\frac {x}{2}\right )+i\right ) \sqrt {5}}{5}\right )}{5}+\ln \left (\tanh \left (\frac {x}{2}\right )+i\right )-\ln \left (\tanh \left (\frac {x}{2}\right )-i\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 42, normalized size = 1.35 \[ \frac {2}{5} \, \sqrt {5} \log \left (-\frac {2 \, \sqrt {5} - \left (4 i + 2\right ) \, e^{\left (-x\right )}}{2 \, \sqrt {5} + \left (4 i + 2\right ) \, e^{\left (-x\right )}}\right ) + 2 i \, \arctan \left (e^{\left (-x\right )}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.51, size = 65, normalized size = 2.10 \[ \ln \left ({\mathrm {e}}^x\,\left (32+64{}\mathrm {i}\right )-64+32{}\mathrm {i}\right )-\ln \left ({\mathrm {e}}^x\,\left (32+64{}\mathrm {i}\right )+64-32{}\mathrm {i}\right )-\frac {2\,\sqrt {5}\,\ln \left ({\mathrm {e}}^x\,\left (-\frac {256}{5}+\frac {192}{5}{}\mathrm {i}\right )+\sqrt {5}\,\left (-\frac {128}{5}-\frac {64}{5}{}\mathrm {i}\right )\right )}{5}+\frac {2\,\sqrt {5}\,\ln \left ({\mathrm {e}}^x\,\left (-\frac {256}{5}+\frac {192}{5}{}\mathrm {i}\right )+\sqrt {5}\,\left (\frac {128}{5}+\frac {64}{5}{}\mathrm {i}\right )\right )}{5} \]
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 )}}{2 \coth {\relax (x )} + i}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________