Optimal. Leaf size=26 \[ \coth (x)+2 i \tanh ^{-1}(\cosh (x))+\frac {2 i \coth (x)}{-\text {csch}(x)+i} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2709, 3770, 3767, 8, 3777} \[ \coth (x)+2 i \tanh ^{-1}(\cosh (x))+\frac {2 i \coth (x)}{-\text {csch}(x)+i} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2709
Rule 3767
Rule 3770
Rule 3777
Rubi steps
\begin {align*} \int \frac {\coth ^2(x)}{(i+\sinh (x))^2} \, dx &=\int \left (2-2 i \text {csch}(x)-\text {csch}^2(x)+\frac {2 i}{-i+\text {csch}(x)}\right ) \, dx\\ &=2 x-2 i \int \text {csch}(x) \, dx+2 i \int \frac {1}{-i+\text {csch}(x)} \, dx-\int \text {csch}^2(x) \, dx\\ &=2 x+2 i \tanh ^{-1}(\cosh (x))+\frac {2 i \coth (x)}{i-\text {csch}(x)}+i \operatorname {Subst}(\int 1 \, dx,x,-i \coth (x))+2 i \int i \, dx\\ &=2 i \tanh ^{-1}(\cosh (x))+\coth (x)+\frac {2 i \coth (x)}{i-\text {csch}(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.15, size = 66, normalized size = 2.54 \[ \frac {1}{2} \left (\tanh \left (\frac {x}{2}\right )+\coth \left (\frac {x}{2}\right )-4 i \log \left (\sinh \left (\frac {x}{2}\right )\right )+4 i \log \left (\cosh \left (\frac {x}{2}\right )\right )+\frac {8 \sinh \left (\frac {x}{2}\right )}{\cosh \left (\frac {x}{2}\right )-i \sinh \left (\frac {x}{2}\right )}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.60, size = 79, normalized size = 3.04 \[ \frac {{\left (2 i \, e^{\left (3 \, x\right )} - 2 \, e^{\left (2 \, x\right )} - 2 i \, e^{x} + 2\right )} \log \left (e^{x} + 1\right ) + {\left (-2 i \, e^{\left (3 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 2 i \, e^{x} - 2\right )} \log \left (e^{x} - 1\right ) - 4 i \, e^{\left (2 \, x\right )} + 2 \, e^{x} + 6 i}{e^{\left (3 \, x\right )} + i \, e^{\left (2 \, x\right )} - e^{x} - i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 47, normalized size = 1.81 \[ \frac {-4 i \, e^{\left (2 \, x\right )} + 2 \, e^{x} + 6 i}{e^{\left (3 \, x\right )} + i \, e^{\left (2 \, x\right )} - e^{x} - i} + 2 i \, \log \left (e^{x} + 1\right ) - 2 i \, \log \left ({\left | e^{x} - 1 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 35, normalized size = 1.35 \[ \frac {\tanh \left (\frac {x}{2}\right )}{2}+\frac {4}{\tanh \left (\frac {x}{2}\right )+i}-2 i \ln \left (\tanh \left (\frac {x}{2}\right )\right )+\frac {1}{2 \tanh \left (\frac {x}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.36, size = 54, normalized size = 2.08 \[ \frac {2 \, e^{\left (-x\right )} + 4 i \, e^{\left (-2 \, x\right )} - 6 i}{e^{\left (-x\right )} + i \, e^{\left (-2 \, x\right )} - e^{\left (-3 \, x\right )} - i} + 2 i \, \log \left (e^{\left (-x\right )} + 1\right ) - 2 i \, \log \left (e^{\left (-x\right )} - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.75, size = 60, normalized size = 2.31 \[ -\ln \left ({\mathrm {e}}^x\,4{}\mathrm {i}-4{}\mathrm {i}\right )\,2{}\mathrm {i}+\ln \left ({\mathrm {e}}^x\,4{}\mathrm {i}+4{}\mathrm {i}\right )\,2{}\mathrm {i}+\frac {2\,{\mathrm {e}}^x-{\mathrm {e}}^{2\,x}\,4{}\mathrm {i}+6{}\mathrm {i}}{{\mathrm {e}}^{2\,x}\,1{}\mathrm {i}+{\mathrm {e}}^{3\,x}-{\mathrm {e}}^x-\mathrm {i}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.22, size = 49, normalized size = 1.88 \[ \frac {4 e^{2 x} + 2 i e^{x} - 6}{i e^{3 x} - e^{2 x} - i e^{x} + 1} + 2 \log {\left (e^{x} - 1 \right )} - 2 \log {\left (e^{x} + 1 \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________