Optimal. Leaf size=38 \[ x+\frac{2 i \cosh ^3(x)}{3 (1+i \sinh (x))^3}-\frac{2 i \cosh (x)}{1+i \sinh (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.108817, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {4391, 2670, 2680, 8} \[ x+\frac{2 i \cosh ^3(x)}{3 (1+i \sinh (x))^3}-\frac{2 i \cosh (x)}{1+i \sinh (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4391
Rule 2670
Rule 2680
Rule 8
Rubi steps
\begin{align*} \int (\text{sech}(x)-i \tanh (x))^4 \, dx &=\int \text{sech}^4(x) (1-i \sinh (x))^4 \, dx\\ &=\int \frac{\cosh ^4(x)}{(1+i \sinh (x))^4} \, dx\\ &=\frac{2 i \cosh ^3(x)}{3 (1+i \sinh (x))^3}-\int \frac{\cosh ^2(x)}{(1+i \sinh (x))^2} \, dx\\ &=\frac{2 i \cosh ^3(x)}{3 (1+i \sinh (x))^3}-\frac{2 i \cosh (x)}{1+i \sinh (x)}+\int 1 \, dx\\ &=x+\frac{2 i \cosh ^3(x)}{3 (1+i \sinh (x))^3}-\frac{2 i \cosh (x)}{1+i \sinh (x)}\\ \end{align*}
Mathematica [A] time = 0.0535444, size = 75, normalized size = 1.97 \[ \frac{3 (3 x+8 i) \cosh \left (\frac{x}{2}\right )-(3 x+16 i) \cosh \left (\frac{3 x}{2}\right )+6 i \sinh \left (\frac{x}{2}\right ) (2 x+x \cosh (x)+4 i)}{6 \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.054, size = 89, normalized size = 2.3 \begin{align*} -2\, \left ( 2/3+1/3\, \left ({\rm sech} \left (x\right ) \right ) ^{2} \right ) \tanh \left ( x \right ) -4\,i \left ({\frac{ \left ( \sinh \left ( x \right ) \right ) ^{2}}{3\, \left ( \cosh \left ( x \right ) \right ) ^{3}}}+{\frac{ \left ( \sinh \left ( x \right ) \right ) ^{2}}{3\,\cosh \left ( x \right ) }}-{\frac{\cosh \left ( x \right ) }{3}} \right ) +3\,{\frac{\sinh \left ( x \right ) }{ \left ( \cosh \left ( x \right ) \right ) ^{3}}}+4\,i \left ( -{\frac{ \left ( \sinh \left ( x \right ) \right ) ^{2}}{3\, \left ( \cosh \left ( x \right ) \right ) ^{3}}}+{\frac{2\, \left ( \sinh \left ( x \right ) \right ) ^{2}}{3\,\cosh \left ( x \right ) }}-{\frac{2\,\cosh \left ( x \right ) }{3}} \right ) +x-\tanh \left ( x \right ) -{\frac{ \left ( \tanh \left ( x \right ) \right ) ^{3}}{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.06726, size = 244, normalized size = 6.42 \begin{align*} -2 \, \tanh \left (x\right )^{3} + x - \frac{4 \,{\left (3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + 2\right )}}{3 \,{\left (3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1\right )}} - \frac{8 i \, e^{\left (-x\right )}}{3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1} + \frac{4 \, e^{\left (-2 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1} - \frac{16 i \, e^{\left (-3 \, x\right )}}{3 \,{\left (3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1\right )}} - \frac{8 i \, e^{\left (-5 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1} + \frac{4}{3 \,{\left (3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1\right )}} + \frac{32 i}{3 \,{\left (e^{\left (-x\right )} + e^{x}\right )}^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.09844, size = 154, normalized size = 4.05 \begin{align*} \frac{3 \, x e^{\left (3 \, x\right )} +{\left (-9 i \, x - 24 i\right )} e^{\left (2 \, x\right )} - 3 \,{\left (3 \, x + 8\right )} e^{x} + 3 i \, x + 16 i}{3 \, e^{\left (3 \, x\right )} - 9 i \, e^{\left (2 \, x\right )} - 9 \, e^{x} + 3 i} \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 \left (- i \tanh{\left (x \right )} + \operatorname{sech}{\left (x \right )}\right )^{4}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13222, size = 30, normalized size = 0.79 \begin{align*} x - \frac{24 i \, e^{\left (2 \, x\right )} + 24 \, e^{x} - 16 i}{3 \,{\left (e^{x} - i\right )}^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]