\(\int x \coth (a+b x) \text {csch}^2(a+b x) \, dx\) [448]

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

Optimal result

Integrand size = 16, antiderivative size = 30 \[ \int x \coth (a+b x) \text {csch}^2(a+b x) \, dx=-\frac {\coth (a+b x)}{2 b^2}-\frac {x \text {csch}^2(a+b x)}{2 b} \]

[Out]

-1/2*coth(b*x+a)/b^2-1/2*x*csch(b*x+a)^2/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {5527, 3852, 8} \[ \int x \coth (a+b x) \text {csch}^2(a+b x) \, dx=-\frac {\coth (a+b x)}{2 b^2}-\frac {x \text {csch}^2(a+b x)}{2 b} \]

[In]

Int[x*Coth[a + b*x]*Csch[a + b*x]^2,x]

[Out]

-1/2*Coth[a + b*x]/b^2 - (x*Csch[a + b*x]^2)/(2*b)

Rule 8

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

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 5527

Int[Coth[(a_.) + (b_.)*(x_)^(n_.)]^(q_.)*Csch[(a_.) + (b_.)*(x_)^(n_.)]^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[(-
x^(m - n + 1))*(Csch[a + b*x^n]^p/(b*n*p)), x] + Dist[(m - n + 1)/(b*n*p), Int[x^(m - n)*Csch[a + b*x^n]^p, x]
, x] /; FreeQ[{a, b, p}, x] && RationalQ[m] && IntegerQ[n] && GeQ[m - n, 0] && EqQ[q, 1]

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

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00 \[ \int x \coth (a+b x) \text {csch}^2(a+b x) \, dx=-\frac {\coth (a+b x)}{2 b^2}-\frac {x \text {csch}^2(a+b x)}{2 b} \]

[In]

Integrate[x*Coth[a + b*x]*Csch[a + b*x]^2,x]

[Out]

-1/2*Coth[a + b*x]/b^2 - (x*Csch[a + b*x]^2)/(2*b)

Maple [A] (verified)

Time = 0.38 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.43

method result size
risch \(-\frac {2 \,{\mathrm e}^{2 b x +2 a} b x +{\mathrm e}^{2 b x +2 a}-1}{b^{2} \left ({\mathrm e}^{2 b x +2 a}-1\right )^{2}}\) \(43\)

[In]

int(x*cosh(b*x+a)*csch(b*x+a)^3,x,method=_RETURNVERBOSE)

[Out]

-(2*exp(2*b*x+2*a)*b*x+exp(2*b*x+2*a)-1)/b^2/(exp(2*b*x+2*a)-1)^2

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (26) = 52\).

Time = 0.25 (sec) , antiderivative size = 107, normalized size of antiderivative = 3.57 \[ \int x \coth (a+b x) \text {csch}^2(a+b x) \, dx=-\frac {2 \, {\left (b x \cosh \left (b x + a\right ) + {\left (b x + 1\right )} \sinh \left (b x + a\right )\right )}}{b^{2} \cosh \left (b x + a\right )^{3} + 3 \, b^{2} \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{2} + b^{2} \sinh \left (b x + a\right )^{3} - b^{2} \cosh \left (b x + a\right ) + 3 \, {\left (b^{2} \cosh \left (b x + a\right )^{2} - b^{2}\right )} \sinh \left (b x + a\right )} \]

[In]

integrate(x*cosh(b*x+a)*csch(b*x+a)^3,x, algorithm="fricas")

[Out]

-2*(b*x*cosh(b*x + a) + (b*x + 1)*sinh(b*x + a))/(b^2*cosh(b*x + a)^3 + 3*b^2*cosh(b*x + a)*sinh(b*x + a)^2 +
b^2*sinh(b*x + a)^3 - b^2*cosh(b*x + a) + 3*(b^2*cosh(b*x + a)^2 - b^2)*sinh(b*x + a))

Sympy [F]

\[ \int x \coth (a+b x) \text {csch}^2(a+b x) \, dx=\int x \cosh {\left (a + b x \right )} \operatorname {csch}^{3}{\left (a + b x \right )}\, dx \]

[In]

integrate(x*cosh(b*x+a)*csch(b*x+a)**3,x)

[Out]

