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.12, antiderivative size = 37, normalized size of antiderivative = 1.00, 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 14
Rule 30
Rule 2606
Rule 2607
Rule 2711
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.10, 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]
________________________________________________________________________________________
fricas [B] time = 1.58, size = 58, normalized size = 1.57 \[ -\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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.37, size = 41, normalized size = 1.11 \[ \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}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.08, size = 70, normalized size = 1.89 \[ \frac {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 )}+\frac {1}{4 \tanh \left (\frac {x}{2}\right )-4 i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.36, size = 197, normalized size = 5.32 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.30, size = 139, normalized size = 3.76 \[ \frac {\left (4\,{\mathrm {e}}^{3\,x}-4\,{\mathrm {e}}^x\right )\,\left (2\,{\mathrm {e}}^{4\,x}-\frac {8\,{\mathrm {e}}^{2\,x}}{3}+\frac {2}{15}\right )\,1{}\mathrm {i}}{{\left ({\mathrm {e}}^{2\,x}+1\right )}^5}-\frac {\left ({\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{2\,x}+1\right )\,\left (2\,{\mathrm {e}}^{4\,x}-\frac {8\,{\mathrm {e}}^{2\,x}}{3}+\frac {2}{15}\right )}{{\left ({\mathrm {e}}^{2\,x}+1\right )}^5}-\frac {\left (4\,{\mathrm {e}}^{3\,x}-4\,{\mathrm {e}}^x\right )\,\left (\frac {8\,{\mathrm {e}}^{3\,x}}{3}-\frac {8\,{\mathrm {e}}^x}{15}\right )}{{\left ({\mathrm {e}}^{2\,x}+1\right )}^5}-\frac {\left (\frac {8\,{\mathrm {e}}^{3\,x}}{3}-\frac {8\,{\mathrm {e}}^x}{15}\right )\,\left ({\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{2\,x}+1\right )\,1{}\mathrm {i}}{{\left ({\mathrm {e}}^{2\,x}+1\right )}^5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.20, size = 66, normalized size = 1.78 \[ \frac {- 30 e^{4 x} - 40 i e^{3 x} + 40 e^{2 x} + 8 i e^{x} - 2}{15 e^{6 x} + 60 i e^{5 x} - 75 e^{4 x} - 75 e^{2 x} - 60 i e^{x} + 15} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________