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

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (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 = 14, antiderivative size = 25 \[ \int x \coth (a+b x) \text {csch}(a+b x) \, dx=-\frac {\text {arctanh}(\cosh (a+b x))}{b^2}-\frac {x \text {csch}(a+b x)}{b} \]

[Out]

-arctanh(cosh(b*x+a))/b^2-x*csch(b*x+a)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {5527, 3855} \[ \int x \coth (a+b x) \text {csch}(a+b x) \, dx=-\frac {\text {arctanh}(\cosh (a+b x))}{b^2}-\frac {x \text {csch}(a+b x)}{b} \]

[In]

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

[Out]

-(ArcTanh[Cosh[a + b*x]]/b^2) - (x*Csch[a + b*x])/b

Rule 3855

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

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}(a+b x)}{b}+\frac {\int \text {csch}(a+b x) \, dx}{b} \\ & = -\frac {\text {arctanh}(\cosh (a+b x))}{b^2}-\frac {x \text {csch}(a+b x)}{b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(114\) vs. \(2(25)=50\).

Time = 0.04 (sec) , antiderivative size = 114, normalized size of antiderivative = 4.56 \[ \int x \coth (a+b x) \text {csch}(a+b x) \, dx=-\frac {x \text {csch}(a)}{b}-\frac {\log \left (\cosh \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b^2}+\frac {\log \left (\sinh \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b^2}+\frac {x \text {csch}\left (\frac {a}{2}\right ) \text {csch}\left (\frac {a}{2}+\frac {b x}{2}\right ) \sinh \left (\frac {b x}{2}\right )}{2 b}+\frac {x \text {sech}\left (\frac {a}{2}\right ) \text {sech}\left (\frac {a}{2}+\frac {b x}{2}\right ) \sinh \left (\frac {b x}{2}\right )}{2 b} \]

[In]

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

[Out]

-((x*Csch[a])/b) - Log[Cosh[a/2 + (b*x)/2]]/b^2 + Log[Sinh[a/2 + (b*x)/2]]/b^2 + (x*Csch[a/2]*Csch[a/2 + (b*x)
/2]*Sinh[(b*x)/2])/(2*b) + (x*Sech[a/2]*Sech[a/2 + (b*x)/2]*Sinh[(b*x)/2])/(2*b)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(53\) vs. \(2(25)=50\).

Time = 0.37 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.16

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

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 169 vs. \(2 (25) = 50\).

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

[In]

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

[Out]

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

Sympy [F]

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 64 vs. \(2 (25) = 50\).

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (25) = 50\).

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.12 \[ \int x \coth (a+b x) \text {csch}(a+b x) \, dx=-\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{b\,x}\,{\mathrm {e}}^a\,\sqrt {-b^4}}{b^2}\right )}{\sqrt {-b^4}}-\frac {2\,x\,{\mathrm {e}}^{a+b\,x}}{b\,\left ({\mathrm {e}}^{2\,a+2\,b\,x}-1\right )} \]

[In]

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

[Out]

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