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

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [F]

Optimal result

Integrand size = 13, antiderivative size = 47 \[ \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx=\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} \] Output:

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
 

Mathematica [B] (verified)

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.15 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.38 \[ \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx=-\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} \] Input:

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

Output:

-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)*Cosh[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)
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3042, 3190, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\tan (i x)^4}{(i-i \sin (i x))^2}dx\)

\(\Big \downarrow \) 3190

\(\displaystyle \int \left (-\tanh ^4(x) \text {sech}^4(x)-2 i \tanh ^5(x) \text {sech}^3(x)+\tanh ^6(x) \text {sech}^2(x)\right )dx\)

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3190
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x 
_)])^(p_.), x_Symbol] :> Simp[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] /; F 
reeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]
 
Maple [A] (verified)

Time = 18.53 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.47

method result size
risch \(-\frac {2 \left (68 i {\mathrm e}^{3 x}-132 \,{\mathrm e}^{2 x}-36 i {\mathrm e}^{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 )^{7} \left ({\mathrm e}^{x}-i\right )^{3}}\) \(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\)

Input:

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

Output:

-2/105*(68*I*exp(x)^3-132*exp(x)^2-36*I*exp(x)+14*exp(x)^4+9+84*I*exp(x)^5 
-140*exp(x)^6+140*I*exp(x)^7+105*exp(x)^8)/(exp(x)+I)^7/(exp(x)-I)^3
 

Fricas [B] (verification not implemented)

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.08 (sec) , antiderivative size = 104, normalized size of antiderivative = 2.21 \[ \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx=-\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 )}} \] Input:

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

Output:

-2/105*(105*e^(8*x) + 140*I*e^(7*x) - 140*e^(6*x) + 84*I*e^(5*x) + 14*e^(4 
*x) + 68*I*e^(3*x) - 132*e^(2*x) - 36*I*e^x + 9)/(e^(10*x) + 4*I*e^(9*x) - 
 3*e^(8*x) + 8*I*e^(7*x) - 14*e^(6*x) - 14*e^(4*x) - 8*I*e^(3*x) - 3*e^(2* 
x) - 4*I*e^x + 1)
 

Sympy [B] (verification not implemented)

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 (sec) , antiderivative size = 128, normalized size of antiderivative = 2.72 \[ \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx=\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} \] Input:

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

Output:

(-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) + 4 
20*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)
 

Maxima [B] (verification not implemented)

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.04 (sec) , antiderivative size = 573, normalized size of antiderivative = 12.19 \[ \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx=\text {Too large to display} \] Input:

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

Output:

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) - 315*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) - 136*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) - 1 
470*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)
 

Giac [B] (verification not implemented)

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.12 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.38 \[ \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx=-\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}} \] Input:

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

Output:

-1/24*(-6*I*e^(2*x) - 9*e^x + 5*I)/(e^x - I)^3 - 1/840*(210*I*e^(6*x) - 10 
5*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
 

Mupad [B] (verification not implemented)

Time = 5.06 (sec) , antiderivative size = 395, normalized size of antiderivative = 8.40 \[ \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx =\text {Too large to display} \] Input:

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

Output:

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)*35i - 
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)*4 
i - 6*exp(2*x) + exp(4*x) - exp(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*exp(3*x) 
- exp(2*x)*10i + exp(5*x) + 5*exp(x) + 1i)
 

Reduce [F]

\[ \int \frac {\tanh ^4(x)}{(i+\sinh (x))^2} \, dx=\int \frac {\tanh \left (x \right )^{4}}{\sinh \left (x \right )^{2}+2 \sinh \left (x \right ) i -1}d x \] Input:

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

Output:

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