Optimal. Leaf size=23 \[ -\frac{1}{3} i \tanh ^3(x)+\frac{\text{sech}^3(x)}{3}-\text{sech}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0762514, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {2706, 2607, 30, 2606} \[ -\frac{1}{3} i \tanh ^3(x)+\frac{\text{sech}^3(x)}{3}-\text{sech}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2706
Rule 2607
Rule 30
Rule 2606
Rubi steps
\begin{align*} \int \frac{\tanh ^2(x)}{i+\sinh (x)} \, dx &=-\left (i \int \text{sech}^2(x) \tanh ^2(x) \, dx\right )+\int \text{sech}(x) \tanh ^3(x) \, dx\\ &=\operatorname{Subst}\left (\int x^2 \, dx,x,i \tanh (x)\right )+\operatorname{Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\text{sech}(x)\right )\\ &=-\text{sech}(x)+\frac{\text{sech}^3(x)}{3}-\frac{1}{3} i \tanh ^3(x)\\ \end{align*}
Mathematica [B] time = 0.0590886, size = 67, normalized size = 2.91 \[ \frac{4 i \sinh (x)-\cosh (2 x)+(5-5 i \sinh (x)) \cosh (x)-3}{6 \left (\cosh \left (\frac{x}{2}\right )-i \sinh \left (\frac{x}{2}\right )\right )^3 \left (\cosh \left (\frac{x}{2}\right )+i \sinh \left (\frac{x}{2}\right )\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.045, size = 47, normalized size = 2. \begin{align*}{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}-{{\frac{2\,i}{3}} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}}-{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-1}}+ \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.11683, size = 147, normalized size = 6.39 \begin{align*} \frac{2 \, e^{\left (-x\right )}}{-6 i \, e^{\left (-x\right )} - 6 i \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} - 3} + \frac{6 i \, e^{\left (-2 \, x\right )}}{-6 i \, e^{\left (-x\right )} - 6 i \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} - 3} - \frac{6 \, e^{\left (-3 \, x\right )}}{-6 i \, e^{\left (-x\right )} - 6 i \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} - 3} + \frac{2 i}{-6 i \, e^{\left (-x\right )} - 6 i \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} - 3} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.03306, size = 111, normalized size = 4.83 \begin{align*} -\frac{6 \, e^{\left (3 \, x\right )} + 6 i \, e^{\left (2 \, x\right )} - 2 \, e^{x} + 2 i}{3 \, e^{\left (4 \, x\right )} + 6 i \, e^{\left (3 \, x\right )} + 6 i \, e^{x} - 3} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.379415, size = 48, normalized size = 2.09 \begin{align*} \frac{- 2 e^{3 x} - 2 i e^{2 x} + \frac{2 e^{x}}{3} - \frac{2 i}{3}}{e^{4 x} + 2 i e^{3 x} + 2 i e^{x} - 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12204, size = 39, normalized size = 1.7 \begin{align*} -\frac{1}{2 \,{\left (e^{x} - i\right )}} - \frac{9 \, e^{\left (2 \, x\right )} + 12 i \, e^{x} - 7}{6 \,{\left (e^{x} + i\right )}^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]