Optimal. Leaf size=31 \[ -i \text {ArcTan}(\sinh (x))-\frac {2 \tanh ^{-1}\left (\frac {\cosh (x)-2 i \sinh (x)}{\sqrt {5}}\right )}{\sqrt {5}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, 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 = {3599, 3189,
3855, 3153, 212} \begin {gather*} -i \text {ArcTan}(\sinh (x))-\frac {2 \tanh ^{-1}\left (\frac {\cosh (x)-2 i \sinh (x)}{\sqrt {5}}\right )}{\sqrt {5}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3153
Rule 3189
Rule 3599
Rule 3855
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 \text {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.04, size = 38, normalized size = 1.23 \begin {gather*} -2 i \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )-\frac {4 \tanh ^{-1}\left (\frac {1-2 i \tanh \left (\frac {x}{2}\right )}{\sqrt {5}}\right )}{\sqrt {5}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.28, size = 41, normalized size = 1.32
method | result | size |
default | \(-\ln \left (\tanh \left (\frac {x}{2}\right )-i\right )+\ln \left (\tanh \left (\frac {x}{2}\right )+i\right )+\frac {4 i \sqrt {5}\, \arctan \left (\frac {\left (2 \tanh \left (\frac {x}{2}\right )+i\right ) \sqrt {5}}{5}\right )}{5}\) | \(41\) |
risch | \(-\ln \left ({\mathrm e}^{x}-i\right )+\ln \left ({\mathrm e}^{x}+i\right )+\frac {2 \sqrt {5}\, \ln \left ({\mathrm e}^{x}-\frac {2 i \sqrt {5}}{5}-\frac {\sqrt {5}}{5}\right )}{5}-\frac {2 \sqrt {5}\, \ln \left ({\mathrm e}^{x}+\frac {2 i \sqrt {5}}{5}+\frac {\sqrt {5}}{5}\right )}{5}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 38, normalized size = 1.23 \begin {gather*} \frac {2}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - \left (2 i + 1\right ) \, e^{\left (-x\right )}}{\sqrt {5} + \left (2 i + 1\right ) \, e^{\left (-x\right )}}\right ) + 2 i \, \arctan \left (e^{\left (-x\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 41, normalized size = 1.32 \begin {gather*} -\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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}{\left (x \right )}}{2 \coth {\left (x \right )} + i}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 26, normalized size = 0.84 \begin {gather*} \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 ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.51, size = 65, normalized size = 2.10 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________