Integrand size = 13, antiderivative size = 52 \[ \int \frac {\tanh ^4(x)}{i+\text {csch}(x)} \, dx=-i x+\frac {1}{15} (15 i-8 \text {csch}(x)) \tanh (x)+\frac {1}{15} (5 i-4 \text {csch}(x)) \tanh ^3(x)+\frac {1}{5} (i-\text {csch}(x)) \tanh ^5(x) \] Output:
-I*x+1/15*(15*I-8*csch(x))*tanh(x)+1/15*(5*I-4*csch(x))*tanh(x)^3+1/5*(I-c sch(x))*tanh(x)^5
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(126\) vs. \(2(52)=104\).
Time = 0.13 (sec) , antiderivative size = 126, normalized size of antiderivative = 2.42 \[ \int \frac {\tanh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {-200+6 (89-120 i x) \cosh (x)-128 \cosh (2 x)+178 \cosh (3 x)-240 i x \cosh (3 x)-184 \cosh (4 x)+64 i \sinh (x)+178 i \sinh (2 x)+240 x \sinh (2 x)+128 i \sinh (3 x)+89 i \sinh (4 x)+120 x \sinh (4 x)}{960 \left (\cosh \left (\frac {x}{2}\right )-i \sinh \left (\frac {x}{2}\right )\right )^3 \left (\cosh \left (\frac {x}{2}\right )+i \sinh \left (\frac {x}{2}\right )\right )^5} \] Input:
Integrate[Tanh[x]^4/(I + Csch[x]),x]
Output:
(-200 + 6*(89 - (120*I)*x)*Cosh[x] - 128*Cosh[2*x] + 178*Cosh[3*x] - (240* I)*x*Cosh[3*x] - 184*Cosh[4*x] + (64*I)*Sinh[x] + (178*I)*Sinh[2*x] + 240* x*Sinh[2*x] + (128*I)*Sinh[3*x] + (89*I)*Sinh[4*x] + 120*x*Sinh[4*x])/(960 *(Cosh[x/2] - I*Sinh[x/2])^3*(Cosh[x/2] + I*Sinh[x/2])^5)
Time = 0.46 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.17, number of steps used = 13, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {3042, 4376, 3042, 25, 26, 4370, 25, 3042, 4370, 3042, 25, 4370, 24}
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)}{\text {csch}(x)+i} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cot (i x)^4 (i \csc (i x)+i)}dx\) |
\(\Big \downarrow \) 4376 |
\(\displaystyle -\int (i-\text {csch}(x)) \tanh ^6(x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\int -\frac {i-i \csc (i x)}{\cot (i x)^6}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \frac {i (1-\csc (i x))}{\cot (i x)^6}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle i \int \frac {1-\csc (i x)}{\cot (i x)^6}dx\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle i \left (\frac {1}{5} \int -\left ((4 i \text {csch}(x)+5) \tanh ^4(x)\right )dx+\frac {1}{5} \tanh ^5(x) (1+i \text {csch}(x))\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle i \left (\frac {1}{5} \tanh ^5(x) (1+i \text {csch}(x))-\frac {1}{5} \int (4 i \text {csch}(x)+5) \tanh ^4(x)dx\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle i \left (\frac {1}{5} \tanh ^5(x) (1+i \text {csch}(x))-\frac {1}{5} \int \frac {5-4 \csc (i x)}{\cot (i x)^4}dx\right )\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle i \left (\frac {1}{5} \left (\frac {1}{3} \tanh ^3(x) (5+4 i \text {csch}(x))-\frac {1}{3} \int (8 i \text {csch}(x)+15) \tanh ^2(x)dx\right )+\frac {1}{5} \tanh ^5(x) (1+i \text {csch}(x))\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle i \left (\frac {1}{5} \left (\frac {1}{3} \tanh ^3(x) (5+4 i \text {csch}(x))-\frac {1}{3} \int -\frac {15-8 \csc (i x)}{\cot (i x)^2}dx\right )+\frac {1}{5} \tanh ^5(x) (1+i \text {csch}(x))\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle i \left (\frac {1}{5} \left (\frac {1}{3} \int \frac {15-8 \csc (i x)}{\cot (i x)^2}dx+\frac {1}{3} \tanh ^3(x) (5+4 i \text {csch}(x))\right )+\frac {1}{5} \tanh ^5(x) (1+i \text {csch}(x))\right )\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle i \left (\frac {1}{5} \left (\frac {1}{3} (\int -15dx+\tanh (x) (15+8 i \text {csch}(x)))+\frac {1}{3} \tanh ^3(x) (5+4 i \text {csch}(x))\right )+\frac {1}{5} \tanh ^5(x) (1+i \text {csch}(x))\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle i \left (\frac {1}{5} \tanh ^5(x) (1+i \text {csch}(x))+\frac {1}{5} \left (\frac {1}{3} \tanh ^3(x) (5+4 i \text {csch}(x))+\frac {1}{3} (-15 x+\tanh (x) (15+8 i \text {csch}(x)))\right )\right )\) |
Input:
Int[Tanh[x]^4/(I + Csch[x]),x]
Output:
I*(((1 + I*Csch[x])*Tanh[x]^5)/5 + (((5 + (4*I)*Csch[x])*Tanh[x]^3)/3 + (- 15*x + (15 + (8*I)*Csch[x])*Tanh[x])/3)/5)
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_)), x_Symbol] :> Simp[(-(e*Cot[c + d*x])^(m + 1))*((a + b*Csc[c + d*x])/( d*e*(m + 1))), x] - Simp[1/(e^2*(m + 1)) Int[(e*Cot[c + d*x])^(m + 2)*(a* (m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && L tQ[m, -1]
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_))^(n_), x_Symbol] :> Simp[a^(2*n)/e^(2*n) Int[(e*Cot[c + d*x])^(m + 2* n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[a ^2 - b^2, 0] && ILtQ[n, 0]
Time = 1.22 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.31
method | result | size |
risch | \(-i x -\frac {2 \left (-31 i {\mathrm e}^{2 x}+73 \,{\mathrm e}^{3 x}+31 \,{\mathrm e}^{x}-25 i {\mathrm e}^{4 x}+65 \,{\mathrm e}^{5 x}-23 i+15 i {\mathrm e}^{6 x}+15 \,{\mathrm e}^{7 x}\right )}{15 \left ({\mathrm e}^{x}+i\right )^{3} \left ({\mathrm e}^{x}-i\right )^{5}}\) | \(68\) |
default | \(i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )+\frac {5 i}{8 \left (\tanh \left (\frac {x}{2}\right )+i\right )}+\frac {i}{6 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{3}}-\frac {1}{4 \left (\tanh \left (\frac {x}{2}\right )+i\right )^{2}}+\frac {11 i}{8 \left (\tanh \left (\frac {x}{2}\right )-i\right )}+\frac {2 i}{5 \left (\tanh \left (\frac {x}{2}\right )-i\right )^{5}}+\frac {1}{\left (\tanh \left (\frac {x}{2}\right )-i\right )^{4}}+\frac {1}{\left (\tanh \left (\frac {x}{2}\right )-i\right )^{2}}-i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )\) | \(99\) |
Input:
int(tanh(x)^4/(I+csch(x)),x,method=_RETURNVERBOSE)
Output:
-I*x-2/15*(-31*I*exp(x)^2+73*exp(x)^3+31*exp(x)-25*I*exp(x)^4+65*exp(x)^5- 23*I+15*I*exp(x)^6+15*exp(x)^7)/(exp(x)+I)^3/(exp(x)-I)^5
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (36) = 72\).
Time = 0.09 (sec) , antiderivative size = 124, normalized size of antiderivative = 2.38 \[ \int \frac {\tanh ^4(x)}{i+\text {csch}(x)} \, dx=\frac {-15 i \, x e^{\left (8 \, x\right )} - 30 \, {\left (x + 1\right )} e^{\left (7 \, x\right )} - 30 \, {\left (i \, x + i\right )} e^{\left (6 \, x\right )} - 10 \, {\left (9 \, x + 13\right )} e^{\left (5 \, x\right )} - 2 \, {\left (45 \, x + 73\right )} e^{\left (3 \, x\right )} - 2 \, {\left (-15 i \, x - 31 i\right )} e^{\left (2 \, x\right )} - 2 \, {\left (15 \, x + 31\right )} e^{x} + 15 i \, x + 50 i \, e^{\left (4 \, x\right )} + 46 i}{15 \, {\left (e^{\left (8 \, x\right )} - 2 i \, e^{\left (7 \, x\right )} + 2 \, e^{\left (6 \, x\right )} - 6 i \, e^{\left (5 \, x\right )} - 6 i \, e^{\left (3 \, x\right )} - 2 \, e^{\left (2 \, x\right )} - 2 i \, e^{x} - 1\right )}} \] Input:
integrate(tanh(x)^4/(I+csch(x)),x, algorithm="fricas")
Output:
1/15*(-15*I*x*e^(8*x) - 30*(x + 1)*e^(7*x) - 30*(I*x + I)*e^(6*x) - 10*(9* x + 13)*e^(5*x) - 2*(45*x + 73)*e^(3*x) - 2*(-15*I*x - 31*I)*e^(2*x) - 2*( 15*x + 31)*e^x + 15*I*x + 50*I*e^(4*x) + 46*I)/(e^(8*x) - 2*I*e^(7*x) + 2* e^(6*x) - 6*I*e^(5*x) - 6*I*e^(3*x) - 2*e^(2*x) - 2*I*e^x - 1)
\[ \int \frac {\tanh ^4(x)}{i+\text {csch}(x)} \, dx=\int \frac {\tanh ^{4}{\left (x \right )}}{\operatorname {csch}{\left (x \right )} + i}\, dx \] Input:
integrate(tanh(x)**4/(I+csch(x)),x)
Output:
Integral(tanh(x)**4/(csch(x) + I), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 96 vs. \(2 (36) = 72\).
Time = 0.04 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.85 \[ \int \frac {\tanh ^4(x)}{i+\text {csch}(x)} \, dx=-i \, x - \frac {2 \, {\left (31 \, e^{\left (-x\right )} + 31 i \, e^{\left (-2 \, x\right )} + 73 \, e^{\left (-3 \, x\right )} + 25 i \, e^{\left (-4 \, x\right )} + 65 \, e^{\left (-5 \, x\right )} - 15 i \, e^{\left (-6 \, x\right )} + 15 \, e^{\left (-7 \, x\right )} + 23 i\right )}}{30 i \, e^{\left (-x\right )} - 30 \, e^{\left (-2 \, x\right )} + 90 i \, e^{\left (-3 \, x\right )} + 90 i \, e^{\left (-5 \, x\right )} + 30 \, e^{\left (-6 \, x\right )} + 30 i \, e^{\left (-7 \, x\right )} + 15 \, e^{\left (-8 \, x\right )} - 15} \] Input:
integrate(tanh(x)^4/(I+csch(x)),x, algorithm="maxima")
Output:
-I*x - 2*(31*e^(-x) + 31*I*e^(-2*x) + 73*e^(-3*x) + 25*I*e^(-4*x) + 65*e^( -5*x) - 15*I*e^(-6*x) + 15*e^(-7*x) + 23*I)/(30*I*e^(-x) - 30*e^(-2*x) + 9 0*I*e^(-3*x) + 90*I*e^(-5*x) + 30*e^(-6*x) + 30*I*e^(-7*x) + 15*e^(-8*x) - 15)
Time = 0.11 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.12 \[ \int \frac {\tanh ^4(x)}{i+\text {csch}(x)} \, dx=-i \, x - \frac {21 i \, e^{\left (2 \, x\right )} - 36 \, e^{x} - 19 i}{24 \, {\left (i \, e^{x} - 1\right )}^{3}} - \frac {115 \, e^{\left (4 \, x\right )} - 380 i \, e^{\left (3 \, x\right )} - 530 \, e^{\left (2 \, x\right )} + 340 i \, e^{x} + 91}{40 \, {\left (e^{x} - i\right )}^{5}} \] Input:
integrate(tanh(x)^4/(I+csch(x)),x, algorithm="giac")
Output:
-I*x - 1/24*(21*I*e^(2*x) - 36*e^x - 19*I)/(I*e^x - 1)^3 - 1/40*(115*e^(4* x) - 380*I*e^(3*x) - 530*e^(2*x) + 340*I*e^x + 91)/(e^x - I)^5
Time = 3.57 (sec) , antiderivative size = 237, normalized size of antiderivative = 4.56 \[ \int \frac {\tanh ^4(x)}{i+\text {csch}(x)} \, dx=-x\,1{}\mathrm {i}-\frac {1{}\mathrm {i}}{4\,\left ({\mathrm {e}}^{2\,x}-1+{\mathrm {e}}^x\,2{}\mathrm {i}\right )}+\frac {\frac {23\,{\mathrm {e}}^x}{40}-\frac {3}{8}{}\mathrm {i}}{1-{\mathrm {e}}^{2\,x}+{\mathrm {e}}^x\,2{}\mathrm {i}}-\frac {23}{40\,\left ({\mathrm {e}}^x-\mathrm {i}\right )}+\frac {7}{8\,\left ({\mathrm {e}}^x+1{}\mathrm {i}\right )}+\frac {\frac {{\mathrm {e}}^{2\,x}\,9{}\mathrm {i}}{8}-\frac {23\,{\mathrm {e}}^{3\,x}}{40}+\frac {9\,{\mathrm {e}}^x}{8}-\frac {3}{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 {\frac {3}{8}-\frac {23\,{\mathrm {e}}^{2\,x}}{40}+\frac {{\mathrm {e}}^x\,3{}\mathrm {i}}{4}}{{\mathrm {e}}^{2\,x}\,3{}\mathrm {i}-{\mathrm {e}}^{3\,x}+3\,{\mathrm {e}}^x-\mathrm {i}}-\frac {1}{6\,\left ({\mathrm {e}}^{2\,x}\,3{}\mathrm {i}+{\mathrm {e}}^{3\,x}-3\,{\mathrm {e}}^x-\mathrm {i}\right )}-\frac {\frac {23\,{\mathrm {e}}^{4\,x}}{40}-\frac {9\,{\mathrm {e}}^{2\,x}}{4}+\frac {23}{40}-\frac {{\mathrm {e}}^{3\,x}\,3{}\mathrm {i}}{2}+\frac {{\mathrm {e}}^x\,3{}\mathrm {i}}{2}}{{\mathrm {e}}^{2\,x}\,10{}\mathrm {i}-10\,{\mathrm {e}}^{3\,x}-{\mathrm {e}}^{4\,x}\,5{}\mathrm {i}+{\mathrm {e}}^{5\,x}+5\,{\mathrm {e}}^x-\mathrm {i}} \] Input:
int(tanh(x)^4/(1/sinh(x) + 1i),x)
Output:
((23*exp(x))/40 - 3i/8)/(exp(x)*2i - exp(2*x) + 1) - 1i/(4*(exp(2*x) + exp (x)*2i - 1)) - x*1i - 23/(40*(exp(x) - 1i)) + 7/(8*(exp(x) + 1i)) + ((exp( 2*x)*9i)/8 - (23*exp(3*x))/40 + (9*exp(x))/8 - 3i/8)/(exp(4*x) - exp(3*x)* 4i - 6*exp(2*x) + exp(x)*4i + 1) - ((exp(x)*3i)/4 - (23*exp(2*x))/40 + 3/8 )/(exp(2*x)*3i - exp(3*x) + 3*exp(x) - 1i) - 1/(6*(exp(2*x)*3i + exp(3*x) - 3*exp(x) - 1i)) - ((23*exp(4*x))/40 - (exp(3*x)*3i)/2 - (9*exp(2*x))/4 + (exp(x)*3i)/2 + 23/40)/(exp(2*x)*10i - 10*exp(3*x) - exp(4*x)*5i + exp(5* x) + 5*exp(x) - 1i)
\[ \int \frac {\tanh ^4(x)}{i+\text {csch}(x)} \, dx=\int \frac {\tanh \left (x \right )^{4}}{\mathrm {csch}\left (x \right )+i}d x \] Input:
int(tanh(x)^4/(I+csch(x)),x)
Output:
int(tanh(x)**4/(csch(x) + i),x)