Optimal. Leaf size=28 \[ \frac{\coth ^3(x)}{3}-2 \coth (x)-i \tanh ^{-1}(\cosh (x))+i \coth (x) \text{csch}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.094395, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {2708, 2757, 3767, 8, 3768, 3770} \[ \frac{\coth ^3(x)}{3}-2 \coth (x)-i \tanh ^{-1}(\cosh (x))+i \coth (x) \text{csch}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2708
Rule 2757
Rule 3767
Rule 8
Rule 3768
Rule 3770
Rubi steps
\begin{align*} \int \frac{\coth ^4(x)}{(i+\sinh (x))^2} \, dx &=\int \text{csch}^4(x) (i-\sinh (x))^2 \, dx\\ &=\int \left (\text{csch}^2(x)-2 i \text{csch}^3(x)-\text{csch}^4(x)\right ) \, dx\\ &=-\left (2 i \int \text{csch}^3(x) \, dx\right )+\int \text{csch}^2(x) \, dx-\int \text{csch}^4(x) \, dx\\ &=i \coth (x) \text{csch}(x)+i \int \text{csch}(x) \, dx-i \operatorname{Subst}(\int 1 \, dx,x,-i \coth (x))-i \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-i \coth (x)\right )\\ &=-i \tanh ^{-1}(\cosh (x))-2 \coth (x)+\frac{\coth ^3(x)}{3}+i \coth (x) \text{csch}(x)\\ \end{align*}
Mathematica [B] time = 0.0541919, size = 107, normalized size = 3.82 \[ -\frac{5}{6} \tanh \left (\frac{x}{2}\right )-\frac{5}{6} \coth \left (\frac{x}{2}\right )+\frac{1}{4} i \text{csch}^2\left (\frac{x}{2}\right )+\frac{1}{4} i \text{sech}^2\left (\frac{x}{2}\right )+i \log \left (\sinh \left (\frac{x}{2}\right )\right )-i \log \left (\cosh \left (\frac{x}{2}\right )\right )+\frac{1}{24} \coth \left (\frac{x}{2}\right ) \text{csch}^2\left (\frac{x}{2}\right )-\frac{1}{24} \tanh \left (\frac{x}{2}\right ) \text{sech}^2\left (\frac{x}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.051, size = 58, normalized size = 2.1 \begin{align*} -{\frac{7}{8}\tanh \left ({\frac{x}{2}} \right ) }+{\frac{1}{24} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{3}}-{\frac{i}{4}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+{{\frac{i}{4}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-2}}-{\frac{7}{8} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}+{\frac{1}{24} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-3}}+i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.02983, size = 90, normalized size = 3.21 \begin{align*} \frac{-6 i \, e^{\left (-x\right )} - 24 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 6 i \, e^{\left (-5 \, x\right )} + 10}{3 \,{\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1\right )}} - i \, \log \left (e^{\left (-x\right )} + 1\right ) + i \, \log \left (e^{\left (-x\right )} - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.03329, size = 302, normalized size = 10.79 \begin{align*} \frac{{\left (-3 i \, e^{\left (6 \, x\right )} + 9 i \, e^{\left (4 \, x\right )} - 9 i \, e^{\left (2 \, x\right )} + 3 i\right )} \log \left (e^{x} + 1\right ) +{\left (3 i \, e^{\left (6 \, x\right )} - 9 i \, e^{\left (4 \, x\right )} + 9 i \, e^{\left (2 \, x\right )} - 3 i\right )} \log \left (e^{x} - 1\right ) + 6 i \, e^{\left (5 \, x\right )} - 6 \, e^{\left (4 \, x\right )} + 24 \, e^{\left (2 \, x\right )} - 6 i \, e^{x} - 10}{3 \,{\left (e^{\left (6 \, x\right )} - 3 \, e^{\left (4 \, x\right )} + 3 \, e^{\left (2 \, x\right )} - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.550075, size = 66, normalized size = 2.36 \begin{align*} \operatorname{RootSum}{\left (z^{2} + 1, \left ( i \mapsto i \log{\left (i i + e^{x} \right )} \right )\right )} + \frac{2 i e^{5 x} - 2 e^{4 x} + 8 e^{2 x} - 2 i e^{x} - \frac{10}{3}}{e^{6 x} - 3 e^{4 x} + 3 e^{2 x} - 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.14062, size = 68, normalized size = 2.43 \begin{align*} -\frac{-6 i \, e^{\left (5 \, x\right )} + 6 \, e^{\left (4 \, x\right )} - 24 \, e^{\left (2 \, x\right )} + 6 i \, e^{x} + 10}{3 \,{\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} - i \, \log \left (e^{x} + 1\right ) + i \, \log \left ({\left | e^{x} - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]