3.218 \(\int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx\)

Optimal. Leaf size=47 \[ \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) \]

[Out]

2/3*I*sech(x)^3-4/5*I*sech(x)^5+2/7*I*sech(x)^7-1/5*tanh(x)^5+2/7*tanh(x)^7

________________________________________________________________________________________

Rubi [A]  time = 0.12, 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 = {2711, 2607, 14, 2606, 270, 30} \[ \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) \]

Antiderivative was successfully verified.

[In]

Int[Tanh[x]^4/(I + Sinh[x])^2,x]

[Out]

((2*I)/3)*Sech[x]^3 - ((4*I)/5)*Sech[x]^5 + ((2*I)/7)*Sech[x]^7 - Tanh[x]^5/5 + (2*Tanh[x]^7)/7

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2711

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.), x_Symbol] :> Dist[a^(2*
m), Int[ExpandIntegrand[(g*Tan[e + f*x])^p/Sec[e + f*x]^m, (a*Sec[e + f*x] - b*Tan[e + f*x])^(-m), x], x], x]
/; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

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 \operatorname {Subst}\left (\int x^6 \, dx,x,i \tanh (x)\right )+i \operatorname {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,i \tanh (x)\right )+2 i \operatorname {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\text {sech}(x)\right )\\ &=\frac {\tanh ^7(x)}{7}+i \operatorname {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,i \tanh (x)\right )+2 i \operatorname {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]  time = 0.15, size = 112, normalized size = 2.38 \[ -\frac {1232 \sinh (x)+824 \sinh (2 x)-1896 \sinh (3 x)+412 \sinh (4 x)+72 \sinh (5 x)+1442 i \cosh (x)-1664 i \cosh (2 x)+309 i \cosh (3 x)+288 i \cosh (4 x)-103 i \cosh (5 x)-672 i}{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} \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[x]^4/(I + Sinh[x])^2,x]

[Out]

-1/13440*(-672*I + (1442*I)*Cosh[x] - (1664*I)*Cosh[2*x] + (309*I)*Cosh[3*x] + (288*I)*Cosh[4*x] - (103*I)*Cos
h[5*x] + 1232*Sinh[x] + 824*Sinh[2*x] - 1896*Sinh[3*x] + 412*Sinh[4*x] + 72*Sinh[5*x])/((Cosh[x/2] - I*Sinh[x/
2])^7*(Cosh[x/2] + I*Sinh[x/2])^3)

________________________________________________________________________________________

fricas [B]  time = 0.50, size = 106, normalized size = 2.26 \[ -\frac {210 \, e^{\left (8 \, x\right )} + 280 i \, e^{\left (7 \, x\right )} - 280 \, e^{\left (6 \, x\right )} + 168 i \, e^{\left (5 \, x\right )} + 28 \, e^{\left (4 \, x\right )} + 136 i \, e^{\left (3 \, x\right )} - 264 \, e^{\left (2 \, x\right )} - 72 i \, e^{x} + 18}{105 \, e^{\left (10 \, x\right )} + 420 i \, e^{\left (9 \, x\right )} - 315 \, e^{\left (8 \, x\right )} + 840 i \, e^{\left (7 \, x\right )} - 1470 \, e^{\left (6 \, x\right )} - 1470 \, e^{\left (4 \, x\right )} - 840 i \, e^{\left (3 \, x\right )} - 315 \, e^{\left (2 \, x\right )} - 420 i \, e^{x} + 105} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4/(I+sinh(x))^2,x, algorithm="fricas")

[Out]

-(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)

________________________________________________________________________________________

giac [B]  time = 0.37, size = 65, normalized size = 1.38 \[ -\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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4/(I+sinh(x))^2,x, algorithm="giac")

[Out]

-1/24*(-6*I*e^(2*x) - 9*e^x + 5*I)/(e^x - I)^3 - 1/840*(210*I*e^(6*x) - 105*e^(5*x) + 175*I*e^(4*x) - 910*e^(3
*x) - 756*I*e^(2*x) + 427*e^x + 31*I)/(e^x + I)^7

________________________________________________________________________________________

maple [B]  time = 0.12, size = 116, normalized size = 2.47 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^4/(I+sinh(x))^2,x)

[Out]

