Optimal. Leaf size=36 \[ \frac {3}{8} \text {ArcTan}(\sinh (x))-\frac {3}{8} \text {sech}(x) \tanh (x)-\frac {1}{4} \text {sech}(x) \tanh ^3(x)-\frac {1}{4} i \tanh ^4(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2785, 2687, 30,
2691, 3855} \begin {gather*} \frac {3}{8} \text {ArcTan}(\sinh (x))-\frac {1}{4} i \tanh ^4(x)-\frac {1}{4} \tanh ^3(x) \text {sech}(x)-\frac {3}{8} \tanh (x) \text {sech}(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2687
Rule 2691
Rule 2785
Rule 3855
Rubi steps
\begin {align*} \int \frac {\tanh ^3(x)}{i+\sinh (x)} \, dx &=-\left (i \int \text {sech}^2(x) \tanh ^3(x) \, dx\right )+\int \text {sech}(x) \tanh ^4(x) \, dx\\ &=-\frac {1}{4} \text {sech}(x) \tanh ^3(x)-i \text {Subst}\left (\int x^3 \, dx,x,i \tanh (x)\right )+\frac {3}{4} \int \text {sech}(x) \tanh ^2(x) \, dx\\ &=-\frac {3}{8} \text {sech}(x) \tanh (x)-\frac {1}{4} \text {sech}(x) \tanh ^3(x)-\frac {1}{4} i \tanh ^4(x)+\frac {3}{8} \int \text {sech}(x) \, dx\\ &=\frac {3}{8} \tan ^{-1}(\sinh (x))-\frac {3}{8} \text {sech}(x) \tanh (x)-\frac {1}{4} \text {sech}(x) \tanh ^3(x)-\frac {1}{4} i \tanh ^4(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 42, normalized size = 1.17 \begin {gather*} \frac {1}{8} \left (3 \text {ArcTan}(\sinh (x))-\frac {2+i \sinh (x)+5 \sinh ^2(x)}{(-i+\sinh (x)) (i+\sinh (x))^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 78 vs. \(2 (27 ) = 54\).
time = 0.72, size = 79, normalized size = 2.19
method | result | size |
risch | \(-\frac {2 i {\mathrm e}^{4 x}-2 \,{\mathrm e}^{3 x}-2 i {\mathrm e}^{2 x}+5 \,{\mathrm e}^{5 x}+5 \,{\mathrm e}^{x}}{4 \left ({\mathrm e}^{x}+i\right )^{4} \left ({\mathrm e}^{x}-i\right )^{2}}-\frac {3 i \ln \left ({\mathrm e}^{x}-i\right )}{8}+\frac {3 i \ln \left ({\mathrm e}^{x}+i\right )}{8}\) | \(67\) |
default | \(-\frac {3 i \ln \left (\tanh \left (\frac {x}{2}\right )-i\right )}{8}+\frac {i}{4 \left (\tanh \left (\frac {x}{2}\right )-i\right )^{2}}+\frac {1}{4 \tanh \left (\frac {x}{2}\right )-4 i}-\frac {i}{2 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{4}}+\frac {3 i \ln \left (\tanh \left (\frac {x}{2}\right )+i\right )}{8}+\frac {1}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}+\frac {1}{2 \tanh \left (\frac {x}{2}\right )+2 i}\) | \(79\) |
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. 95 vs. \(2 (26) = 52\).
time = 0.26, size = 95, normalized size = 2.64 \begin {gather*} \frac {5 \, e^{\left (-x\right )} + 2 i \, e^{\left (-2 \, x\right )} - 2 \, e^{\left (-3 \, x\right )} - 2 i \, e^{\left (-4 \, x\right )} + 5 \, e^{\left (-5 \, x\right )}}{-8 i \, e^{\left (-x\right )} - 4 \, e^{\left (-2 \, x\right )} - 16 i \, e^{\left (-3 \, x\right )} + 4 \, e^{\left (-4 \, x\right )} - 8 i \, e^{\left (-5 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} - 4} + \frac {3}{8} i \, \log \left (i \, e^{\left (-x\right )} + 1\right ) - \frac {3}{8} i \, \log \left (i \, 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. 151 vs. \(2 (26) = 52\).
time = 0.43, size = 151, normalized size = 4.19 \begin {gather*} -\frac {3 \, {\left (-i \, e^{\left (6 \, x\right )} + 2 \, e^{\left (5 \, x\right )} - i \, e^{\left (4 \, x\right )} + 4 \, e^{\left (3 \, x\right )} + i \, e^{\left (2 \, x\right )} + 2 \, e^{x} + i\right )} \log \left (e^{x} + i\right ) + 3 \, {\left (i \, e^{\left (6 \, x\right )} - 2 \, e^{\left (5 \, x\right )} + i \, e^{\left (4 \, x\right )} - 4 \, e^{\left (3 \, x\right )} - i \, e^{\left (2 \, x\right )} - 2 \, e^{x} - i\right )} \log \left (e^{x} - i\right ) + 10 \, e^{\left (5 \, x\right )} + 4 i \, e^{\left (4 \, x\right )} - 4 \, e^{\left (3 \, x\right )} - 4 i \, e^{\left (2 \, x\right )} + 10 \, e^{x}}{8 \, {\left (e^{\left (6 \, x\right )} + 2 i \, e^{\left (5 \, x\right )} + e^{\left (4 \, x\right )} + 4 i \, e^{\left (3 \, x\right )} - e^{\left (2 \, x\right )} + 2 i \, e^{x} - 1\right )}} \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. 99 vs. \(2 (36) = 72\).
time = 0.13, size = 99, normalized size = 2.75 \begin {gather*} \frac {- 5 e^{5 x} - 2 i e^{4 x} + 2 e^{3 x} + 2 i e^{2 x} - 5 e^{x}}{4 e^{6 x} + 8 i e^{5 x} + 4 e^{4 x} + 16 i e^{3 x} - 4 e^{2 x} + 8 i e^{x} - 4} + \operatorname {RootSum} {\left (64 z^{2} + 9, \left ( i \mapsto i \log {\left (\frac {8 i}{3} + e^{x} \right )} \right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 92 vs. \(2 (26) = 52\).
time = 0.43, size = 92, normalized size = 2.56 \begin {gather*} \frac {3 i \, e^{\left (-x\right )} - 3 i \, e^{x} - 2}{16 \, {\left (e^{\left (-x\right )} - e^{x} + 2 i\right )}} - \frac {9 i \, {\left (e^{\left (-x\right )} - e^{x}\right )}^{2} + 4 \, e^{\left (-x\right )} - 4 \, e^{x} + 12 i}{32 \, {\left (e^{\left (-x\right )} - e^{x} - 2 i\right )}^{2}} + \frac {3}{16} i \, \log \left (-e^{\left (-x\right )} + e^{x} + 2 i\right ) - \frac {3}{16} i \, \log \left (-e^{\left (-x\right )} + e^{x} - 2 i\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.45, size = 113, normalized size = 3.14 \begin {gather*} \frac {3\,\mathrm {atan}\left ({\mathrm {e}}^x\right )}{4}+\frac {3{}\mathrm {i}}{2\,\left ({\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}\right )}-\frac {1{}\mathrm {i}}{2\,\left ({\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{2\,x}+1+{\mathrm {e}}^{3\,x}\,4{}\mathrm {i}-{\mathrm {e}}^x\,4{}\mathrm {i}\right )}+\frac {1{}\mathrm {i}}{4\,\left (1-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^x\,2{}\mathrm {i}\right )}-\frac {1}{4\,\left ({\mathrm {e}}^x-\mathrm {i}\right )}-\frac {1}{{\mathrm {e}}^x+1{}\mathrm {i}}+\frac {1}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________