### 3.434 $$\int x \coth ^2(a+b x) \, dx$$

Optimal. Leaf size=31 $\frac{\log (\sinh (a+b x))}{b^2}-\frac{x \coth (a+b x)}{b}+\frac{x^2}{2}$

[Out]

x^2/2 - (x*Coth[a + b*x])/b + Log[Sinh[a + b*x]]/b^2

________________________________________________________________________________________

Rubi [A]  time = 0.0281605, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.3, Rules used = {3720, 3475, 30} $\frac{\log (\sinh (a+b x))}{b^2}-\frac{x \coth (a+b x)}{b}+\frac{x^2}{2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

x^2/2 - (x*Coth[a + b*x])/b + Log[Sinh[a + b*x]]/b^2

Rule 3720

Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(c + d*x)^m*(b*Tan[e
+ f*x])^(n - 1))/(f*(n - 1)), x] + (-Dist[(b*d*m)/(f*(n - 1)), Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1)
, x], x] - Dist[b^2, Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n,
1] && GtQ[m, 0]

Rule 3475

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int x \coth ^2(a+b x) \, dx &=-\frac{x \coth (a+b x)}{b}+\frac{\int \coth (a+b x) \, dx}{b}+\int x \, dx\\ &=\frac{x^2}{2}-\frac{x \coth (a+b x)}{b}+\frac{\log (\sinh (a+b x))}{b^2}\\ \end{align*}

Mathematica [A]  time = 0.152163, size = 46, normalized size = 1.48 $\frac{-2 b x \coth (a)+2 \log (\sinh (a+b x))+2 b x \text{csch}(a) \sinh (b x) \text{csch}(a+b x)+b^2 x^2}{2 b^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.054, size = 54, normalized size = 1.7 \begin{align*}{\frac{{x}^{2}}{2}}-2\,{\frac{x}{b}}-2\,{\frac{a}{{b}^{2}}}-2\,{\frac{x}{b \left ({{\rm e}^{2\,bx+2\,a}}-1 \right ) }}+{\frac{\ln \left ({{\rm e}^{2\,bx+2\,a}}-1 \right ) }{{b}^{2}}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.19411, size = 155, normalized size = 5. \begin{align*} -\frac{x e^{\left (2 \, b x + 2 \, a\right )}}{b e^{\left (2 \, b x + 2 \, a\right )} - b} - \frac{b x^{2} -{\left (b x^{2} e^{\left (2 \, a\right )} - 2 \, x e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )}}{2 \,{\left (b e^{\left (2 \, b x + 2 \, a\right )} - b\right )}} + \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}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*e^(2*b*x + 2*a)/(b*e^(2*b*x + 2*a) - b) - 1/2*(b*x^2 - (b*x^2*e^(2*a) - 2*x*e^(2*a))*e^(2*b*x))/(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

________________________________________________________________________________________

Fricas [B]  time = 2.1674, size = 477, normalized size = 15.39 \begin{align*} -\frac{b^{2} x^{2} -{\left (b^{2} x^{2} - 4 \, b x\right )} \cosh \left (b x + a\right )^{2} - 2 \,{\left (b^{2} x^{2} - 4 \, b x\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) -{\left (b^{2} x^{2} - 4 \, b x\right )} \sinh \left (b x + a\right )^{2} - 2 \,{\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 (\frac{2 \, \sinh \left (b x + a\right )}{\cosh \left (b x + a\right ) - \sinh \left (b x + a\right )}\right )}{2 \,{\left (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}\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(b^2*x^2 - (b^2*x^2 - 4*b*x)*cosh(b*x + a)^2 - 2*(b^2*x^2 - 4*b*x)*cosh(b*x + a)*sinh(b*x + a) - (b^2*x^2
- 4*b*x)*sinh(b*x + a)^2 - 2*(cosh(b*x + a)^2 + 2*cosh(b*x + a)*sinh(b*x + a) + sinh(b*x + a)^2 - 1)*log(2*si
nh(b*x + a)/(cosh(b*x + a) - sinh(b*x + a))))/(b^2*cosh(b*x + a)^2 + 2*b^2*cosh(b*x + a)*sinh(b*x + a) + b^2*s
inh(b*x + a)^2 - b^2)

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.15281, size = 132, normalized size = 4.26 \begin{align*} \frac{b^{2} x^{2} e^{\left (2 \, b x + 2 \, a\right )} - b^{2} x^{2} - 4 \, b x e^{\left (2 \, b x + 2 \, a\right )} + 2 \, e^{\left (2 \, b x + 2 \, a\right )} \log \left (e^{\left (2 \, b x + 2 \, a\right )} - 1\right ) - 2 \, \log \left (e^{\left (2 \, b x + 2 \, a\right )} - 1\right )}{2 \,{\left (b^{2} e^{\left (2 \, b x + 2 \, a\right )} - b^{2}\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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