Optimal. Leaf size=26 \[ \frac{1}{2} i \text{sech}^2(x)+\frac{1}{2} \tan ^{-1}(\sinh (x))-\frac{1}{2} \tanh (x) \text{sech}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0551926, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.454, Rules used = {2706, 2606, 30, 2611, 3770} \[ \frac{1}{2} i \text{sech}^2(x)+\frac{1}{2} \tan ^{-1}(\sinh (x))-\frac{1}{2} \tanh (x) \text{sech}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2706
Rule 2606
Rule 30
Rule 2611
Rule 3770
Rubi steps
\begin{align*} \int \frac{\tanh (x)}{i+\sinh (x)} \, dx &=-\left (i \int \text{sech}^2(x) \tanh (x) \, dx\right )+\int \text{sech}(x) \tanh ^2(x) \, dx\\ &=-\frac{1}{2} \text{sech}(x) \tanh (x)+i \operatorname{Subst}(\int x \, dx,x,\text{sech}(x))+\frac{1}{2} \int \text{sech}(x) \, dx\\ &=\frac{1}{2} \tan ^{-1}(\sinh (x))+\frac{1}{2} i \text{sech}^2(x)-\frac{1}{2} \text{sech}(x) \tanh (x)\\ \end{align*}
Mathematica [A] time = 0.0204506, size = 20, normalized size = 0.77 \[ \frac{1}{2} \tan ^{-1}(\sinh (x))-\frac{1}{2 (\sinh (x)+i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.032, size = 45, normalized size = 1.7 \begin{align*} -{\frac{i}{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) -{i \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-2}}+{\frac{i}{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) + \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.16807, size = 57, normalized size = 2.19 \begin{align*} \frac{e^{\left (-x\right )}}{-2 i \, e^{\left (-x\right )} + e^{\left (-2 \, x\right )} - 1} + \frac{1}{2} i \, \log \left (i \, e^{\left (-x\right )} + 1\right ) - \frac{1}{2} i \, \log \left (i \, e^{\left (-x\right )} - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.13283, size = 157, normalized size = 6.04 \begin{align*} \frac{{\left (i \, e^{\left (2 \, x\right )} - 2 \, e^{x} - i\right )} \log \left (e^{x} + i\right ) +{\left (-i \, e^{\left (2 \, x\right )} + 2 \, e^{x} + i\right )} \log \left (e^{x} - i\right ) - 2 \, e^{x}}{2 \,{\left (e^{\left (2 \, x\right )} + 2 i \, e^{x} - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.269696, size = 32, normalized size = 1.23 \begin{align*} \operatorname{RootSum}{\left (4 z^{2} + 1, \left ( i \mapsto i \log{\left (2 i + e^{x} \right )} \right )\right )} - \frac{e^{x}}{e^{2 x} + 2 i e^{x} - 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.08919, size = 72, normalized size = 2.77 \begin{align*} \frac{-i \, e^{\left (-x\right )} + i \, e^{x} + 2}{4 \,{\left (e^{\left (-x\right )} - e^{x} - 2 i\right )}} + \frac{1}{4} i \, \log \left (-e^{\left (-x\right )} + e^{x} + 2 i\right ) - \frac{1}{4} i \, \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]