3.147 \(\int \frac{\coth ^3(x)}{a+b \coth (x)} \, dx\)

Optimal. Leaf size=64 \[ -\frac{b x}{a^2-b^2}+\frac{a \log (\sinh (x))}{a^2-b^2}+\frac{a^3 \log (a+b \coth (x))}{b^2 \left (a^2-b^2\right )}-\frac{\coth (x)}{b} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.129963, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {3566, 3626, 3617, 31, 3475} \[ -\frac{b x}{a^2-b^2}+\frac{a \log (\sinh (x))}{a^2-b^2}+\frac{a^3 \log (a+b \coth (x))}{b^2 \left (a^2-b^2\right )}-\frac{\coth (x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[Coth[x]^3/(a + b*Coth[x]),x]

[Out]

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

Rule 3566

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si
mp[(b^2*(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^(n + 1))/(d*f*(m + n - 1)), x] + Dist[1/(d*(m + n -
1)), Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n - 1) - b^2*(b*c*(m - 2) + a*d*(
1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2,
 x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
&& IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || IntegerQ[m]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0]
&& NeQ[a, 0])))

Rule 3626

Int[((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/((a_.) + (b_.)*tan[(e_.) + (f_.)*
(x_)]), x_Symbol] :> Simp[((a*A + b*B - a*C)*x)/(a^2 + b^2), x] + (Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2), I
nt[(1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Dist[(A*b - a*B - b*C)/(a^2 + b^2), Int[Tan[e + f*x], x
], x]) /; FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && NeQ[a^2 + b^2, 0] && NeQ[A*b - a
*B - b*C, 0]

Rule 3617

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[
A/(b*f), Subst[Int[(a + x)^m, x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3475

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

Rubi steps

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

Mathematica [A]  time = 0.119717, size = 64, normalized size = 1. \[ \frac{b \left (a^2-b^2\right ) \coth (x)+a \left (a^2-b^2\right ) \log (\sinh (x))+a^3 (-\log (a \sinh (x)+b \cosh (x)))+b^3 x}{b^2 (b-a) (a+b)} \]

Antiderivative was successfully verified.

[In]

Integrate[Coth[x]^3/(a + b*Coth[x]),x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.022, size = 67, normalized size = 1.1 \begin{align*} -{\frac{{\rm coth} \left (x\right )}{b}}-{\frac{\ln \left ( 1+{\rm coth} \left (x\right ) \right ) }{2\,a-2\,b}}-{\frac{\ln \left ({\rm coth} \left (x\right )-1 \right ) }{2\,b+2\,a}}+{\frac{{a}^{3}\ln \left ( a+b{\rm coth} \left (x\right ) \right ) }{{b}^{2} \left ( a+b \right ) \left ( a-b \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.17138, size = 111, normalized size = 1.73 \begin{align*} \frac{a^{3} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} + a + b\right )}{a^{2} b^{2} - b^{4}} + \frac{x}{a + b} - \frac{a \log \left (e^{\left (-x\right )} + 1\right )}{b^{2}} - \frac{a \log \left (e^{\left (-x\right )} - 1\right )}{b^{2}} + \frac{2}{b e^{\left (-2 \, x\right )} - b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)^3/(a+b*coth(x)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.83034, size = 660, normalized size = 10.31 \begin{align*} \frac{{\left (a b^{2} + b^{3}\right )} x \cosh \left (x\right )^{2} + 2 \,{\left (a b^{2} + b^{3}\right )} x \cosh \left (x\right ) \sinh \left (x\right ) +{\left (a b^{2} + b^{3}\right )} x \sinh \left (x\right )^{2} + 2 \, a^{2} b - 2 \, b^{3} -{\left (a b^{2} + b^{3}\right )} x -{\left (a^{3} \cosh \left (x\right )^{2} + 2 \, a^{3} \cosh \left (x\right ) \sinh \left (x\right ) + a^{3} \sinh \left (x\right )^{2} - a^{3}\right )} \log \left (\frac{2 \,{\left (b \cosh \left (x\right ) + a \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) -{\left (a^{3} - a b^{2} -{\left (a^{3} - a b^{2}\right )} \cosh \left (x\right )^{2} - 2 \,{\left (a^{3} - a b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) -{\left (a^{3} - a b^{2}\right )} \sinh \left (x\right )^{2}\right )} \log \left (\frac{2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} b^{2} - b^{4} -{\left (a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )^{2} - 2 \,{\left (a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) -{\left (a^{2} b^{2} - b^{4}\right )} \sinh \left (x\right )^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)^3/(a+b*coth(x)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 5.44979, size = 639, normalized size = 9.98 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)**3/(a+b*coth(x)),x)

[Out]

Piecewise((zoo*(x - 1/tanh(x)), Eq(a, 0) & Eq(b, 0)), (5*x*tanh(x)**2/(2*b*tanh(x)**2 - 2*b*tanh(x)) - 5*x*tan
h(x)/(2*b*tanh(x)**2 - 2*b*tanh(x)) - 2*log(tanh(x) + 1)*tanh(x)**2/(2*b*tanh(x)**2 - 2*b*tanh(x)) + 2*log(tan
h(x) + 1)*tanh(x)/(2*b*tanh(x)**2 - 2*b*tanh(x)) + 2*log(tanh(x))*tanh(x)**2/(2*b*tanh(x)**2 - 2*b*tanh(x)) -
2*log(tanh(x))*tanh(x)/(2*b*tanh(x)**2 - 2*b*tanh(x)) - 3*tanh(x)**2/(2*b*tanh(x)**2 - 2*b*tanh(x)) + 2/(2*b*t
anh(x)**2 - 2*b*tanh(x)), Eq(a, -b)), (x*tanh(x)**2/(2*b*tanh(x)**2 + 2*b*tanh(x)) + x*tanh(x)/(2*b*tanh(x)**2
 + 2*b*tanh(x)) + 2*log(tanh(x) + 1)*tanh(x)**2/(2*b*tanh(x)**2 + 2*b*tanh(x)) + 2*log(tanh(x) + 1)*tanh(x)/(2
*b*tanh(x)**2 + 2*b*tanh(x)) - 2*log(tanh(x))*tanh(x)**2/(2*b*tanh(x)**2 + 2*b*tanh(x)) - 2*log(tanh(x))*tanh(
x)/(2*b*tanh(x)**2 + 2*b*tanh(x)) + 3*tanh(x)**2/(2*b*tanh(x)**2 + 2*b*tanh(x)) - 2/(2*b*tanh(x)**2 + 2*b*tanh
(x)), Eq(a, b)), ((x - log(tanh(x) + 1) + log(tanh(x)) - 1/(2*tanh(x)**2))/a, Eq(b, 0)), ((x - 1/tanh(x))/b, E
q(a, 0)), (a**3*log(tanh(x) + b/a)*tanh(x)/(a**2*b**2*tanh(x) - b**4*tanh(x)) - a**3*log(tanh(x))*tanh(x)/(a**
2*b**2*tanh(x) - b**4*tanh(x)) - a**2*b/(a**2*b**2*tanh(x) - b**4*tanh(x)) + a*b**2*x*tanh(x)/(a**2*b**2*tanh(
x) - b**4*tanh(x)) - a*b**2*log(tanh(x) + 1)*tanh(x)/(a**2*b**2*tanh(x) - b**4*tanh(x)) + a*b**2*log(tanh(x))*
tanh(x)/(a**2*b**2*tanh(x) - b**4*tanh(x)) - b**3*x*tanh(x)/(a**2*b**2*tanh(x) - b**4*tanh(x)) + b**3/(a**2*b*
*2*tanh(x) - b**4*tanh(x)), True))

________________________________________________________________________________________

Giac [A]  time = 1.11489, size = 103, normalized size = 1.61 \begin{align*} \frac{a^{3} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} - a + b \right |}\right )}{a^{2} b^{2} - b^{4}} - \frac{x}{a - b} - \frac{a \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right )}{b^{2}} - \frac{2}{b{\left (e^{\left (2 \, x\right )} - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(x)^3/(a+b*coth(x)),x, algorithm="giac")

[Out]

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