Optimal. Leaf size=36 \[ -i x+\frac{1}{3} \tanh ^3(x) (-\text{csch}(x)+i)+\frac{1}{3} \tanh (x) (-2 \text{csch}(x)+3 i) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0732533, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3888, 3882, 8} \[ -i x+\frac{1}{3} \tanh ^3(x) (-\text{csch}(x)+i)+\frac{1}{3} \tanh (x) (-2 \text{csch}(x)+3 i) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3888
Rule 3882
Rule 8
Rubi steps
\begin{align*} \int \frac{\tanh ^2(x)}{i+\text{csch}(x)} \, dx &=\int (-i+\text{csch}(x)) \tanh ^4(x) \, dx\\ &=\frac{1}{3} (i-\text{csch}(x)) \tanh ^3(x)-\frac{1}{3} \int (3 i-2 \text{csch}(x)) \tanh ^2(x) \, dx\\ &=\frac{1}{3} (3 i-2 \text{csch}(x)) \tanh (x)+\frac{1}{3} (i-\text{csch}(x)) \tanh ^3(x)+\frac{1}{3} \int -3 i \, dx\\ &=-i x+\frac{1}{3} (3 i-2 \text{csch}(x)) \tanh (x)+\frac{1}{3} (i-\text{csch}(x)) \tanh ^3(x)\\ \end{align*}
Mathematica [A] time = 0.0836784, size = 71, normalized size = 1.97 \[ \frac{2 i \sinh (x)-4 \cosh (2 x)+(6 x+5 i) (\sinh (x)-i) \cosh (x)}{6 \left (\cosh \left (\frac{x}{2}\right )-i \sinh \left (\frac{x}{2}\right )\right ) \left (\cosh \left (\frac{x}{2}\right )+i \sinh \left (\frac{x}{2}\right )\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.047, size = 67, normalized size = 1.9 \begin{align*} -i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) +{{\frac{3\,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}}+ \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-2}+i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) +{{\frac{i}{2}} \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 [A] time = 1.00852, size = 57, normalized size = 1.58 \begin{align*} -i \, x - \frac{10 \, e^{\left (-x\right )} + 6 \, e^{\left (-3 \, x\right )} + 8 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 = 1.6519, size = 149, normalized size = 4.14 \begin{align*} \frac{-3 i \, x e^{\left (4 \, x\right )} - 6 \,{\left (x + 1\right )} e^{\left (3 \, x\right )} - 2 \,{\left (3 \, x + 5\right )} e^{x} + 3 i \, x + 8 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 [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tanh ^{2}{\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 [A] time = 1.17459, size = 51, normalized size = 1.42 \begin{align*} \frac{i}{2 \,{\left (i \, e^{x} - 1\right )}} - \frac{15 \, e^{\left (2 \, x\right )} - 24 i \, e^{x} - 13}{6 \,{\left (e^{x} - i\right )}^{3}} - i \, \log \left (i \, e^{x}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]