3.53 \(\int \frac{\text{csch}^2(x)}{(i+\sinh (x))^2} \, dx\)

Optimal. Leaf size=42 \[ \frac{10 \coth (x)}{3}+2 i \tanh ^{-1}(\cosh (x))-\frac{2 i \coth (x)}{\sinh (x)+i}+\frac{\coth (x)}{3 (\sinh (x)+i)^2} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.117322, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {2766, 2978, 2748, 3767, 8, 3770} \[ \frac{10 \coth (x)}{3}+2 i \tanh ^{-1}(\cosh (x))-\frac{2 i \coth (x)}{\sinh (x)+i}+\frac{\coth (x)}{3 (\sinh (x)+i)^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2766

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(b^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*x])^(n + 1))/(a*f*(2*m + 1)*(b*c - a*d)), x] + Dis
t[1/(a*(2*m + 1)*(b*c - a*d)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[b*c*(m + 1) - a*d*
(2*m + n + 2) + b*d*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d,
0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] &&  !GtQ[n, 0] && (IntegersQ[2*m, 2*n] || (IntegerQ
[m] && EqQ[c, 0]))

Rule 2978

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*
x])^(n + 1))/(a*f*(2*m + 1)*(b*c - a*d)), x] + Dist[1/(a*(2*m + 1)*(b*c - a*d)), Int[(a + b*Sin[e + f*x])^(m +
 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b*d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*
(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2
- b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] &&  !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c,
0])

Rule 2748

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, 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 3770

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

Rubi steps

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

Mathematica [B]  time = 0.35467, size = 88, normalized size = 2.1 \[ \frac{1}{6} \left (\frac{2}{\sinh (x)+i}+3 \tanh \left (\frac{x}{2}\right )+3 \coth \left (\frac{x}{2}\right )-12 i \log \left (\sinh \left (\frac{x}{2}\right )\right )+12 i \log \left (\cosh \left (\frac{x}{2}\right )\right )-\frac{4 \sinh \left (\frac{x}{2}\right ) (7 \sinh (x)+8 i)}{\left (\sinh \left (\frac{x}{2}\right )+i \cosh \left (\frac{x}{2}\right )\right )^3}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(3*Coth[x/2] + (12*I)*Log[Cosh[x/2]] - (12*I)*Log[Sinh[x/2]] + 2/(I + Sinh[x]) - (4*Sinh[x/2]*(8*I + 7*Sinh[x]
))/(I*Cosh[x/2] + Sinh[x/2])^3 + 3*Tanh[x/2])/6

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 58, 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}}-{2\,i \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-2}}-{\frac{4}{3} \left ( \tanh \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}}+6\, \left ( \tanh \left ( x/2 \right ) +i \right ) ^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csch(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)-2*I/(tanh(1/2*x)+I)^2-4/3/(tanh(1/2*x)+I)^3+6/(tanh(1/2*x)
+I)

________________________________________________________________________________________

Maxima [B]  time = 1.23921, size = 109, normalized size = 2.6 \begin{align*} \frac{4 \,{\left (12 \, e^{\left (-x\right )} + 11 i \, e^{\left (-2 \, x\right )} - 9 \, e^{\left (-3 \, x\right )} - 3 i \, e^{\left (-4 \, x\right )} - 5 i\right )}}{9 \, e^{\left (-x\right )} + 12 i \, e^{\left (-2 \, x\right )} - 12 \, e^{\left (-3 \, x\right )} - 9 i \, e^{\left (-4 \, x\right )} + 3 \, e^{\left (-5 \, x\right )} - 3 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(csch(x)^2/(I+sinh(x))^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.04185, size = 404, normalized size = 9.62 \begin{align*} \frac{{\left (6 i \, e^{\left (5 \, x\right )} - 18 \, e^{\left (4 \, x\right )} - 24 i \, e^{\left (3 \, x\right )} + 24 \, e^{\left (2 \, x\right )} + 18 i \, e^{x} - 6\right )} \log \left (e^{x} + 1\right ) +{\left (-6 i \, e^{\left (5 \, x\right )} + 18 \, e^{\left (4 \, x\right )} + 24 i \, e^{\left (3 \, x\right )} - 24 \, e^{\left (2 \, x\right )} - 18 i \, e^{x} + 6\right )} \log \left (e^{x} - 1\right ) - 12 i \, e^{\left (4 \, x\right )} + 36 \, e^{\left (3 \, x\right )} + 44 i \, e^{\left (2 \, x\right )} - 48 \, e^{x} - 20 i}{3 \, e^{\left (5 \, x\right )} + 9 i \, e^{\left (4 \, x\right )} - 12 \, e^{\left (3 \, x\right )} - 12 i \, e^{\left (2 \, x\right )} + 9 \, e^{x} + 3 i} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((6*I*e^(5*x) - 18*e^(4*x) - 24*I*e^(3*x) + 24*e^(2*x) + 18*I*e^x - 6)*log(e^x + 1) + (-6*I*e^(5*x) + 18*e^(4*
x) + 24*I*e^(3*x) - 24*e^(2*x) - 18*I*e^x + 6)*log(e^x - 1) - 12*I*e^(4*x) + 36*e^(3*x) + 44*I*e^(2*x) - 48*e^
x - 20*I)/(3*e^(5*x) + 9*I*e^(4*x) - 12*e^(3*x) - 12*I*e^(2*x) + 9*e^x + 3*I)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.32053, size = 62, normalized size = 1.48 \begin{align*} \frac{2}{e^{\left (2 \, x\right )} - 1} - \frac{2 \,{\left (6 i \, e^{\left (2 \, x\right )} - 15 \, e^{x} - 7 i\right )}}{3 \,{\left (e^{x} + i\right )}^{3}} + 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(csch(x)^2/(I+sinh(x))^2,x, algorithm="giac")

[Out]

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