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*ln(a+b*coth(x))/b^2/(a^2-b^2)+a*ln(sinh(x))/(a^2-b^2)

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 64, normalized size of antiderivative = 1.00, 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 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]

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 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 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]

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.14, size = 64, normalized size = 1.00 \[ \frac {a^3 (-\log (a \sinh (x)+b \cosh (x)))+b \left (a^2-b^2\right ) \coth (x)+a \left (a^2-b^2\right ) \log (\sinh (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))

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 271, normalized size = 4.23 \[ \frac {{\left (a b^{2} + b^{3}\right )} x \cosh \relax (x)^{2} + 2 \, {\left (a b^{2} + b^{3}\right )} x \cosh \relax (x) \sinh \relax (x) + {\left (a b^{2} + b^{3}\right )} x \sinh \relax (x)^{2} + 2 \, a^{2} b - 2 \, b^{3} - {\left (a b^{2} + b^{3}\right )} x - {\left (a^{3} \cosh \relax (x)^{2} + 2 \, a^{3} \cosh \relax (x) \sinh \relax (x) + a^{3} \sinh \relax (x)^{2} - a^{3}\right )} \log \left (\frac {2 \, {\left (b \cosh \relax (x) + a \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - {\left (a^{3} - a b^{2} - {\left (a^{3} - a b^{2}\right )} \cosh \relax (x)^{2} - 2 \, {\left (a^{3} - a b^{2}\right )} \cosh \relax (x) \sinh \relax (x) - {\left (a^{3} - a b^{2}\right )} \sinh \relax (x)^{2}\right )} \log \left (\frac {2 \, \sinh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} b^{2} - b^{4} - {\left (a^{2} b^{2} - b^{4}\right )} \cosh \relax (x)^{2} - 2 \, {\left (a^{2} b^{2} - b^{4}\right )} \cosh \relax (x) \sinh \relax (x) - {\left (a^{2} b^{2} - b^{4}\right )} \sinh \relax (x)^{2}} \]

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)

________________________________________________________________________________________

giac [A]  time = 0.12, size = 76, normalized size = 1.19 \[ \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 )}} \]

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))

________________________________________________________________________________________

maple [A]  time = 0.07, size = 67, normalized size = 1.05 \[ -\frac {\coth \relax (x )}{b}-\frac {\ln \left (\coth \relax (x )-1\right )}{2 b +2 a}-\frac {\ln \left (1+\coth \relax (x )\right )}{2 a -2 b}+\frac {a^{3} \ln \left (a +b \coth \relax (x )\right )}{b^{2} \left (a +b \right ) \left (a -b \right )} \]

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

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 82, normalized size = 1.28 \[ \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} \]

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)

________________________________________________________________________________________

mupad [B]  time = 1.51, size = 74, normalized size = 1.16 \[ -\frac {2}{b\,\left ({\mathrm {e}}^{2\,x}-1\right )}-\frac {x}{a-b}-\frac {a^3\,\ln \left (b-a+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{b^4-a^2\,b^2}-\frac {a\,\ln \left ({\mathrm {e}}^{2\,x}-1\right )}{b^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 2.40, size = 636, normalized size = 9.94 \[ \text {result too large to display} \]

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)), ((x - 1/tanh(x))/b, Eq(a, 0)), (5*x*tanh(x)**2/(2*b*tanh
(x)**2 - 2*b*tanh(x)) - 5*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*b*tanh(x)*
*2 - 2*b*tanh(x)) + 2/(2*b*tanh(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*tan
h(x)) - 2*log(tanh(x))*tanh(x)/(2*b*tanh(x)**2 + 2*b*tanh(x)) - 3*tanh(x)/(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
)), (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*tan
h(x) - b**4*tanh(x)), True))

________________________________________________________________________________________