Optimal. Leaf size=42 \[ 2 i \tanh ^{-1}(\cosh (x))+\frac {10 \coth (x)}{3}+\frac {\coth (x)}{3 (i+\sinh (x))^2}-\frac {2 i \coth (x)}{i+\sinh (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 42, 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 = {2845, 3057,
2827, 3852, 8, 3855} \begin {gather*} \frac {10 \coth (x)}{3}+2 i \tanh ^{-1}(\cosh (x))-\frac {2 i \coth (x)}{\sinh (x)+i}+\frac {\coth (x)}{3 (\sinh (x)+i)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2827
Rule 2845
Rule 3057
Rule 3852
Rule 3855
Rubi steps
\begin {align*} \int \frac {\text {csch}^2(x)}{(i+\sinh (x))^2} \, dx &=\frac {\coth (x)}{3 (i+\sinh (x))^2}-\frac {1}{3} \int \frac {\text {csch}^2(x) (4 i-2 \sinh (x))}{i+\sinh (x)} \, dx\\ &=\frac {\coth (x)}{3 (i+\sinh (x))^2}-\frac {2 i \coth (x)}{i+\sinh (x)}+\frac {1}{3} \int \text {csch}^2(x) (-10-6 i \sinh (x)) \, dx\\ &=\frac {\coth (x)}{3 (i+\sinh (x))^2}-\frac {2 i \coth (x)}{i+\sinh (x)}-2 i \int \text {csch}(x) \, dx-\frac {10}{3} \int \text {csch}^2(x) \, dx\\ &=2 i \tanh ^{-1}(\cosh (x))+\frac {\coth (x)}{3 (i+\sinh (x))^2}-\frac {2 i \coth (x)}{i+\sinh (x)}+\frac {10}{3} i \text {Subst}(\int 1 \, dx,x,-i \coth (x))\\ &=2 i \tanh ^{-1}(\cosh (x))+\frac {10 \coth (x)}{3}+\frac {\coth (x)}{3 (i+\sinh (x))^2}-\frac {2 i \coth (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. \(88\) vs. \(2(42)=84\).
time = 0.29, size = 88, normalized size = 2.10 \begin {gather*} \frac {1}{6} \left (3 \coth \left (\frac {x}{2}\right )+12 i \log \left (\cosh \left (\frac {x}{2}\right )\right )-12 i \log \left (\sinh \left (\frac {x}{2}\right )\right )+\frac {2}{i+\sinh (x)}-\frac {4 \sinh \left (\frac {x}{2}\right ) (8 i+7 \sinh (x))}{\left (i \cosh \left (\frac {x}{2}\right )+\sinh \left (\frac {x}{2}\right )\right )^3}+3 \tanh \left (\frac {x}{2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.72, size = 58, normalized size = 1.38
method | result | size |
default | \(\frac {\tanh \left (\frac {x}{2}\right )}{2}-\frac {2 i}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}-\frac {4}{3 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}+\frac {6}{\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 )}\) | \(58\) |
risch | \(-\frac {4 i \left (9 i {\mathrm e}^{3 x}+3 \,{\mathrm e}^{4 x}-12 i {\mathrm e}^{x}-11 \,{\mathrm e}^{2 x}+5\right )}{3 \left ({\mathrm e}^{2 x}-1\right ) \left ({\mathrm e}^{x}+i\right )^{3}}+2 i \ln \left ({\mathrm e}^{x}+1\right )-2 i \ln \left ({\mathrm e}^{x}-1\right )\) | \(62\) |
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. 79 vs. \(2 (30) = 60\).
time = 0.30, size = 79, normalized size = 1.88 \begin {gather*} \frac {4 \, {\left (12 \, e^{\left (-x\right )} + 11 i \, e^{\left (-2 \, x\right )} - 9 \, e^{\left (-3 \, x\right )} - 3 i \, e^{\left (-4 \, x\right )} - 5 i\right )}}{3 \, {\left (3 \, e^{\left (-x\right )} + 4 i \, e^{\left (-2 \, x\right )} - 4 \, e^{\left (-3 \, x\right )} - 3 i \, e^{\left (-4 \, x\right )} + e^{\left (-5 \, x\right )} - i\right )}} + 2 i \, \log \left (e^{\left (-x\right )} + 1\right ) - 2 i \, \log \left (e^{\left (-x\right )} - 1\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. 130 vs. \(2 (30) = 60\).
time = 0.43, size = 130, normalized size = 3.10 \begin {gather*} -\frac {2 \, {\left (3 \, {\left (-i \, e^{\left (5 \, x\right )} + 3 \, e^{\left (4 \, x\right )} + 4 i \, e^{\left (3 \, x\right )} - 4 \, e^{\left (2 \, x\right )} - 3 i \, e^{x} + 1\right )} \log \left (e^{x} + 1\right ) + 3 \, {\left (i \, e^{\left (5 \, x\right )} - 3 \, e^{\left (4 \, x\right )} - 4 i \, e^{\left (3 \, x\right )} + 4 \, e^{\left (2 \, x\right )} + 3 i \, e^{x} - 1\right )} \log \left (e^{x} - 1\right ) + 6 i \, e^{\left (4 \, x\right )} - 18 \, e^{\left (3 \, x\right )} - 22 i \, e^{\left (2 \, x\right )} + 24 \, e^{x} + 10 i\right )}}{3 \, {\left (e^{\left (5 \, x\right )} + 3 i \, e^{\left (4 \, x\right )} - 4 \, e^{\left (3 \, x\right )} - 4 i \, e^{\left (2 \, x\right )} + 3 \, e^{x} + i\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {csch}^{2}{\left (x \right )}}{\left (\sinh {\left (x \right )} + i\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 46, normalized size = 1.10 \begin {gather*} \frac {2}{e^{\left (2 \, x\right )} - 1} - \frac {2 \, {\left (6 i \, e^{\left (2 \, x\right )} - 15 \, e^{x} - 7 i\right )}}{3 \, {\left (e^{x} + i\right )}^{3}} + 2 i \, \log \left (e^{x} + 1\right ) - 2 i \, \log \left ({\left | e^{x} - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.71, size = 85, normalized size = 2.02 \begin {gather*} \frac {2}{{\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}}+\frac {2}{{\mathrm {e}}^{2\,x}-1}-\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 {4{}\mathrm {i}}{{\mathrm {e}}^x+1{}\mathrm {i}}-\frac {4{}\mathrm {i}}{3\,\left ({\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________