Optimal. Leaf size=36 \[ -\frac{i}{4 (\sinh (x)+i)}-\frac{1}{4 (\sinh (x)+i)^2}-\frac{1}{4} i \tan ^{-1}(\sinh (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0365092, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {2707, 77, 203} \[ -\frac{i}{4 (\sinh (x)+i)}-\frac{1}{4 (\sinh (x)+i)^2}-\frac{1}{4} i \tan ^{-1}(\sinh (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2707
Rule 77
Rule 203
Rubi steps
\begin{align*} \int \frac{\tanh (x)}{(i+\sinh (x))^2} \, dx &=-\operatorname{Subst}\left (\int \frac{x}{(i-x) (i+x)^3} \, dx,x,\sinh (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (-\frac{1}{2 (i+x)^3}-\frac{i}{4 (i+x)^2}+\frac{i}{4 \left (1+x^2\right )}\right ) \, dx,x,\sinh (x)\right )\\ &=-\frac{1}{4 (i+\sinh (x))^2}-\frac{i}{4 (i+\sinh (x))}-\frac{1}{4} i \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sinh (x)\right )\\ &=-\frac{1}{4} i \tan ^{-1}(\sinh (x))-\frac{1}{4 (i+\sinh (x))^2}-\frac{i}{4 (i+\sinh (x))}\\ \end{align*}
Mathematica [A] time = 0.0303892, size = 29, normalized size = 0.81 \[ -\frac{i \left (\sinh (x)+(\sinh (x)+i)^2 \tan ^{-1}(\sinh (x))\right )}{4 (\sinh (x)+i)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.051, size = 66, normalized size = 1.8 \begin{align*} -{\frac{1}{4}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -i \right ) }+{2\,i \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}}-{{\frac{i}{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-1}}+ \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-4}-{\frac{3}{2} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-2}}+{\frac{1}{4}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.07141, size = 82, normalized size = 2.28 \begin{align*} \frac{-i \, e^{\left (-x\right )} + i \, e^{\left (-3 \, x\right )}}{8 i \, e^{\left (-x\right )} - 12 \, e^{\left (-2 \, x\right )} - 8 i \, e^{\left (-3 \, x\right )} + 2 \, e^{\left (-4 \, x\right )} + 2} - \frac{1}{4} \, \log \left (e^{\left (-x\right )} + i\right ) + \frac{1}{4} \, \log \left (e^{\left (-x\right )} - i\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.06011, size = 284, normalized size = 7.89 \begin{align*} \frac{{\left (e^{\left (4 \, x\right )} + 4 i \, e^{\left (3 \, x\right )} - 6 \, e^{\left (2 \, x\right )} - 4 i \, e^{x} + 1\right )} \log \left (e^{x} + i\right ) -{\left (e^{\left (4 \, x\right )} + 4 i \, e^{\left (3 \, x\right )} - 6 \, e^{\left (2 \, x\right )} - 4 i \, e^{x} + 1\right )} \log \left (e^{x} - i\right ) - 2 i \, e^{\left (3 \, x\right )} + 2 i \, e^{x}}{4 \, e^{\left (4 \, x\right )} + 16 i \, e^{\left (3 \, x\right )} - 24 \, e^{\left (2 \, x\right )} - 16 i \, e^{x} + 4} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.486307, size = 60, normalized size = 1.67 \begin{align*} \frac{- \frac{i e^{3 x}}{2} + \frac{i e^{x}}{2}}{e^{4 x} + 4 i e^{3 x} - 6 e^{2 x} - 4 i e^{x} + 1} - \frac{\log{\left (e^{x} - i \right )}}{4} + \frac{\log{\left (e^{x} + i \right )}}{4} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.13077, size = 89, normalized size = 2.47 \begin{align*} -\frac{3 \,{\left (e^{\left (-x\right )} - e^{x}\right )}^{2} - 20 i \, e^{\left (-x\right )} + 20 i \, e^{x} - 12}{16 \,{\left (e^{\left (-x\right )} - e^{x} - 2 i\right )}^{2}} + \frac{1}{8} \, \log \left (-e^{\left (-x\right )} + e^{x} + 2 i\right ) - \frac{1}{8} \, \log \left (-e^{\left (-x\right )} + e^{x} - 2 i\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]