Optimal. Leaf size=22 \[ -i x+\cosh (x)+\frac{i \cosh (x)}{\sinh (x)+i} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0589099, antiderivative size = 22, normalized size of antiderivative = 1., 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 = {2746, 2735, 2648} \[ -i x+\cosh (x)+\frac{i \cosh (x)}{\sinh (x)+i} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2746
Rule 2735
Rule 2648
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] time = 0.105787, size = 79, normalized size = 3.59 \[ \frac{\cosh (x) \left (\sinh (x)+\frac{2 \sinh (x) \sin ^{-1}\left (\frac{\sqrt{1-i \sinh (x)}}{\sqrt{2}}\right )}{\sqrt{\cosh ^2(x)}}+\frac{2 i \sin ^{-1}\left (\frac{\sqrt{1-i \sinh (x)}}{\sqrt{2}}\right )}{\sqrt{\cosh ^2(x)}}+2 i\right )}{\sinh (x)+i} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.031, size = 52, normalized size = 2.4 \begin{align*} -i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) + \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}+i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) - \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}+{2\,i \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.10202, size = 45, normalized size = 2.05 \begin{align*} -i \, x + \frac{10 \, e^{\left (-x\right )} - 2 i}{4 \,{\left (-i \, e^{\left (-x\right )} + e^{\left (-2 \, x\right )}\right )}} + \frac{1}{2} \, e^{\left (-x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.01473, size = 103, normalized size = 4.68 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.212152, size = 20, normalized size = 0.91 \begin{align*} - i x + \frac{e^{x}}{2} + \frac{e^{- x}}{2} + \frac{2}{e^{x} + i} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.31539, size = 35, normalized size = 1.59 \begin{align*} -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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]