Optimal. Leaf size=22 \[ -i x+\cosh (x)+\frac {i \cosh (x)}{i+\sinh (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2825, 2814,
2727} \begin {gather*} -i x+\cosh (x)+\frac {i \cosh (x)}{\sinh (x)+i} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2814
Rule 2825
Rubi steps
\begin {align*} \int \frac {\sinh ^2(x)}{i+\sinh (x)} \, dx &=\cosh (x)-i \int \frac {\sinh (x)}{i+\sinh (x)} \, dx\\ &=-i x+\cosh (x)-\int \frac {1}{i+\sinh (x)} \, dx\\ &=-i x+\cosh (x)+\frac {i \cosh (x)}{i+\sinh (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(79\) vs. \(2(22)=44\).
time = 0.08, size = 79, normalized size = 3.59 \begin {gather*} \frac {\cosh (x) \left (2 i+\frac {2 i \text {ArcSin}\left (\frac {\sqrt {1-i \sinh (x)}}{\sqrt {2}}\right )}{\sqrt {\cosh ^2(x)}}+\sinh (x)+\frac {2 \text {ArcSin}\left (\frac {\sqrt {1-i \sinh (x)}}{\sqrt {2}}\right ) \sinh (x)}{\sqrt {\cosh ^2(x)}}\right )}{i+\sinh (x)} \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. 51 vs. \(2 (19 ) = 38\).
time = 0.61, size = 52, normalized size = 2.36
method | result | size |
risch | \(-i x +\frac {{\mathrm e}^{x}}{2}+\frac {{\mathrm e}^{-x}}{2}+\frac {2}{{\mathrm e}^{x}+i}\) | \(25\) |
default | \(i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\frac {1}{\tanh \left (\frac {x}{2}\right )-1}-i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {1}{\tanh \left (\frac {x}{2}\right )+1}+\frac {2 i}{\tanh \left (\frac {x}{2}\right )+i}\) | \(52\) |
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. 33 vs. \(2 (16) = 32\).
time = 0.28, size = 33, normalized size = 1.50 \begin {gather*} -i \, x + \frac {5 \, e^{\left (-x\right )} - i}{2 \, {\left (-i \, e^{\left (-x\right )} + e^{\left (-2 \, 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. 37 vs. \(2 (16) = 32\).
time = 0.57, size = 37, normalized size = 1.68 \begin {gather*} \frac {{\left (-2 i \, x + i\right )} e^{\left (2 \, x\right )} + {\left (2 \, x + 5\right )} e^{x} + e^{\left (3 \, x\right )} + i}{2 \, {\left (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.05, size = 20, normalized size = 0.91 \begin {gather*} - i x + \frac {e^{x}}{2} + \frac {e^{- x}}{2} + \frac {2}{e^{x} + i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 26, normalized size = 1.18 \begin {gather*} -i \, x + \frac {{\left (5 \, e^{x} + i\right )} e^{\left (-x\right )}}{2 \, {\left (e^{x} + i\right )}} + \frac {1}{2} \, e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.43, size = 24, normalized size = 1.09 \begin {gather*} \frac {{\mathrm {e}}^{-x}}{2}-x\,1{}\mathrm {i}+\frac {{\mathrm {e}}^x}{2}+\frac {2}{{\mathrm {e}}^x+1{}\mathrm {i}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________