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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3973, 3966, 3855} \[ \int \frac {\coth ^4(x)}{i+\text {csch}(x)} \, dx=-\frac {1}{2} \text {arctanh}(\cosh (x))-i x+\frac {1}{2} \coth (x) (-\text {csch}(x)+2 i) \]

[In]

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

[Out]

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

Rule 3855

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

Rule 3966

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(-e)*(e*Cot
[c + d*x])^(m - 1)*((a*m + b*(m - 1)*Csc[c + d*x])/(d*m*(m - 1))), x] - Dist[e^2/m, Int[(e*Cot[c + d*x])^(m -
2)*(a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m, 1]

Rule 3973

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[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] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \int \coth ^2(x) (-i+\text {csch}(x)) \, dx \\ & = \frac {1}{2} \coth (x) (2 i-\text {csch}(x))+\frac {1}{2} \int (-2 i+\text {csch}(x)) \, dx \\ & = -i x+\frac {1}{2} \coth (x) (2 i-\text {csch}(x))+\frac {1}{2} \int \text {csch}(x) \, dx \\ & = -i x-\frac {1}{2} \text {arctanh}(\cosh (x))+\frac {1}{2} \coth (x) (2 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. \(76\) vs. \(2(27)=54\).

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

[In]

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

[Out]

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

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (21 ) = 42\).

Time = 3.82 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.70

method result size
risch \(-i x -\frac {-2 i {\mathrm e}^{2 x}+{\mathrm e}^{3 x}+2 i+{\mathrm e}^{x}}{\left ({\mathrm e}^{2 x}-1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{2}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{2}\) \(46\)
default \(\frac {i \tanh \left (\frac {x}{2}\right )}{2}+\frac {\tanh \left (\frac {x}{2}\right )^{2}}{8}-i \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+i \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\frac {1}{8 \tanh \left (\frac {x}{2}\right )^{2}}+\frac {i}{2 \tanh \left (\frac {x}{2}\right )}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )\right )}{2}\) \(61\)

[In]

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

[Out]

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

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. 86 vs. \(2 (17) = 34\).

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

[In]

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

[Out]

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

Sympy [F]

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

[In]

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

[Out]

Integral(coth(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. 55 vs. \(2 (17) = 34\).

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

[In]

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

[Out]

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

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. 43 vs. \(2 (17) = 34\).

Time = 0.27 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.59 \[ \int \frac {\coth ^4(x)}{i+\text {csch}(x)} \, dx=-i \, x - \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 {1}{2} \, \log \left (e^{x} + 1\right ) + \frac {1}{2} \, \log \left ({\left | e^{x} - 1 \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

log(1 - exp(x))/2 - log(- exp(x) - 1)/2 - x*1i - (exp(x) - 2i)/(exp(2*x) - 1) - (2*exp(x))/(exp(4*x) - 2*exp(2
*x) + 1)