Optimal. Leaf size=42 \[ -i \log (i-\sinh (x))+\frac {2 i}{(1+i \sinh (x))^2}-\frac {4 i}{1+i \sinh (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 42, normalized size of antiderivative = 1.00, 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 = {4476, 2746, 45}
\begin {gather*} -\frac {4 i}{1+i \sinh (x)}+\frac {2 i}{(1+i \sinh (x))^2}-i \log (-\sinh (x)+i) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2746
Rule 4476
Rubi steps
\begin {align*} \int \frac {1}{(\text {sech}(x)+i \tanh (x))^5} \, dx &=\int \frac {\cosh ^5(x)}{(1+i \sinh (x))^5} \, dx\\ &=-\left (i \text {Subst}\left (\int \frac {(1-x)^2}{(1+x)^3} \, dx,x,i \sinh (x)\right )\right )\\ &=-\left (i \text {Subst}\left (\int \left (\frac {4}{(1+x)^3}-\frac {4}{(1+x)^2}+\frac {1}{1+x}\right ) \, dx,x,i \sinh (x)\right )\right )\\ &=-i \log (i-\sinh (x))+\frac {2 i}{(1+i \sinh (x))^2}-\frac {4 i}{1+i \sinh (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 45, normalized size = 1.07 \begin {gather*} 2 \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )-i \log (\cosh (x))+\frac {-2 i+4 \sinh (x)}{\left (\cosh \left (\frac {x}{2}\right )+i \sinh \left (\frac {x}{2}\right )\right )^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.28, size = 68, normalized size = 1.62
method | result | size |
risch | \(i x -\frac {8 \left (-i {\mathrm e}^{2 x}+{\mathrm e}^{3 x}-{\mathrm e}^{x}\right )}{\left ({\mathrm e}^{x}-i\right )^{4}}-2 i \ln \left ({\mathrm e}^{x}-i\right )\) | \(40\) |
default | \(i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )+i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {8 i}{\left (-i+\tanh \left (\frac {x}{2}\right )\right )^{4}}-2 i \ln \left (-i+\tanh \left (\frac {x}{2}\right )\right )-\frac {8 i}{\left (-i+\tanh \left (\frac {x}{2}\right )\right )^{2}}+\frac {16}{\left (-i+\tanh \left (\frac {x}{2}\right )\right )^{3}}\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 58, normalized size = 1.38 \begin {gather*} -i \, x - \frac {8 \, {\left (e^{\left (-x\right )} - i \, e^{\left (-2 \, x\right )} - e^{\left (-3 \, x\right )}\right )}}{-4 i \, e^{\left (-x\right )} - 6 \, e^{\left (-2 \, x\right )} + 4 i \, e^{\left (-3 \, x\right )} + e^{\left (-4 \, x\right )} + 1} - 2 i \, \log \left (e^{\left (-x\right )} + i\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. 94 vs. \(2 (30) = 60\).
time = 0.40, size = 94, normalized size = 2.24 \begin {gather*} \frac {i \, x e^{\left (4 \, x\right )} + 4 \, {\left (x - 2\right )} e^{\left (3 \, x\right )} - 2 \, {\left (3 i \, x - 4 i\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x - 2\right )} e^{x} - 2 \, {\left (i \, e^{\left (4 \, x\right )} + 4 \, e^{\left (3 \, x\right )} - 6 i \, e^{\left (2 \, x\right )} - 4 \, e^{x} + i\right )} \log \left (e^{x} - i\right ) + i \, x}{e^{\left (4 \, x\right )} - 4 i \, e^{\left (3 \, x\right )} - 6 \, e^{\left (2 \, x\right )} + 4 i \, e^{x} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1445 vs. \(2 (29) = 58\).
time = 2.83, size = 1445, normalized size = 34.40 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 38, normalized size = 0.90 \begin {gather*} -\frac {8 \, {\left (e^{\left (3 \, x\right )} - i \, e^{\left (2 \, x\right )} - e^{x}\right )}}{{\left (e^{x} - i\right )}^{4}} + i \, \log \left (i \, e^{x}\right ) - 2 i \, \log \left (e^{x} - i\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.68, size = 94, normalized size = 2.24 \begin {gather*} x\,1{}\mathrm {i}-\ln \left ({\mathrm {e}}^x-\mathrm {i}\right )\,2{}\mathrm {i}-\frac {16}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}-{\mathrm {e}}^{3\,x}+3\,{\mathrm {e}}^x-\mathrm {i}}+\frac {8{}\mathrm {i}}{{\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{2\,x}+1-{\mathrm {e}}^{3\,x}\,4{}\mathrm {i}+{\mathrm {e}}^x\,4{}\mathrm {i}}+\frac {16{}\mathrm {i}}{1-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^x\,2{}\mathrm {i}}-\frac {8}{{\mathrm {e}}^x-\mathrm {i}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________