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.103316, antiderivative size = 31, normalized size of antiderivative = 1., 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 3518
Rule 3110
Rule 3770
Rule 3074
Rule 206
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.0514349, 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]
________________________________________________________________________________________
Maple [A] time = 0.052, size = 41, normalized size = 1.3 \begin{align*} -\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) +{\frac{4\,i}{5}}\sqrt{5}\arctan \left ({\frac{\sqrt{5}}{5} \left ( 2\,\tanh \left ( x/2 \right ) +i \right ) } \right ) +\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.70802, size = 57, normalized size = 1.84 \begin{align*} \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 ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.79643, size = 169, normalized size = 5.45 \begin{align*} -\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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}{\left (x \right )}}{2 \coth{\left (x \right )} + i}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13408, size = 35, normalized size = 1.13 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]