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

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

Optimal result

Integrand size = 11, antiderivative size = 38 \[ \int \frac {\sinh ^2(x)}{1+\coth (x)} \, dx=-\frac {3 x}{8}-\frac {1}{8 (1-\coth (x))}+\frac {1}{8 (1+\coth (x))^2}+\frac {1}{4 (1+\coth (x))} \]

[Out]

-3/8*x-1/8/(1-coth(x))+1/8/(1+coth(x))^2+1/4/(1+coth(x))

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 38, 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.273, Rules used = {3568, 46, 213} \[ \int \frac {\sinh ^2(x)}{1+\coth (x)} \, dx=-\frac {3 x}{8}-\frac {1}{8 (1-\coth (x))}+\frac {1}{4 (\coth (x)+1)}+\frac {1}{8 (\coth (x)+1)^2} \]

[In]

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

[Out]

(-3*x)/8 - 1/(8*(1 - Coth[x])) + 1/(8*(1 + Coth[x])^2) + 1/(4*(1 + Coth[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 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 3568

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

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

Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.79 \[ \int \frac {\sinh ^2(x)}{1+\coth (x)} \, dx=\frac {1}{32} (-12 x-4 \cosh (2 x)+\cosh (4 x)+8 \sinh (2 x)-\sinh (4 x)) \]

[In]

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

[Out]

(-12*x - 4*Cosh[2*x] + Cosh[4*x] + 8*Sinh[2*x] - Sinh[4*x])/32

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.61

method result size
risch \(-\frac {3 x}{8}+\frac {{\mathrm e}^{2 x}}{16}-\frac {3 \,{\mathrm e}^{-2 x}}{16}+\frac {{\mathrm e}^{-4 x}}{32}\) \(23\)
parallelrisch \(-\frac {3 x}{8}+\frac {3}{32}-\frac {\cosh \left (2 x \right )}{8}+\frac {\sinh \left (2 x \right )}{4}-\frac {\sinh \left (4 x \right )}{32}+\frac {\cosh \left (4 x \right )}{32}\) \(30\)
default \(\frac {1}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{4}}-\frac {1}{\left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {1}{2 \tanh \left (\frac {x}{2}\right )+2}-\frac {3 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{8}+\frac {1}{4 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {1}{4 \tanh \left (\frac {x}{2}\right )-4}+\frac {3 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{8}\) \(70\)

[In]

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

[Out]

-3/8*x+1/16*exp(2*x)-3/16*exp(-2*x)+1/32*exp(-4*x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.32 \[ \int \frac {\sinh ^2(x)}{1+\coth (x)} \, dx=\frac {3 \, \cosh \left (x\right )^{3} + 9 \, \cosh \left (x\right ) \sinh \left (x\right )^{2} + \sinh \left (x\right )^{3} - 6 \, {\left (2 \, x + 1\right )} \cosh \left (x\right ) + 3 \, {\left (\cosh \left (x\right )^{2} - 4 \, x + 2\right )} \sinh \left (x\right )}{32 \, {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}} \]

[In]

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

[Out]

1/32*(3*cosh(x)^3 + 9*cosh(x)*sinh(x)^2 + sinh(x)^3 - 6*(2*x + 1)*cosh(x) + 3*(cosh(x)^2 - 4*x + 2)*sinh(x))/(
cosh(x) + sinh(x))

Sympy [F]

\[ \int \frac {\sinh ^2(x)}{1+\coth (x)} \, dx=\int \frac {\sinh ^{2}{\left (x \right )}}{\coth {\left (x \right )} + 1}\, dx \]

[In]

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

[Out]

Integral(sinh(x)**2/(coth(x) + 1), x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.58 \[ \int \frac {\sinh ^2(x)}{1+\coth (x)} \, dx=-\frac {3}{8} \, x + \frac {1}{16} \, e^{\left (2 \, x\right )} - \frac {3}{16} \, e^{\left (-2 \, x\right )} + \frac {1}{32} \, e^{\left (-4 \, x\right )} \]

[In]

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

[Out]

-3/8*x + 1/16*e^(2*x) - 3/16*e^(-2*x) + 1/32*e^(-4*x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.79 \[ \int \frac {\sinh ^2(x)}{1+\coth (x)} \, dx=\frac {1}{32} \, {\left (9 \, e^{\left (4 \, x\right )} - 6 \, e^{\left (2 \, x\right )} + 1\right )} e^{\left (-4 \, x\right )} - \frac {3}{8} \, x + \frac {1}{16} \, e^{\left (2 \, x\right )} \]

[In]

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

[Out]

1/32*(9*e^(4*x) - 6*e^(2*x) + 1)*e^(-4*x) - 3/8*x + 1/16*e^(2*x)

Mupad [B] (verification not implemented)

Time = 1.91 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.58 \[ \int \frac {\sinh ^2(x)}{1+\coth (x)} \, dx=\frac {{\mathrm {e}}^{2\,x}}{16}-\frac {3\,{\mathrm {e}}^{-2\,x}}{16}-\frac {3\,x}{8}+\frac {{\mathrm {e}}^{-4\,x}}{32} \]

[In]

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

[Out]

exp(2*x)/16 - (3*exp(-2*x))/16 - (3*x)/8 + exp(-4*x)/32