\(\int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx\) [69]

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

Optimal result

Integrand size = 13, antiderivative size = 37 \[ \int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx=\frac {3}{2} \text {arctanh}(\cosh (x))+2 i \coth (x)-\frac {3}{2} \coth (x) \text {csch}(x)+\frac {\coth (x) \text {csch}^2(x)}{i+\text {csch}(x)} \]

[Out]

3/2*arctanh(cosh(x))+2*I*coth(x)-3/2*coth(x)*csch(x)+coth(x)*csch(x)^2/(I+csch(x))

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3903, 3872, 3852, 8, 3853, 3855} \[ \int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx=\frac {3}{2} \text {arctanh}(\cosh (x))+2 i \coth (x)+\frac {\coth (x) \text {csch}^2(x)}{\text {csch}(x)+i}-\frac {3}{2} \coth (x) \text {csch}(x) \]

[In]

Int[Csch[x]^4/(I + Csch[x]),x]

[Out]

(3*ArcTanh[Cosh[x]])/2 + (2*I)*Coth[x] - (3*Coth[x]*Csch[x])/2 + (Coth[x]*Csch[x]^2)/(I + Csch[x])

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3903

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[d^2*Cot[e +
 f*x]*((d*Csc[e + f*x])^(n - 2)/(f*(a + b*Csc[e + f*x]))), x] - Dist[d^2/(a*b), Int[(d*Csc[e + f*x])^(n - 2)*(
b*(n - 2) - a*(n - 1)*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && GtQ[n, 1]

Rubi steps \begin{align*} \text {integral}& = \frac {\coth (x) \text {csch}^2(x)}{i+\text {csch}(x)}-\int (2 i-3 \text {csch}(x)) \text {csch}^2(x) \, dx \\ & = \frac {\coth (x) \text {csch}^2(x)}{i+\text {csch}(x)}-2 i \int \text {csch}^2(x) \, dx+3 \int \text {csch}^3(x) \, dx \\ & = -\frac {3}{2} \coth (x) \text {csch}(x)+\frac {\coth (x) \text {csch}^2(x)}{i+\text {csch}(x)}-\frac {3}{2} \int \text {csch}(x) \, dx-2 \text {Subst}(\int 1 \, dx,x,-i \coth (x)) \\ & = \frac {3}{2} \text {arctanh}(\cosh (x))+2 i \coth (x)-\frac {3}{2} \coth (x) \text {csch}(x)+\frac {\coth (x) \text {csch}^2(x)}{i+\text {csch}(x)} \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(90\) vs. \(2(37)=74\).

Time = 0.24 (sec) , antiderivative size = 90, normalized size of antiderivative = 2.43 \[ \int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx=\frac {1}{8} \left (4 i \coth \left (\frac {x}{2}\right )-\text {csch}^2\left (\frac {x}{2}\right )+12 \log \left (\cosh \left (\frac {x}{2}\right )\right )-12 \log \left (\sinh \left (\frac {x}{2}\right )\right )-\text {sech}^2\left (\frac {x}{2}\right )+\frac {16 \sinh \left (\frac {x}{2}\right )}{-i \cosh \left (\frac {x}{2}\right )+\sinh \left (\frac {x}{2}\right )}+4 i \tanh \left (\frac {x}{2}\right )\right ) \]

[In]

Integrate[Csch[x]^4/(I + Csch[x]),x]

[Out]

((4*I)*Coth[x/2] - Csch[x/2]^2 + 12*Log[Cosh[x/2]] - 12*Log[Sinh[x/2]] - Sech[x/2]^2 + (16*Sinh[x/2])/((-I)*Co
sh[x/2] + Sinh[x/2]) + (4*I)*Tanh[x/2])/8

Maple [A] (verified)

Time = 0.95 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.43

method result size
default \(\frac {i \tanh \left (\frac {x}{2}\right )}{2}+\frac {\tanh \left (\frac {x}{2}\right )^{2}}{8}-\frac {1}{8 \tanh \left (\frac {x}{2}\right )^{2}}+\frac {i}{2 \tanh \left (\frac {x}{2}\right )}-\frac {3 \ln \left (\tanh \left (\frac {x}{2}\right )\right )}{2}+\frac {2 i}{\tanh \left (\frac {x}{2}\right )-i}\) \(53\)
risch \(-\frac {-5 \,{\mathrm e}^{2 x}-3 i {\mathrm e}^{3 x}+3 \,{\mathrm e}^{4 x}+4+i {\mathrm e}^{x}}{\left ({\mathrm e}^{2 x}-1\right )^{2} \left ({\mathrm e}^{x}-i\right )}-\frac {3 \ln \left ({\mathrm e}^{x}-1\right )}{2}+\frac {3 \ln \left ({\mathrm e}^{x}+1\right )}{2}\) \(59\)
parallelrisch \(\frac {\left (-12 i+12 \tanh \left (\frac {x}{2}\right )\right ) \ln \left (\tanh \left (\frac {x}{2}\right )\right )-i \coth \left (\frac {x}{2}\right )^{2}-3 i \tanh \left (\frac {x}{2}\right )^{2}-\tanh \left (\frac {x}{2}\right )^{3}-24 i-3 \coth \left (\frac {x}{2}\right )}{-8 \tanh \left (\frac {x}{2}\right )+8 i}\) \(63\)

[In]

int(csch(x)^4/(I+csch(x)),x,method=_RETURNVERBOSE)

[Out]

1/2*I*tanh(1/2*x)+1/8*tanh(1/2*x)^2-1/8/tanh(1/2*x)^2+1/2*I/tanh(1/2*x)-3/2*ln(tanh(1/2*x))+2*I/(tanh(1/2*x)-I
)

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. 120 vs. \(2 (29) = 58\).

Time = 0.25 (sec) , antiderivative size = 120, normalized size of antiderivative = 3.24 \[ \int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx=\frac {3 \, {\left (e^{\left (5 \, x\right )} - i \, e^{\left (4 \, x\right )} - 2 \, e^{\left (3 \, x\right )} + 2 i \, e^{\left (2 \, x\right )} + e^{x} - i\right )} \log \left (e^{x} + 1\right ) - 3 \, {\left (e^{\left (5 \, x\right )} - i \, e^{\left (4 \, x\right )} - 2 \, e^{\left (3 \, x\right )} + 2 i \, e^{\left (2 \, x\right )} + e^{x} - i\right )} \log \left (e^{x} - 1\right ) - 6 \, e^{\left (4 \, x\right )} + 6 i \, e^{\left (3 \, x\right )} + 10 \, e^{\left (2 \, x\right )} - 2 i \, e^{x} - 8}{2 \, {\left (e^{\left (5 \, x\right )} - i \, e^{\left (4 \, x\right )} - 2 \, e^{\left (3 \, x\right )} + 2 i \, e^{\left (2 \, x\right )} + e^{x} - i\right )}} \]

[In]

integrate(csch(x)^4/(I+csch(x)),x, algorithm="fricas")

[Out]

1/2*(3*(e^(5*x) - I*e^(4*x) - 2*e^(3*x) + 2*I*e^(2*x) + e^x - I)*log(e^x + 1) - 3*(e^(5*x) - I*e^(4*x) - 2*e^(
3*x) + 2*I*e^(2*x) + e^x - I)*log(e^x - 1) - 6*e^(4*x) + 6*I*e^(3*x) + 10*e^(2*x) - 2*I*e^x - 8)/(e^(5*x) - I*
e^(4*x) - 2*e^(3*x) + 2*I*e^(2*x) + e^x - I)

Sympy [F]

\[ \int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx=\int \frac {\operatorname {csch}^{4}{\left (x \right )}}{\operatorname {csch}{\left (x \right )} + i}\, dx \]

[In]

integrate(csch(x)**4/(I+csch(x)),x)

[Out]

Integral(csch(x)**4/(csch(x) + I), x)

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. 77 vs. \(2 (29) = 58\).

Time = 0.17 (sec) , antiderivative size = 77, normalized size of antiderivative = 2.08 \[ \int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx=-\frac {-i \, e^{\left (-x\right )} - 5 \, e^{\left (-2 \, x\right )} + 3 i \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + 4}{e^{\left (-x\right )} - 2 i \, e^{\left (-2 \, x\right )} - 2 \, e^{\left (-3 \, x\right )} + i \, e^{\left (-4 \, x\right )} + e^{\left (-5 \, x\right )} + i} + \frac {3}{2} \, \log \left (e^{\left (-x\right )} + 1\right ) - \frac {3}{2} \, \log \left (e^{\left (-x\right )} - 1\right ) \]

[In]

integrate(csch(x)^4/(I+csch(x)),x, algorithm="maxima")

[Out]

-(-I*e^(-x) - 5*e^(-2*x) + 3*I*e^(-3*x) + 3*e^(-4*x) + 4)/(e^(-x) - 2*I*e^(-2*x) - 2*e^(-3*x) + I*e^(-4*x) + e
^(-5*x) + I) + 3/2*log(e^(-x) + 1) - 3/2*log(e^(-x) - 1)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.35 \[ \int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx=-\frac {e^{\left (3 \, x\right )} - 2 i \, e^{\left (2 \, x\right )} + e^{x} + 2 i}{{\left (e^{\left (2 \, x\right )} - 1\right )}^{2}} - \frac {2 i}{i \, e^{x} + 1} + \frac {3}{2} \, \log \left (e^{x} + 1\right ) - \frac {3}{2} \, \log \left ({\left | e^{x} - 1 \right |}\right ) \]

[In]

integrate(csch(x)^4/(I+csch(x)),x, algorithm="giac")

[Out]

-(e^(3*x) - 2*I*e^(2*x) + e^x + 2*I)/(e^(2*x) - 1)^2 - 2*I/(I*e^x + 1) + 3/2*log(e^x + 1) - 3/2*log(abs(e^x -
1))

Mupad [B] (verification not implemented)

Time = 2.50 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.70 \[ \int \frac {\text {csch}^4(x)}{i+\text {csch}(x)} \, dx=\frac {3\,\ln \left (3\,{\mathrm {e}}^x+3\right )}{2}-\frac {3\,\ln \left (3\,{\mathrm {e}}^x-3\right )}{2}-\frac {{\mathrm {e}}^x}{{\mathrm {e}}^{2\,x}-1}-\frac {2\,{\mathrm {e}}^x}{{\left ({\mathrm {e}}^{2\,x}-1\right )}^2}-\frac {2}{{\mathrm {e}}^x-\mathrm {i}}+\frac {2{}\mathrm {i}}{{\mathrm {e}}^{2\,x}-1} \]

[In]

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

[Out]

(3*log(3*exp(x) + 3))/2 - (3*log(3*exp(x) - 3))/2 - exp(x)/(exp(2*x) - 1) - (2*exp(x))/(exp(2*x) - 1)^2 - 2/(e
xp(x) - 1i) + 2i/(exp(2*x) - 1)