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

Optimal. Leaf size=26 \[ \coth (x)+2 i \tanh ^{-1}(\cosh (x))+\frac{2 i \coth (x)}{-\text{csch}(x)+i} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0677855, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {2709, 3770, 3767, 8, 3777} \[ \coth (x)+2 i \tanh ^{-1}(\cosh (x))+\frac{2 i \coth (x)}{-\text{csch}(x)+i} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2709

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^(p_), x_Symbol] :> Dist[a^p, Int[Expan
dIntegrand[(Sin[e + f*x]^p*(a + b*Sin[e + f*x])^(m - p/2))/(a - b*Sin[e + f*x])^(p/2), x], x], x] /; FreeQ[{a,
 b, e, f}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p/2] && (LtQ[p, 0] || GtQ[m - p/2, 0])

Rule 3770

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

Rule 3767

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 8

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

Rule 3777

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

Rubi steps

\begin{align*} \int \frac{\coth ^2(x)}{(i+\sinh (x))^2} \, dx &=\int \left (2-2 i \text{csch}(x)-\text{csch}^2(x)+\frac{2 i}{-i+\text{csch}(x)}\right ) \, dx\\ &=2 x-2 i \int \text{csch}(x) \, dx+2 i \int \frac{1}{-i+\text{csch}(x)} \, dx-\int \text{csch}^2(x) \, dx\\ &=2 x+2 i \tanh ^{-1}(\cosh (x))+\frac{2 i \coth (x)}{i-\text{csch}(x)}+i \operatorname{Subst}(\int 1 \, dx,x,-i \coth (x))+2 i \int i \, dx\\ &=2 i \tanh ^{-1}(\cosh (x))+\coth (x)+\frac{2 i \coth (x)}{i-\text{csch}(x)}\\ \end{align*}

Mathematica [B]  time = 0.138201, size = 66, normalized size = 2.54 \[ \frac{1}{2} \left (\tanh \left (\frac{x}{2}\right )+\coth \left (\frac{x}{2}\right )-4 i \log \left (\sinh \left (\frac{x}{2}\right )\right )+4 i \log \left (\cosh \left (\frac{x}{2}\right )\right )+\frac{8 \sinh \left (\frac{x}{2}\right )}{\cosh \left (\frac{x}{2}\right )-i \sinh \left (\frac{x}{2}\right )}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.045, size = 35, normalized size = 1.4 \begin{align*}{\frac{1}{2}\tanh \left ({\frac{x}{2}} \right ) }-2\,i\ln \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) +{\frac{1}{2} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}+4\, \left ( \tanh \left ( x/2 \right ) +i \right ) ^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.13042, size = 73, normalized size = 2.81 \begin{align*} \frac{2 \, e^{\left (-x\right )} + 4 i \, e^{\left (-2 \, x\right )} - 6 i}{e^{\left (-x\right )} + i \, e^{\left (-2 \, x\right )} - e^{\left (-3 \, x\right )} - i} + 2 i \, \log \left (e^{\left (-x\right )} + 1\right ) - 2 i \, \log \left (e^{\left (-x\right )} - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.08805, size = 232, normalized size = 8.92 \begin{align*} \frac{{\left (2 i \, e^{\left (3 \, x\right )} - 2 \, e^{\left (2 \, x\right )} - 2 i \, e^{x} + 2\right )} \log \left (e^{x} + 1\right ) +{\left (-2 i \, e^{\left (3 \, x\right )} + 2 \, e^{\left (2 \, x\right )} + 2 i \, e^{x} - 2\right )} \log \left (e^{x} - 1\right ) - 4 i \, e^{\left (2 \, x\right )} + 2 \, e^{x} + 6 i}{e^{\left (3 \, x\right )} + i \, e^{\left (2 \, x\right )} - e^{x} - i} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 0.47057, size = 49, normalized size = 1.88 \begin{align*} \frac{- 4 i e^{2 x} + 2 e^{x} + 6 i}{e^{3 x} + i e^{2 x} - e^{x} - i} + 2 \operatorname{RootSum}{\left (z^{2} + 1, \left ( i \mapsto i \log{\left (- i i + e^{x} \right )} \right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-4*I*exp(2*x) + 2*exp(x) + 6*I)/(exp(3*x) + I*exp(2*x) - exp(x) - I) + 2*RootSum(_z**2 + 1, Lambda(_i, _i*log
(-_i*I + exp(x))))

________________________________________________________________________________________

Giac [B]  time = 1.15333, size = 63, normalized size = 2.42 \begin{align*} \frac{-4 i \, e^{\left (2 \, x\right )} + 2 \, e^{x} + 6 i}{e^{\left (3 \, x\right )} + i \, e^{\left (2 \, x\right )} - e^{x} - i} + 2 i \, \log \left (e^{x} + 1\right ) - 2 i \, \log \left ({\left | e^{x} - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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