Optimal. Leaf size=47 \[ \frac {2}{3} i \text {sech}^3(x)-\frac {4}{5} i \text {sech}^5(x)+\frac {2}{7} i \text {sech}^7(x)-\frac {\tanh ^5(x)}{5}+\frac {2 \tanh ^7(x)}{7} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2790, 2687,
14, 2686, 276, 30} \begin {gather*} \frac {2 \tanh ^7(x)}{7}-\frac {\tanh ^5(x)}{5}+\frac {2}{7} i \text {sech}^7(x)-\frac {4}{5} i \text {sech}^5(x)+\frac {2}{3} i \text {sech}^3(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 276
Rule 2686
Rule 2687
Rule 2790
Rubi steps
\begin {align*} \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx &=\int \left (-\text {sech}^4(x) \tanh ^4(x)-2 i \text {sech}^3(x) \tanh ^5(x)+\text {sech}^2(x) \tanh ^6(x)\right ) \, dx\\ &=-\left (2 i \int \text {sech}^3(x) \tanh ^5(x) \, dx\right )-\int \text {sech}^4(x) \tanh ^4(x) \, dx+\int \text {sech}^2(x) \tanh ^6(x) \, dx\\ &=i \text {Subst}\left (\int x^6 \, dx,x,i \tanh (x)\right )+i \text {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,i \tanh (x)\right )+2 i \text {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\text {sech}(x)\right )\\ &=\frac {\tanh ^7(x)}{7}+i \text {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,i \tanh (x)\right )+2 i \text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\text {sech}(x)\right )\\ &=\frac {2}{3} i \text {sech}^3(x)-\frac {4}{5} i \text {sech}^5(x)+\frac {2}{7} i \text {sech}^7(x)-\frac {\tanh ^5(x)}{5}+\frac {2 \tanh ^7(x)}{7}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(112\) vs. \(2(47)=94\).
time = 0.11, size = 112, normalized size = 2.38 \begin {gather*} -\frac {-672 i+1442 i \cosh (x)-1664 i \cosh (2 x)+309 i \cosh (3 x)+288 i \cosh (4 x)-103 i \cosh (5 x)+1232 \sinh (x)+824 \sinh (2 x)-1896 \sinh (3 x)+412 \sinh (4 x)+72 \sinh (5 x)}{13440 \left (\cosh \left (\frac {x}{2}\right )-i \sinh \left (\frac {x}{2}\right )\right )^7 \left (\cosh \left (\frac {x}{2}\right )+i \sinh \left (\frac {x}{2}\right )\right )^3} \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. 115 vs. \(2 (34 ) = 68\).
time = 0.82, size = 116, normalized size = 2.47
method | result | size |
risch | \(-\frac {2 \left (-132 \,{\mathrm e}^{2 x}-36 i {\mathrm e}^{x}+68 i {\mathrm e}^{3 x}+14 \,{\mathrm e}^{4 x}+9+84 i {\mathrm e}^{5 x}-140 \,{\mathrm e}^{6 x}+140 i {\mathrm e}^{7 x}+105 \,{\mathrm e}^{8 x}\right )}{105 \left ({\mathrm e}^{x}-i\right )^{3} \left ({\mathrm e}^{x}+i\right )^{7}}\) | \(69\) |
default | \(\frac {2 i}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{6}}-\frac {i}{\left (\tanh \left (\frac {x}{2}\right )+i\right )^{4}}-\frac {i}{8 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}+\frac {4}{7 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{7}}-\frac {12}{5 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{5}}-\frac {1}{12 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}-\frac {1}{8 \left (\tanh \left (\frac {x}{2}\right )+i\right )}-\frac {i}{8 \left (\tanh \left (\frac {x}{2}\right )-i\right )^{2}}+\frac {1}{12 \left (\tanh \left (\frac {x}{2}\right )-i\right )^{3}}+\frac {1}{8 \tanh \left (\frac {x}{2}\right )-8 i}\) | \(116\) |
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. 573 vs. \(2 (31) = 62\).
time = 0.27, size = 573, normalized size = 12.19 \begin {gather*} \frac {72 i \, e^{\left (-x\right )}}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} - \frac {264 \, e^{\left (-2 \, x\right )}}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} - \frac {136 i \, e^{\left (-3 \, x\right )}}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} + \frac {28 \, e^{\left (-4 \, x\right )}}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} - \frac {168 i \, e^{\left (-5 \, x\right )}}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} - \frac {280 \, e^{\left (-6 \, x\right )}}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} - \frac {280 i \, e^{\left (-7 \, x\right )}}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} + \frac {210 \, e^{\left (-8 \, x\right )}}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} + \frac {18}{420 i \, e^{\left (-x\right )} - 315 \, e^{\left (-2 \, x\right )} + 840 i \, e^{\left (-3 \, x\right )} - 1470 \, e^{\left (-4 \, x\right )} - 1470 \, e^{\left (-6 \, x\right )} - 840 i \, e^{\left (-7 \, x\right )} - 315 \, e^{\left (-8 \, x\right )} - 420 i \, e^{\left (-9 \, x\right )} + 105 \, e^{\left (-10 \, x\right )} + 105} \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. 104 vs. \(2 (31) = 62\).
time = 0.40, size = 104, normalized size = 2.21 \begin {gather*} -\frac {2 \, {\left (105 \, e^{\left (8 \, x\right )} + 140 i \, e^{\left (7 \, x\right )} - 140 \, e^{\left (6 \, x\right )} + 84 i \, e^{\left (5 \, x\right )} + 14 \, e^{\left (4 \, x\right )} + 68 i \, e^{\left (3 \, x\right )} - 132 \, e^{\left (2 \, x\right )} - 36 i \, e^{x} + 9\right )}}{105 \, {\left (e^{\left (10 \, x\right )} + 4 i \, e^{\left (9 \, x\right )} - 3 \, e^{\left (8 \, x\right )} + 8 i \, e^{\left (7 \, x\right )} - 14 \, e^{\left (6 \, x\right )} - 14 \, e^{\left (4 \, x\right )} - 8 i \, e^{\left (3 \, x\right )} - 3 \, e^{\left (2 \, x\right )} - 4 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. 128 vs. \(2 (44) = 88\).
time = 0.13, size = 128, normalized size = 2.72 \begin {gather*} \frac {- 210 e^{8 x} - 280 i e^{7 x} + 280 e^{6 x} - 168 i e^{5 x} - 28 e^{4 x} - 136 i e^{3 x} + 264 e^{2 x} + 72 i e^{x} - 18}{105 e^{10 x} + 420 i e^{9 x} - 315 e^{8 x} + 840 i e^{7 x} - 1470 e^{6 x} - 1470 e^{4 x} - 840 i e^{3 x} - 315 e^{2 x} - 420 i e^{x} + 105} \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. 65 vs. \(2 (31) = 62\).
time = 0.42, size = 65, normalized size = 1.38 \begin {gather*} -\frac {-6 i \, e^{\left (2 \, x\right )} - 9 \, e^{x} + 5 i}{24 \, {\left (e^{x} - i\right )}^{3}} - \frac {210 i \, e^{\left (6 \, x\right )} - 105 \, e^{\left (5 \, x\right )} + 175 i \, e^{\left (4 \, x\right )} - 910 \, e^{\left (3 \, x\right )} - 756 i \, e^{\left (2 \, x\right )} + 427 \, e^{x} + 31 i}{840 \, {\left (e^{x} + i\right )}^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.07, size = 395, normalized size = 8.40 \begin {gather*} -\frac {\frac {25\,{\mathrm {e}}^{4\,x}}{168}-\frac {{\mathrm {e}}^{2\,x}}{4}+\frac {5}{168}+\frac {{\mathrm {e}}^{3\,x}\,5{}\mathrm {i}}{42}+\frac {{\mathrm {e}}^{5\,x}\,1{}\mathrm {i}}{28}-\frac {{\mathrm {e}}^x\,5{}\mathrm {i}}{84}}{15\,{\mathrm {e}}^{2\,x}-15\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1-{\mathrm {e}}^{3\,x}\,20{}\mathrm {i}+{\mathrm {e}}^{5\,x}\,6{}\mathrm {i}+{\mathrm {e}}^x\,6{}\mathrm {i}}+\frac {1{}\mathrm {i}}{12\,\left ({\mathrm {e}}^{2\,x}\,3{}\mathrm {i}-{\mathrm {e}}^{3\,x}+3\,{\mathrm {e}}^x-\mathrm {i}\right )}-\frac {\frac {5}{168}+\frac {{\mathrm {e}}^x\,1{}\mathrm {i}}{28}}{{\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}}-\frac {\frac {5\,{\mathrm {e}}^{5\,x}}{28}-\frac {{\mathrm {e}}^{3\,x}}{2}+\frac {{\mathrm {e}}^{4\,x}\,5{}\mathrm {i}}{28}-\frac {{\mathrm {e}}^{2\,x}\,5{}\mathrm {i}}{28}+\frac {{\mathrm {e}}^{6\,x}\,1{}\mathrm {i}}{28}+\frac {5\,{\mathrm {e}}^x}{28}-\frac {1}{28}{}\mathrm {i}}{{\mathrm {e}}^{2\,x}\,21{}\mathrm {i}+35\,{\mathrm {e}}^{3\,x}-{\mathrm {e}}^{4\,x}\,35{}\mathrm {i}-21\,{\mathrm {e}}^{5\,x}+{\mathrm {e}}^{6\,x}\,7{}\mathrm {i}+{\mathrm {e}}^{7\,x}-7\,{\mathrm {e}}^x-\mathrm {i}}-\frac {\frac {{\mathrm {e}}^{2\,x}\,1{}\mathrm {i}}{28}+\frac {5\,{\mathrm {e}}^x}{84}+\frac {1}{84}{}\mathrm {i}}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}}+\frac {1}{8\,\left (1-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^x\,2{}\mathrm {i}\right )}+\frac {1{}\mathrm {i}}{4\,\left ({\mathrm {e}}^x-\mathrm {i}\right )}-\frac {1{}\mathrm {i}}{28\,\left ({\mathrm {e}}^x+1{}\mathrm {i}\right )}-\frac {\frac {5\,{\mathrm {e}}^{2\,x}}{56}-\frac {1}{40}+\frac {{\mathrm {e}}^{3\,x}\,1{}\mathrm {i}}{28}+\frac {{\mathrm {e}}^x\,1{}\mathrm {i}}{28}}{{\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{2\,x}+1+{\mathrm {e}}^{3\,x}\,4{}\mathrm {i}-{\mathrm {e}}^x\,4{}\mathrm {i}}-\frac {\frac {{\mathrm {e}}^{2\,x}\,1{}\mathrm {i}}{14}+\frac {5\,{\mathrm {e}}^{3\,x}}{42}+\frac {{\mathrm {e}}^{4\,x}\,1{}\mathrm {i}}{28}-\frac {{\mathrm {e}}^x}{10}-\frac {1}{84}{}\mathrm {i}}{{\mathrm {e}}^{5\,x}-10\,{\mathrm {e}}^{3\,x}+{\mathrm {e}}^{4\,x}\,5{}\mathrm {i}-{\mathrm {e}}^{2\,x}\,10{}\mathrm {i}+5\,{\mathrm {e}}^x+1{}\mathrm {i}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________