\(\int \frac {\coth ^2(x)}{i+\sinh (x)} \, dx\) [213]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (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)

Optimal result

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

[Out]

-arctanh(cosh(x))+I*coth(x)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2785, 3852, 8, 3855} \[ \int \frac {\coth ^2(x)}{i+\sinh (x)} \, dx=-\text {arctanh}(\cosh (x))+i \coth (x) \]

[In]

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

[Out]

-ArcTanh[Cosh[x]] + I*Coth[x]

Rule 8

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

Rule 2785

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

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 3855

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

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

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(41\) vs. \(2(12)=24\).

Time = 0.08 (sec) , antiderivative size = 41, normalized size of antiderivative = 3.42 \[ \int \frac {\coth ^2(x)}{i+\sinh (x)} \, dx=\frac {1}{2} i \coth \left (\frac {x}{2}\right )-\log \left (\cosh \left (\frac {x}{2}\right )\right )+\log \left (\sinh \left (\frac {x}{2}\right )\right )+\frac {1}{2} i \tanh \left (\frac {x}{2}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 6.12 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.92

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

[In]

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

[Out]

1/2*I*tanh(1/2*x)+1/2*I/tanh(1/2*x)+ln(tanh(1/2*x))

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. 37 vs. \(2 (10) = 20\).

Time = 0.28 (sec) , antiderivative size = 37, normalized size of antiderivative = 3.08 \[ \int \frac {\coth ^2(x)}{i+\sinh (x)} \, dx=-\frac {{\left (e^{\left (2 \, x\right )} - 1\right )} \log \left (e^{x} + 1\right ) - {\left (e^{\left (2 \, x\right )} - 1\right )} \log \left (e^{x} - 1\right ) - 2 i}{e^{\left (2 \, x\right )} - 1} \]

[In]

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

[Out]

-((e^(2*x) - 1)*log(e^x + 1) - (e^(2*x) - 1)*log(e^x - 1) - 2*I)/(e^(2*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. 22 vs. \(2 (8) = 16\).

Time = 0.07 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.83 \[ \int \frac {\coth ^2(x)}{i+\sinh (x)} \, dx=\log {\left (e^{x} - 1 \right )} - \log {\left (e^{x} + 1 \right )} + \frac {2 i}{e^{2 x} - 1} \]

[In]

integrate(coth(x)**2/(I+sinh(x)),x)

[Out]

log(exp(x) - 1) - log(exp(x) + 1) + 2*I/(exp(2*x) - 1)

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. 27 vs. \(2 (10) = 20\).

Time = 0.22 (sec) , antiderivative size = 27, normalized size of antiderivative = 2.25 \[ \int \frac {\coth ^2(x)}{i+\sinh (x)} \, dx=-\frac {2 i}{e^{\left (-2 \, x\right )} - 1} - \log \left (e^{\left (-x\right )} + 1\right ) + \log \left (e^{\left (-x\right )} - 1\right ) \]

[In]

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

[Out]

-2*I/(e^(-2*x) - 1) - log(e^(-x) + 1) + 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. 24 vs. \(2 (10) = 20\).

Time = 0.26 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.00 \[ \int \frac {\coth ^2(x)}{i+\sinh (x)} \, dx=\frac {2 i}{e^{\left (2 \, x\right )} - 1} - \log \left (e^{x} + 1\right ) + \log \left ({\left | e^{x} - 1 \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 28, normalized size of antiderivative = 2.33 \[ \int \frac {\coth ^2(x)}{i+\sinh (x)} \, dx=\ln \left (2-2\,{\mathrm {e}}^x\right )-\ln \left (-2\,{\mathrm {e}}^x-2\right )+\frac {2{}\mathrm {i}}{{\mathrm {e}}^{2\,x}-1} \]

[In]

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

[Out]

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