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

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

Optimal result

Integrand size = 11, antiderivative size = 25 \[ \int \frac {\coth (x)}{(i+\sinh (x))^2} \, dx=-\log (\sinh (x))+\log (i+\sinh (x))-\frac {i}{i+\sinh (x)} \]

[Out]

-ln(sinh(x))+ln(I+sinh(x))-I/(I+sinh(x))

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2786, 46} \[ \int \frac {\coth (x)}{(i+\sinh (x))^2} \, dx=-\frac {i}{\sinh (x)+i}-\log (\sinh (x))+\log (\sinh (x)+i) \]

[In]

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

[Out]

-Log[Sinh[x]] + Log[I + Sinh[x]] - I/(I + Sinh[x])

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2786

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {\coth (x)}{(i+\sinh (x))^2} \, dx=-\log (\sinh (x))+\log (i+\sinh (x))-\frac {i}{i+\sinh (x)} \]

[In]

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

[Out]

-Log[Sinh[x]] + Log[I + Sinh[x]] - I/(I + Sinh[x])

Maple [A] (verified)

Time = 8.64 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.24

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

[In]

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

[Out]

-2*I/(exp(x)+I)^2*exp(x)-ln(exp(2*x)-1)+2*ln(exp(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. 54 vs. \(2 (19) = 38\).

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

[In]

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

[Out]

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

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

[In]

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

[Out]

2*log(exp(x) + I) - log(exp(2*x) - 1) - 2*I*exp(x)/(exp(2*x) + 2*I*exp(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. 48 vs. \(2 (19) = 38\).

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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