Optimal. Leaf size=44 \[ -2 i x+\frac {4 \cosh (x)}{3}-\frac {\cosh (x) \sinh ^2(x)}{3 (i+\sinh (x))^2}+\frac {2 i \cosh (x)}{i+\sinh (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2844, 3047,
3102, 12, 2814, 2727} \begin {gather*} -2 i x+\frac {4 \cosh (x)}{3}-\frac {\sinh ^2(x) \cosh (x)}{3 (\sinh (x)+i)^2}+\frac {2 i \cosh (x)}{\sinh (x)+i} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2727
Rule 2814
Rule 2844
Rule 3047
Rule 3102
Rubi steps
\begin {align*} \int \frac {\sinh ^3(x)}{(i+\sinh (x))^2} \, dx &=-\frac {\cosh (x) \sinh ^2(x)}{3 (i+\sinh (x))^2}+\frac {1}{3} \int \frac {\sinh (x) (-2 i+4 \sinh (x))}{i+\sinh (x)} \, dx\\ &=-\frac {\cosh (x) \sinh ^2(x)}{3 (i+\sinh (x))^2}-\frac {1}{3} i \int \frac {2 \sinh (x)+4 i \sinh ^2(x)}{i+\sinh (x)} \, dx\\ &=\frac {4 \cosh (x)}{3}-\frac {\cosh (x) \sinh ^2(x)}{3 (i+\sinh (x))^2}+\frac {1}{3} \int -\frac {6 i \sinh (x)}{i+\sinh (x)} \, dx\\ &=\frac {4 \cosh (x)}{3}-\frac {\cosh (x) \sinh ^2(x)}{3 (i+\sinh (x))^2}-2 i \int \frac {\sinh (x)}{i+\sinh (x)} \, dx\\ &=-2 i x+\frac {4 \cosh (x)}{3}-\frac {\cosh (x) \sinh ^2(x)}{3 (i+\sinh (x))^2}-2 \int \frac {1}{i+\sinh (x)} \, dx\\ &=-2 i x+\frac {4 \cosh (x)}{3}-\frac {\cosh (x) \sinh ^2(x)}{3 (i+\sinh (x))^2}+\frac {2 i \cosh (x)}{i+\sinh (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 45, normalized size = 1.02 \begin {gather*} \frac {1}{3} \cosh (x) \left (-\frac {6 i \sinh ^{-1}(\sinh (x))}{\sqrt {\cosh ^2(x)}}+\frac {-10+14 i \sinh (x)+3 \sinh ^2(x)}{(i+\sinh (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. 74 vs. \(2 (36 ) = 72\).
time = 0.82, size = 75, normalized size = 1.70
method | result | size |
risch | \(-2 i x +\frac {{\mathrm e}^{x}}{2}+\frac {{\mathrm e}^{-x}}{2}+\frac {10 i {\mathrm e}^{x}+6 \,{\mathrm e}^{2 x}-\frac {16}{3}}{\left ({\mathrm e}^{x}+i\right )^{3}}\) | \(38\) |
default | \(\frac {4 i}{3 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}+\frac {4 i}{\tanh \left (\frac {x}{2}\right )+i}-\frac {2}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}+2 i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\frac {1}{\tanh \left (\frac {x}{2}\right )-1}-2 i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {1}{\tanh \left (\frac {x}{2}\right )+1}\) | \(75\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 59, normalized size = 1.34 \begin {gather*} -2 i \, x - \frac {41 \, e^{\left (-x\right )} + 69 i \, e^{\left (-2 \, x\right )} - 39 \, e^{\left (-3 \, x\right )} - 3 i}{2 \, {\left (3 i \, e^{\left (-x\right )} - 9 \, e^{\left (-2 \, x\right )} - 9 i \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )}\right )}} + \frac {1}{2} \, e^{\left (-x\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. 74 vs. \(2 (32) = 64\).
time = 0.38, size = 74, normalized size = 1.68 \begin {gather*} -\frac {3 \, {\left (4 i \, x - 3 i\right )} e^{\left (4 \, x\right )} - 6 \, {\left (6 \, x + 5\right )} e^{\left (3 \, x\right )} + 6 \, {\left (-6 i \, x - 11 i\right )} e^{\left (2 \, x\right )} + {\left (12 \, x + 41\right )} e^{x} - 3 \, e^{\left (5 \, x\right )} + 3 i}{6 \, {\left (e^{\left (4 \, x\right )} + 3 i \, e^{\left (3 \, x\right )} - 3 \, e^{\left (2 \, x\right )} - i \, e^{x}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 54, normalized size = 1.23 \begin {gather*} - 2 i x + \frac {18 e^{2 x} + 30 i e^{x} - 16}{3 e^{3 x} + 9 i e^{2 x} - 9 e^{x} - 3 i} + \frac {e^{x}}{2} + \frac {e^{- x}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 38, normalized size = 0.86 \begin {gather*} -2 i \, x + \frac {{\left (39 \, e^{\left (3 \, x\right )} + 69 i \, e^{\left (2 \, x\right )} - 41 \, e^{x} - 3 i\right )} e^{\left (-x\right )}}{6 \, {\left (e^{x} + i\right )}^{3}} + \frac {1}{2} \, e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.58, size = 79, normalized size = 1.80 \begin {gather*} \frac {{\mathrm {e}}^{-x}}{2}-x\,2{}\mathrm {i}+\frac {{\mathrm {e}}^x}{2}+\frac {2\,{\mathrm {e}}^x+\frac {4}{3}{}\mathrm {i}}{{\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}}+\frac {2\,{\mathrm {e}}^{2\,x}-2+\frac {{\mathrm {e}}^x\,8{}\mathrm {i}}{3}}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}}+\frac {2}{{\mathrm {e}}^x+1{}\mathrm {i}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________