Optimal. Leaf size=28 \[ -i \tanh ^{-1}(\cosh (x))-2 \coth (x)+\frac {\coth ^3(x)}{3}+i \coth (x) \text {csch}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 28, normalized size of antiderivative = 1.00, 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 = {2787, 2836,
3852, 8, 3853, 3855} \begin {gather*} \frac {\coth ^3(x)}{3}-2 \coth (x)-i \tanh ^{-1}(\cosh (x))+i \coth (x) \text {csch}(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2787
Rule 2836
Rule 3852
Rule 3853
Rule 3855
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 \text {Subst}(\int 1 \, dx,x,-i \coth (x))-i \text {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] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(107\) vs. \(2(28)=56\).
time = 0.04, size = 107, normalized size = 3.82 \begin {gather*} -\frac {5}{6} \coth \left (\frac {x}{2}\right )+\frac {1}{4} i \text {csch}^2\left (\frac {x}{2}\right )+\frac {1}{24} \coth \left (\frac {x}{2}\right ) \text {csch}^2\left (\frac {x}{2}\right )-i \log \left (\cosh \left (\frac {x}{2}\right )\right )+i \log \left (\sinh \left (\frac {x}{2}\right )\right )+\frac {1}{4} i \text {sech}^2\left (\frac {x}{2}\right )-\frac {5}{6} \tanh \left (\frac {x}{2}\right )-\frac {1}{24} \text {sech}^2\left (\frac {x}{2}\right ) \tanh \left (\frac {x}{2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 57 vs. \(2 (24 ) = 48\).
time = 0.96, size = 58, normalized size = 2.07
method | result | size |
risch | \(\frac {2 i \left (3 i {\mathrm e}^{4 x}+3 \,{\mathrm e}^{5 x}-12 i {\mathrm e}^{2 x}+5 i-3 \,{\mathrm e}^{x}\right )}{3 \left ({\mathrm e}^{2 x}-1\right )^{3}}+i \ln \left ({\mathrm e}^{x}-1\right )-i \ln \left ({\mathrm e}^{x}+1\right )\) | \(56\) |
default | \(-\frac {7 \tanh \left (\frac {x}{2}\right )}{8}+\frac {\left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{24}-\frac {i \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )}{4}+i \ln \left (\tanh \left (\frac {x}{2}\right )\right )+\frac {1}{24 \tanh \left (\frac {x}{2}\right )^{3}}+\frac {i}{4 \tanh \left (\frac {x}{2}\right )^{2}}-\frac {7}{8 \tanh \left (\frac {x}{2}\right )}\) | \(58\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 67 vs. \(2 (22) = 44\).
time = 0.28, size = 67, normalized size = 2.39 \begin {gather*} -\frac {2 \, {\left (3 i \, e^{\left (-x\right )} + 12 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} - 3 i \, e^{\left (-5 \, x\right )} - 5\right )}}{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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 100 vs. \(2 (22) = 44\).
time = 0.40, size = 100, normalized size = 3.57 \begin {gather*} -\frac {3 \, {\left (i \, e^{\left (6 \, x\right )} - 3 i \, e^{\left (4 \, x\right )} + 3 i \, e^{\left (2 \, x\right )} - i\right )} \log \left (e^{x} + 1\right ) + 3 \, {\left (-i \, e^{\left (6 \, x\right )} + 3 i \, e^{\left (4 \, x\right )} - 3 i \, e^{\left (2 \, x\right )} + 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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 66 vs. \(2 (26) = 52\).
time = 0.12, size = 66, normalized size = 2.36 \begin {gather*} \operatorname {RootSum} {\left (z^{2} + 1, \left ( i \mapsto i \log {\left (i i + e^{x} \right )} \right )\right )} + \frac {6 i e^{5 x} - 6 e^{4 x} + 24 e^{2 x} - 6 i e^{x} - 10}{3 e^{6 x} - 9 e^{4 x} + 9 e^{2 x} - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 50 vs. \(2 (22) = 44\).
time = 0.40, size = 50, normalized size = 1.79 \begin {gather*} -\frac {2 \, {\left (-3 i \, e^{\left (5 \, x\right )} + 3 \, e^{\left (4 \, x\right )} - 12 \, e^{\left (2 \, x\right )} + 3 i \, e^{x} + 5\right )}}{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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.21, size = 111, normalized size = 3.96 \begin {gather*} -\ln \left (-{\mathrm {e}}^x\,2{}\mathrm {i}-2{}\mathrm {i}\right )\,1{}\mathrm {i}+\ln \left (-{\mathrm {e}}^x\,2{}\mathrm {i}+2{}\mathrm {i}\right )\,1{}\mathrm {i}-\frac {\frac {2\,{\mathrm {e}}^{4\,x}}{3}-4\,{\mathrm {e}}^{2\,x}+\frac {2}{3}-\frac {{\mathrm {e}}^{3\,x}\,8{}\mathrm {i}}{3}+\frac {{\mathrm {e}}^x\,8{}\mathrm {i}}{3}}{3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1}+\frac {\frac {4}{3}+\frac {{\mathrm {e}}^x\,4{}\mathrm {i}}{3}}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}+\frac {-\frac {4}{3}+{\mathrm {e}}^x\,2{}\mathrm {i}}{{\mathrm {e}}^{2\,x}-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________