Optimal. Leaf size=37 \[ \frac{2 \tanh ^5(x)}{5}-\frac{\tanh ^3(x)}{3}-\frac{2}{5} i \text{sech}^5(x)+\frac{2}{3} i \text{sech}^3(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.118239, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {2711, 2607, 14, 2606, 30} \[ \frac{2 \tanh ^5(x)}{5}-\frac{\tanh ^3(x)}{3}-\frac{2}{5} i \text{sech}^5(x)+\frac{2}{3} i \text{sech}^3(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2711
Rule 2607
Rule 14
Rule 2606
Rule 30
Rubi steps
\begin{align*} \int \frac{\tanh ^2(x)}{(i+\sinh (x))^2} \, dx &=-\int \left (\text{sech}^4(x) \tanh ^2(x)+2 i \text{sech}^3(x) \tanh ^3(x)-\text{sech}^2(x) \tanh ^4(x)\right ) \, dx\\ &=-\left (2 i \int \text{sech}^3(x) \tanh ^3(x) \, dx\right )-\int \text{sech}^4(x) \tanh ^2(x) \, dx+\int \text{sech}^2(x) \tanh ^4(x) \, dx\\ &=-\left (i \operatorname{Subst}\left (\int x^4 \, dx,x,i \tanh (x)\right )\right )-i \operatorname{Subst}\left (\int x^2 \left (1+x^2\right ) \, dx,x,i \tanh (x)\right )-2 i \operatorname{Subst}\left (\int x^2 \left (-1+x^2\right ) \, dx,x,\text{sech}(x)\right )\\ &=\frac{\tanh ^5(x)}{5}-i \operatorname{Subst}\left (\int \left (x^2+x^4\right ) \, dx,x,i \tanh (x)\right )-2 i \operatorname{Subst}\left (\int \left (-x^2+x^4\right ) \, dx,x,\text{sech}(x)\right )\\ &=\frac{2}{3} i \text{sech}^3(x)-\frac{2}{5} i \text{sech}^5(x)-\frac{\tanh ^3(x)}{3}+\frac{2 \tanh ^5(x)}{5}\\ \end{align*}
Mathematica [B] time = 0.0923001, size = 84, normalized size = 2.27 \[ \frac{140 \sinh (x)-44 \sinh (2 x)-4 \sinh (3 x)-55 i \cosh (x)-16 i \cosh (2 x)+11 i \cosh (3 x)+80 i}{240 \left (\cosh \left (\frac{x}{2}\right )-i \sinh \left (\frac{x}{2}\right )\right )^5 \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.059, size = 70, normalized size = 1.9 \begin{align*}{\frac{1}{4} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}+{2\,i \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-4}}-{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-2}}+{\frac{4}{5} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-5}}-{\frac{5}{3} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}}-{\frac{1}{4} \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.08837, size = 266, normalized size = 7.19 \begin{align*} \frac{8 i \, e^{\left (-x\right )}}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} - \frac{40 \, e^{\left (-2 \, x\right )}}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} - \frac{40 i \, e^{\left (-3 \, x\right )}}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} + \frac{30 \, e^{\left (-4 \, x\right )}}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} + \frac{2}{60 i \, e^{\left (-x\right )} - 75 \, e^{\left (-2 \, x\right )} - 75 \, e^{\left (-4 \, x\right )} - 60 i \, e^{\left (-5 \, x\right )} + 15 \, e^{\left (-6 \, x\right )} + 15} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.01259, size = 171, normalized size = 4.62 \begin{align*} -\frac{30 \, e^{\left (4 \, x\right )} + 40 i \, e^{\left (3 \, x\right )} - 40 \, e^{\left (2 \, x\right )} - 8 i \, e^{x} + 2}{15 \, e^{\left (6 \, x\right )} + 60 i \, e^{\left (5 \, x\right )} - 75 \, e^{\left (4 \, x\right )} - 75 \, e^{\left (2 \, x\right )} - 60 i \, e^{x} + 15} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.823135, size = 71, normalized size = 1.92 \begin{align*} \frac{- 2 e^{4 x} - \frac{8 i e^{3 x}}{3} + \frac{8 e^{2 x}}{3} + \frac{8 i e^{x}}{15} - \frac{2}{15}}{e^{6 x} + 4 i e^{5 x} - 5 e^{4 x} - 5 e^{2 x} - 4 i e^{x} + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13342, size = 55, normalized size = 1.49 \begin{align*} \frac{i}{4 \,{\left (e^{x} - i\right )}} - \frac{15 i \, e^{\left (4 \, x\right )} + 30 \, e^{\left (3 \, x\right )} + 40 i \, e^{\left (2 \, x\right )} - 50 \, e^{x} - 7 i}{60 \,{\left (e^{x} + i\right )}^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]