Optimal. Leaf size=47 \[ \frac{2 \tanh ^7(x)}{7}-\frac{\tanh ^5(x)}{5}+\frac{2}{7} i \text{sech}^7(x)-\frac{4}{5} i \text{sech}^5(x)+\frac{2}{3} i \text{sech}^3(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.122853, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {2711, 2607, 14, 2606, 270, 30} \[ \frac{2 \tanh ^7(x)}{7}-\frac{\tanh ^5(x)}{5}+\frac{2}{7} i \text{sech}^7(x)-\frac{4}{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 270
Rule 30
Rubi steps
\begin{align*} \int \frac{\tanh ^4(x)}{(i+\sinh (x))^2} \, dx &=\int \left (-\text{sech}^4(x) \tanh ^4(x)-2 i \text{sech}^3(x) \tanh ^5(x)+\text{sech}^2(x) \tanh ^6(x)\right ) \, dx\\ &=-\left (2 i \int \text{sech}^3(x) \tanh ^5(x) \, dx\right )-\int \text{sech}^4(x) \tanh ^4(x) \, dx+\int \text{sech}^2(x) \tanh ^6(x) \, dx\\ &=i \operatorname{Subst}\left (\int x^6 \, dx,x,i \tanh (x)\right )+i \operatorname{Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,i \tanh (x)\right )+2 i \operatorname{Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\text{sech}(x)\right )\\ &=\frac{\tanh ^7(x)}{7}+i \operatorname{Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,i \tanh (x)\right )+2 i \operatorname{Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\text{sech}(x)\right )\\ &=\frac{2}{3} i \text{sech}^3(x)-\frac{4}{5} i \text{sech}^5(x)+\frac{2}{7} i \text{sech}^7(x)-\frac{\tanh ^5(x)}{5}+\frac{2 \tanh ^7(x)}{7}\\ \end{align*}
Mathematica [B] time = 0.146499, size = 112, normalized size = 2.38 \[ -\frac{1232 \sinh (x)+824 \sinh (2 x)-1896 \sinh (3 x)+412 \sinh (4 x)+72 \sinh (5 x)+1442 i \cosh (x)-1664 i \cosh (2 x)+309 i \cosh (3 x)+288 i \cosh (4 x)-103 i \cosh (5 x)-672 i}{13440 \left (\cosh \left (\frac{x}{2}\right )-i \sinh \left (\frac{x}{2}\right )\right )^7 \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.093, size = 116, normalized size = 2.5 \begin{align*}{-{\frac{i}{8}} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-2}}+{\frac{1}{12} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-3}}+{\frac{1}{8} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}+{2\,i \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-6}}-{i \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-4}}-{{\frac{i}{8}} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-2}}+{\frac{4}{7} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-7}}-{\frac{12}{5} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-5}}-{\frac{1}{12} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}}-{\frac{1}{8} \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.11311, size = 774, normalized size = 16.47 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.00328, size = 351, normalized size = 7.47 \begin{align*} -\frac{210 \, e^{\left (8 \, x\right )} + 280 i \, e^{\left (7 \, x\right )} - 280 \, e^{\left (6 \, x\right )} + 168 i \, e^{\left (5 \, x\right )} + 28 \, e^{\left (4 \, x\right )} + 136 i \, e^{\left (3 \, x\right )} - 264 \, e^{\left (2 \, x\right )} - 72 i \, e^{x} + 18}{105 \, e^{\left (10 \, x\right )} + 420 i \, e^{\left (9 \, x\right )} - 315 \, e^{\left (8 \, x\right )} + 840 i \, e^{\left (7 \, x\right )} - 1470 \, e^{\left (6 \, x\right )} - 1470 \, e^{\left (4 \, x\right )} - 840 i \, e^{\left (3 \, x\right )} - 315 \, e^{\left (2 \, x\right )} - 420 i \, e^{x} + 105} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 2.53294, size = 139, normalized size = 2.96 \begin{align*} \frac{- 2 e^{8 x} - \frac{8 i e^{7 x}}{3} + \frac{8 e^{6 x}}{3} - \frac{8 i e^{5 x}}{5} - \frac{4 e^{4 x}}{15} - \frac{136 i e^{3 x}}{105} + \frac{88 e^{2 x}}{35} + \frac{24 i e^{x}}{35} - \frac{6}{35}}{e^{10 x} + 4 i e^{9 x} - 3 e^{8 x} + 8 i e^{7 x} - 14 e^{6 x} - 14 e^{4 x} - 8 i e^{3 x} - 3 e^{2 x} - 4 i e^{x} + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.16407, size = 88, normalized size = 1.87 \begin{align*} -\frac{-6 i \, e^{\left (2 \, x\right )} - 9 \, e^{x} + 5 i}{24 \,{\left (e^{x} - i\right )}^{3}} - \frac{210 i \, e^{\left (6 \, x\right )} - 105 \, e^{\left (5 \, x\right )} + 175 i \, e^{\left (4 \, x\right )} - 910 \, e^{\left (3 \, x\right )} - 756 i \, e^{\left (2 \, x\right )} + 427 \, e^{x} + 31 i}{840 \,{\left (e^{x} + i\right )}^{7}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]