Optimal. Leaf size=36 \[ -\frac{1}{4} i \tanh ^4(x)+\frac{3}{8} \tan ^{-1}(\sinh (x))-\frac{1}{4} \tanh ^3(x) \text{sech}(x)-\frac{3}{8} \tanh (x) \text{sech}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.091929, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {2706, 2607, 30, 2611, 3770} \[ -\frac{1}{4} i \tanh ^4(x)+\frac{3}{8} \tan ^{-1}(\sinh (x))-\frac{1}{4} \tanh ^3(x) \text{sech}(x)-\frac{3}{8} \tanh (x) \text{sech}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2706
Rule 2607
Rule 30
Rule 2611
Rule 3770
Rubi steps
\begin{align*} \int \frac{\tanh ^3(x)}{i+\sinh (x)} \, dx &=-\left (i \int \text{sech}^2(x) \tanh ^3(x) \, dx\right )+\int \text{sech}(x) \tanh ^4(x) \, dx\\ &=-\frac{1}{4} \text{sech}(x) \tanh ^3(x)-i \operatorname{Subst}\left (\int x^3 \, dx,x,i \tanh (x)\right )+\frac{3}{4} \int \text{sech}(x) \tanh ^2(x) \, dx\\ &=-\frac{3}{8} \text{sech}(x) \tanh (x)-\frac{1}{4} \text{sech}(x) \tanh ^3(x)-\frac{1}{4} i \tanh ^4(x)+\frac{3}{8} \int \text{sech}(x) \, dx\\ &=\frac{3}{8} \tan ^{-1}(\sinh (x))-\frac{3}{8} \text{sech}(x) \tanh (x)-\frac{1}{4} \text{sech}(x) \tanh ^3(x)-\frac{1}{4} i \tanh ^4(x)\\ \end{align*}
Mathematica [A] time = 0.0772882, size = 42, normalized size = 1.17 \[ \frac{1}{8} \left (3 \tan ^{-1}(\sinh (x))-\frac{5 \sinh ^2(x)+i \sinh (x)+2}{(\sinh (x)-i) (\sinh (x)+i)^2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.059, size = 79, normalized size = 2.2 \begin{align*} -{\frac{3\,i}{8}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) +{{\frac{i}{4}} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-2}}+{\frac{1}{4} \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}-{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-4}}+{\frac{3\,i}{8}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) + \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}+{\frac{1}{2} \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.03303, size = 128, normalized size = 3.56 \begin{align*} \frac{5 \, e^{\left (-x\right )} + 2 i \, e^{\left (-2 \, x\right )} - 2 \, e^{\left (-3 \, x\right )} - 2 i \, e^{\left (-4 \, x\right )} + 5 \, e^{\left (-5 \, x\right )}}{-8 i \, e^{\left (-x\right )} - 4 \, e^{\left (-2 \, x\right )} - 16 i \, e^{\left (-3 \, x\right )} + 4 \, e^{\left (-4 \, x\right )} - 8 i \, e^{\left (-5 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} - 4} + \frac{3}{8} i \, \log \left (i \, e^{\left (-x\right )} + 1\right ) - \frac{3}{8} i \, \log \left (i \, e^{\left (-x\right )} - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.08846, size = 455, normalized size = 12.64 \begin{align*} \frac{{\left (3 i \, e^{\left (6 \, x\right )} - 6 \, e^{\left (5 \, x\right )} + 3 i \, e^{\left (4 \, x\right )} - 12 \, e^{\left (3 \, x\right )} - 3 i \, e^{\left (2 \, x\right )} - 6 \, e^{x} - 3 i\right )} \log \left (e^{x} + i\right ) +{\left (-3 i \, e^{\left (6 \, x\right )} + 6 \, e^{\left (5 \, x\right )} - 3 i \, e^{\left (4 \, x\right )} + 12 \, e^{\left (3 \, x\right )} + 3 i \, e^{\left (2 \, x\right )} + 6 \, e^{x} + 3 i\right )} \log \left (e^{x} - i\right ) - 10 \, e^{\left (5 \, x\right )} - 4 i \, e^{\left (4 \, x\right )} + 4 \, e^{\left (3 \, x\right )} + 4 i \, e^{\left (2 \, x\right )} - 10 \, e^{x}}{8 \, e^{\left (6 \, x\right )} + 16 i \, e^{\left (5 \, x\right )} + 8 \, e^{\left (4 \, x\right )} + 32 i \, e^{\left (3 \, x\right )} - 8 \, e^{\left (2 \, x\right )} + 16 i \, e^{x} - 8} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.806312, size = 97, normalized size = 2.69 \begin{align*} \frac{- \frac{5 e^{5 x}}{4} - \frac{i e^{4 x}}{2} + \frac{e^{3 x}}{2} + \frac{i e^{2 x}}{2} - \frac{5 e^{x}}{4}}{e^{6 x} + 2 i e^{5 x} + e^{4 x} + 4 i e^{3 x} - e^{2 x} + 2 i e^{x} - 1} + \operatorname{RootSum}{\left (64 z^{2} + 9, \left ( i \mapsto i \log{\left (\frac{8 i}{3} + e^{x} \right )} \right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.13761, size = 124, normalized size = 3.44 \begin{align*} \frac{3 i \, e^{\left (-x\right )} - 3 i \, e^{x} - 2}{16 \,{\left (e^{\left (-x\right )} - e^{x} + 2 i\right )}} - \frac{9 i \,{\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4 \, e^{\left (-x\right )} - 4 \, e^{x} + 12 i}{32 \,{\left (e^{\left (-x\right )} - e^{x} - 2 i\right )}^{2}} + \frac{3}{16} i \, \log \left (-e^{\left (-x\right )} + e^{x} + 2 i\right ) - \frac{3}{16} i \, \log \left (-e^{\left (-x\right )} + e^{x} - 2 i\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]