Integral(x*cosh(a + b*x)*csch(a + b*x)**3, x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 130 vs. \(2 (26) = 52\).

Time = 0.21 (sec) , antiderivative size = 130, normalized size of antiderivative = 4.33 \[ \int x \coth (a+b x) \text {csch}^2(a+b x) \, dx=\frac {2 \, b x e^{\left (4 \, b x + 4 \, a\right )} - {\left (4 \, b x e^{\left (2 \, a\right )} + e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )} + 1}{2 \, {\left (b^{2} e^{\left (4 \, b x + 4 \, a\right )} - 2 \, b^{2} e^{\left (2 \, b x + 2 \, a\right )} + b^{2}\right )}} - \frac {2 \, b x e^{\left (4 \, b x + 4 \, a\right )} + e^{\left (2 \, b x + 2 \, a\right )} - 1}{2 \, {\left (b^{2} e^{\left (4 \, b x + 4 \, a\right )} - 2 \, b^{2} e^{\left (2 \, b x + 2 \, a\right )} + b^{2}\right )}} \]

[In]

integrate(x*cosh(b*x+a)*csch(b*x+a)^3,x, algorithm="maxima")

[Out]

1/2*(2*b*x*e^(4*b*x + 4*a) - (4*b*x*e^(2*a) + e^(2*a))*e^(2*b*x) + 1)/(b^2*e^(4*b*x + 4*a) - 2*b^2*e^(2*b*x +
2*a) + b^2) - 1/2*(2*b*x*e^(4*b*x + 4*a) + e^(2*b*x + 2*a) - 1)/(b^2*e^(4*b*x + 4*a) - 2*b^2*e^(2*b*x + 2*a) +
 b^2)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 184 vs. \(2 (26) = 52\).

Time = 0.27 (sec) , antiderivative size = 184, normalized size of antiderivative = 6.13 \[ \int x \coth (a+b x) \text {csch}^2(a+b x) \, dx=-\frac {4 \, b x e^{\left (2 \, b x + 2 \, a\right )} - e^{\left (4 \, b x + 4 \, a\right )} \log \left (e^{\left (2 \, b x + 2 \, a\right )} - 1\right ) + 2 \, e^{\left (2 \, b x + 2 \, a\right )} \log \left (e^{\left (2 \, b x + 2 \, a\right )} - 1\right ) + e^{\left (4 \, b x + 4 \, a\right )} \log \left (-e^{\left (2 \, b x + 2 \, a\right )} + 1\right ) - 2 \, e^{\left (2 \, b x + 2 \, a\right )} \log \left (-e^{\left (2 \, b x + 2 \, a\right )} + 1\right ) + 2 \, e^{\left (2 \, b x + 2 \, a\right )} - \log \left (e^{\left (2 \, b x + 2 \, a\right )} - 1\right ) + \log \left (-e^{\left (2 \, b x + 2 \, a\right )} + 1\right ) - 2}{2 \, {\left (b^{2} e^{\left (4 \, b x + 4 \, a\right )} - 2 \, b^{2} e^{\left (2 \, b x + 2 \, a\right )} + b^{2}\right )}} \]

[In]

integrate(x*cosh(b*x+a)*csch(b*x+a)^3,x, algorithm="giac")

[Out]

-1/2*(4*b*x*e^(2*b*x + 2*a) - e^(4*b*x + 4*a)*log(e^(2*b*x + 2*a) - 1) + 2*e^(2*b*x + 2*a)*log(e^(2*b*x + 2*a)
 - 1) + e^(4*b*x + 4*a)*log(-e^(2*b*x + 2*a) + 1) - 2*e^(2*b*x + 2*a)*log(-e^(2*b*x + 2*a) + 1) + 2*e^(2*b*x +
 2*a) - log(e^(2*b*x + 2*a) - 1) + log(-e^(2*b*x + 2*a) + 1) - 2)/(b^2*e^(4*b*x + 4*a) - 2*b^2*e^(2*b*x + 2*a)
 + b^2)

Mupad [B] (verification not implemented)

Time = 2.37 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.20 \[ \int x \coth (a+b x) \text {csch}^2(a+b x) \, dx=-\frac {{\mathrm {e}}^{2\,a+2\,b\,x}\,\left (2\,b\,x+1\right )-1}{b^2\,{\left ({\mathrm {e}}^{2\,a+2\,b\,x}-1\right )}^2} \]

[In]

int((x*cosh(a + b*x))/sinh(a + b*x)^3,x)

[Out]

-(exp(2*a + 2*b*x)*(2*b*x + 1) - 1)/(b^2*(exp(2*a + 2*b*x) - 1)^2)