Optimal. Leaf size=28 \[ -\frac{1}{2} \text{sech}^2(x)-\frac{1}{2} i \tan ^{-1}(\sinh (x))+\frac{1}{2} i \tanh (x) \text{sech}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0801613, antiderivative size = 28, normalized size of antiderivative = 1., 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 = {3872, 2706, 2606, 30, 2611, 3770} \[ -\frac{1}{2} \text{sech}^2(x)-\frac{1}{2} i \tan ^{-1}(\sinh (x))+\frac{1}{2} i \tanh (x) \text{sech}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2706
Rule 2606
Rule 30
Rule 2611
Rule 3770
Rubi steps
\begin{align*} \int \frac{\text{sech}(x)}{i+\text{csch}(x)} \, dx &=i \int \frac{\tanh (x)}{i-\sinh (x)} \, dx\\ &=-\left (i \int \text{sech}(x) \tanh ^2(x) \, dx\right )+\int \text{sech}^2(x) \tanh (x) \, dx\\ &=\frac{1}{2} i \text{sech}(x) \tanh (x)-\frac{1}{2} i \int \text{sech}(x) \, dx-\operatorname{Subst}(\int x \, dx,x,\text{sech}(x))\\ &=-\frac{1}{2} i \tan ^{-1}(\sinh (x))-\frac{\text{sech}^2(x)}{2}+\frac{1}{2} i \text{sech}(x) \tanh (x)\\ \end{align*}
Mathematica [A] time = 0.0295167, size = 20, normalized size = 0.71 \[ -\frac{1}{2} i \left (\tan ^{-1}(\sinh (x))+\frac{1}{-\sinh (x)+i}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.033, size = 43, normalized size = 1.5 \begin{align*}{-i \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}+ \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-2}-{\frac{1}{2}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) }+{\frac{1}{2}\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 [B] time = 1.04381, size = 55, normalized size = 1.96 \begin{align*} -\frac{2 i \, e^{\left (-x\right )}}{4 i \, e^{\left (-x\right )} + 2 \, e^{\left (-2 \, x\right )} - 2} - \frac{1}{2} \, \log \left (e^{\left (-x\right )} + i\right ) + \frac{1}{2} \, \log \left (e^{\left (-x\right )} - i\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.63444, size = 155, normalized size = 5.54 \begin{align*} \frac{{\left (e^{\left (2 \, x\right )} - 2 i \, e^{x} - 1\right )} \log \left (e^{x} + i\right ) -{\left (e^{\left (2 \, x\right )} - 2 i \, e^{x} - 1\right )} \log \left (e^{x} - i\right ) + 2 i \, e^{x}}{2 \, e^{\left (2 \, x\right )} - 4 i \, e^{x} - 2} \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 )}}{\operatorname{csch}{\left (x \right )} + i}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.1428, size = 72, normalized size = 2.57 \begin{align*} \frac{e^{\left (-x\right )} - e^{x} - 2 i}{4 \,{\left (e^{\left (-x\right )} - e^{x} + 2 i\right )}} + \frac{1}{4} \, \log \left (-i \, e^{\left (-x\right )} + i \, e^{x} - 2\right ) - \frac{1}{4} \, \log \left (-e^{\left (-x\right )} + e^{x} - 2 i\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]