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.07, antiderivative size = 36, normalized size of antiderivative = 1.00, 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 8
Rule 3882
Rule 3888
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.09, 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]
________________________________________________________________________________________
fricas [B] time = 1.46, size = 51, normalized size = 1.42 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 38, normalized size = 1.06 \[ \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 ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.21, size = 67, normalized size = 1.86 \[ i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {i}{2 \tanh \left (\frac {x}{2}\right )+2 i}+\frac {3 i}{2 \left (\tanh \left (\frac {x}{2}\right )-i\right )}+\frac {2 i}{3 \left (\tanh \left (\frac {x}{2}\right )-i\right )^{3}}+\frac {1}{\left (\tanh \left (\frac {x}{2}\right )-i\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 42, normalized size = 1.17 \[ -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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.63, size = 85, normalized size = 2.36 \[ -x\,1{}\mathrm {i}+\frac {\frac {5\,{\mathrm {e}}^x}{6}-\frac {1}{2}{}\mathrm {i}}{1-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^x\,2{}\mathrm {i}}-\frac {5}{6\,\left ({\mathrm {e}}^x-\mathrm {i}\right )}+\frac {1}{2\,\left ({\mathrm {e}}^x+1{}\mathrm {i}\right )}-\frac {\frac {5}{6}-\frac {5\,{\mathrm {e}}^{2\,x}}{6}+{\mathrm {e}}^x\,1{}\mathrm {i}}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}-{\mathrm {e}}^{3\,x}+3\,{\mathrm {e}}^x-\mathrm {i}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tanh ^{2}{\relax (x )}}{\operatorname {csch}{\relax (x )} + i}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________