2*I/(tanh(1/2*x)+I)^6-I/(tanh(1/2*x)+I)^4-1/8*I/(tanh(1/2*x)+I)^2+4/7/(tanh(1/2*x)+I)^7-12/5/(tanh(1/2*x)+I)^5
-1/12/(tanh(1/2*x)+I)^3-1/8/(tanh(1/2*x)+I)-1/8*I/(tanh(1/2*x)-I)^2+1/12/(tanh(1/2*x)-I)^3+1/8/(tanh(1/2*x)-I)

________________________________________________________________________________________

maxima [B]  time = 0.88, size = 573, normalized size = 12.19 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4/(I+sinh(x))^2,x, algorithm="maxima")

[Out]

72*I*e^(-x)/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e^(-3*x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x) - 3
15*e^(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105) - 264*e^(-2*x)/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e^(-3*
x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x) - 315*e^(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105) - 1
36*I*e^(-3*x)/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e^(-3*x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x) -
 315*e^(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105) + 28*e^(-4*x)/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e^(-3
*x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x) - 315*e^(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105) -
168*I*e^(-5*x)/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e^(-3*x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x)
- 315*e^(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105) - 280*e^(-6*x)/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e^(
-3*x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x) - 315*e^(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105)
- 280*I*e^(-7*x)/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e^(-3*x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x
) - 315*e^(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105) + 210*e^(-8*x)/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e
^(-3*x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x) - 315*e^(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105
) + 18/(420*I*e^(-x) - 315*e^(-2*x) + 840*I*e^(-3*x) - 1470*e^(-4*x) - 1470*e^(-6*x) - 840*I*e^(-7*x) - 315*e^
(-8*x) - 420*I*e^(-9*x) + 105*e^(-10*x) + 105)

________________________________________________________________________________________

mupad [B]  time = 4.07, size = 395, normalized size = 8.40 \[ -\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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^4/(sinh(x) + 1i)^2,x)

[Out]

1i/(12*(exp(2*x)*3i - exp(3*x) + 3*exp(x) - 1i)) - ((exp(3*x)*5i)/42 - exp(2*x)/4 + (25*exp(4*x))/168 + (exp(5
*x)*1i)/28 - (exp(x)*5i)/84 + 5/168)/(15*exp(2*x) - exp(3*x)*20i - 15*exp(4*x) + exp(5*x)*6i + exp(6*x) + exp(
x)*6i - 1) - ((exp(x)*1i)/28 + 5/168)/(exp(2*x) + exp(x)*2i - 1) - ((exp(4*x)*5i)/28 - exp(3*x)/2 - (exp(2*x)*
5i)/28 + (5*exp(5*x))/28 + (exp(6*x)*1i)/28 + (5*exp(x))/28 - 1i/28)/(exp(2*x)*21i + 35*exp(3*x) - exp(4*x)*35
i - 21*exp(5*x) + exp(6*x)*7i + exp(7*x) - 7*exp(x) - 1i) - ((exp(2*x)*1i)/28 + (5*exp(x))/84 + 1i/84)/(exp(2*
x)*3i + exp(3*x) - 3*exp(x) - 1i) + 1/(8*(exp(x)*2i - exp(2*x) + 1)) + 1i/(4*(exp(x) - 1i)) - 1i/(28*(exp(x) +
 1i)) - ((5*exp(2*x))/56 + (exp(3*x)*1i)/28 + (exp(x)*1i)/28 - 1/40)/(exp(3*x)*4i - 6*exp(2*x) + exp(4*x) - ex
p(x)*4i + 1) - ((exp(2*x)*1i)/14 + (5*exp(3*x))/42 + (exp(4*x)*1i)/28 - exp(x)/10 - 1i/84)/(exp(4*x)*5i - 10*e
xp(3*x) - exp(2*x)*10i + exp(5*x) + 5*exp(x) + 1i)

________________________________________________________________________________________

sympy [B]  time = 0.29, size = 128, normalized size = 2.72 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)**4/(I+sinh(x))**2,x)

[Out]

(-210*exp(8*x) - 280*I*exp(7*x) + 280*exp(6*x) - 168*I*exp(5*x) - 28*exp(4*x) - 136*I*exp(3*x) + 264*exp(2*x)
+ 72*I*exp(x) - 18)/(105*exp(10*x) + 420*I*exp(9*x) - 315*exp(8*x) + 840*I*exp(7*x) - 1470*exp(6*x) - 1470*exp
(4*x) - 840*I*exp(3*x) - 315*exp(2*x) - 420*I*exp(x) + 105)

________________________________________________________________________________________