### 3.143 $$\int \coth ^5(c+d x) (a+b \tanh ^2(c+d x)) \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0618572, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.19, Rules used = {3629, 12, 3473, 3475} $-\frac{(a+b) \coth ^2(c+d x)}{2 d}+\frac{(a+b) \log (\sinh (c+d x))}{d}-\frac{a \coth ^4(c+d x)}{4 d}$

Antiderivative was successfully veriﬁed.

[In]

Int[Coth[c + d*x]^5*(a + b*Tanh[c + d*x]^2),x]

[Out]

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

Rule 3629

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

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 \coth ^5(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx &=-\frac{a \coth ^4(c+d x)}{4 d}+\int (a+b) \coth ^3(c+d x) \, dx\\ &=-\frac{a \coth ^4(c+d x)}{4 d}+(a+b) \int \coth ^3(c+d x) \, dx\\ &=-\frac{(a+b) \coth ^2(c+d x)}{2 d}-\frac{a \coth ^4(c+d x)}{4 d}+(a+b) \int \coth (c+d x) \, dx\\ &=-\frac{(a+b) \coth ^2(c+d x)}{2 d}-\frac{a \coth ^4(c+d x)}{4 d}+\frac{(a+b) \log (\sinh (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.312658, size = 51, normalized size = 1.04 $-\frac{2 (a+b) \coth ^2(c+d x)-4 (a+b) (\log (\tanh (c+d x))+\log (\cosh (c+d x)))+a \coth ^4(c+d x)}{4 d}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Coth[c + d*x]^5*(a + b*Tanh[c + d*x]^2),x]

[Out]

-(2*(a + b)*Coth[c + d*x]^2 + a*Coth[c + d*x]^4 - 4*(a + b)*(Log[Cosh[c + d*x]] + Log[Tanh[c + d*x]]))/(4*d)

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 68, normalized size = 1.4 \begin{align*}{\frac{a\ln \left ( \sinh \left ( dx+c \right ) \right ) }{d}}-{\frac{ \left ({\rm coth} \left (dx+c\right ) \right ) ^{2}a}{2\,d}}-{\frac{a \left ({\rm coth} \left (dx+c\right ) \right ) ^{4}}{4\,d}}+{\frac{b\ln \left ( \sinh \left ( dx+c \right ) \right ) }{d}}-{\frac{b \left ({\rm coth} \left (dx+c\right ) \right ) ^{2}}{2\,d}} \end{align*}

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

[In]

int(coth(d*x+c)^5*(a+b*tanh(d*x+c)^2),x)

[Out]

a*ln(sinh(d*x+c))/d-1/2*a*coth(d*x+c)^2/d-1/4*a*coth(d*x+c)^4/d+1/d*b*ln(sinh(d*x+c))-1/2/d*b*coth(d*x+c)^2

________________________________________________________________________________________

Maxima [B]  time = 1.16511, size = 278, normalized size = 5.67 \begin{align*} a{\left (x + \frac{c}{d} + \frac{\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} + \frac{\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac{4 \,{\left (e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}{d{\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} - 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} - e^{\left (-8 \, d x - 8 \, c\right )} - 1\right )}}\right )} + b{\left (x + \frac{c}{d} + \frac{\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} + \frac{\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac{2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d{\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} - 1\right )}}\right )} \end{align*}

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

[In]

integrate(coth(d*x+c)^5*(a+b*tanh(d*x+c)^2),x, algorithm="maxima")

[Out]

a*(x + c/d + log(e^(-d*x - c) + 1)/d + log(e^(-d*x - c) - 1)/d + 4*(e^(-2*d*x - 2*c) - e^(-4*d*x - 4*c) + e^(-
6*d*x - 6*c))/(d*(4*e^(-2*d*x - 2*c) - 6*e^(-4*d*x - 4*c) + 4*e^(-6*d*x - 6*c) - e^(-8*d*x - 8*c) - 1))) + b*(
x + c/d + log(e^(-d*x - c) + 1)/d + log(e^(-d*x - c) - 1)/d + 2*e^(-2*d*x - 2*c)/(d*(2*e^(-2*d*x - 2*c) - e^(-
4*d*x - 4*c) - 1)))

________________________________________________________________________________________

Fricas [B]  time = 2.17152, size = 3336, normalized size = 68.08 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

integrate(coth(d*x+c)^5*(a+b*tanh(d*x+c)^2),x, algorithm="fricas")

[Out]

-((a + b)*d*x*cosh(d*x + c)^8 + 8*(a + b)*d*x*cosh(d*x + c)*sinh(d*x + c)^7 + (a + b)*d*x*sinh(d*x + c)^8 - 2*
(2*(a + b)*d*x - 2*a - b)*cosh(d*x + c)^6 + 2*(14*(a + b)*d*x*cosh(d*x + c)^2 - 2*(a + b)*d*x + 2*a + b)*sinh(
d*x + c)^6 + 4*(14*(a + b)*d*x*cosh(d*x + c)^3 - 3*(2*(a + b)*d*x - 2*a - b)*cosh(d*x + c))*sinh(d*x + c)^5 +
2*(3*(a + b)*d*x - 2*a - 2*b)*cosh(d*x + c)^4 + 2*(35*(a + b)*d*x*cosh(d*x + c)^4 + 3*(a + b)*d*x - 15*(2*(a +
b)*d*x - 2*a - b)*cosh(d*x + c)^2 - 2*a - 2*b)*sinh(d*x + c)^4 + 8*(7*(a + b)*d*x*cosh(d*x + c)^5 - 5*(2*(a +
b)*d*x - 2*a - b)*cosh(d*x + c)^3 + (3*(a + b)*d*x - 2*a - 2*b)*cosh(d*x + c))*sinh(d*x + c)^3 + (a + b)*d*x
- 2*(2*(a + b)*d*x - 2*a - b)*cosh(d*x + c)^2 + 2*(14*(a + b)*d*x*cosh(d*x + c)^6 - 15*(2*(a + b)*d*x - 2*a -
b)*cosh(d*x + c)^4 - 2*(a + b)*d*x + 6*(3*(a + b)*d*x - 2*a - 2*b)*cosh(d*x + c)^2 + 2*a + b)*sinh(d*x + c)^2
- ((a + b)*cosh(d*x + c)^8 + 8*(a + b)*cosh(d*x + c)*sinh(d*x + c)^7 + (a + b)*sinh(d*x + c)^8 - 4*(a + b)*cos
h(d*x + c)^6 + 4*(7*(a + b)*cosh(d*x + c)^2 - a - b)*sinh(d*x + c)^6 + 8*(7*(a + b)*cosh(d*x + c)^3 - 3*(a + b
)*cosh(d*x + c))*sinh(d*x + c)^5 + 6*(a + b)*cosh(d*x + c)^4 + 2*(35*(a + b)*cosh(d*x + c)^4 - 30*(a + b)*cosh
(d*x + c)^2 + 3*a + 3*b)*sinh(d*x + c)^4 + 8*(7*(a + b)*cosh(d*x + c)^5 - 10*(a + b)*cosh(d*x + c)^3 + 3*(a +
b)*cosh(d*x + c))*sinh(d*x + c)^3 - 4*(a + b)*cosh(d*x + c)^2 + 4*(7*(a + b)*cosh(d*x + c)^6 - 15*(a + b)*cosh
(d*x + c)^4 + 9*(a + b)*cosh(d*x + c)^2 - a - b)*sinh(d*x + c)^2 + 8*((a + b)*cosh(d*x + c)^7 - 3*(a + b)*cosh
(d*x + c)^5 + 3*(a + b)*cosh(d*x + c)^3 - (a + b)*cosh(d*x + c))*sinh(d*x + c) + a + b)*log(2*sinh(d*x + c)/(c
osh(d*x + c) - sinh(d*x + c))) + 4*(2*(a + b)*d*x*cosh(d*x + c)^7 - 3*(2*(a + b)*d*x - 2*a - b)*cosh(d*x + c)^
5 + 2*(3*(a + b)*d*x - 2*a - 2*b)*cosh(d*x + c)^3 - (2*(a + b)*d*x - 2*a - b)*cosh(d*x + c))*sinh(d*x + c))/(d
*cosh(d*x + c)^8 + 8*d*cosh(d*x + c)*sinh(d*x + c)^7 + d*sinh(d*x + c)^8 - 4*d*cosh(d*x + c)^6 + 4*(7*d*cosh(d
*x + c)^2 - d)*sinh(d*x + c)^6 + 8*(7*d*cosh(d*x + c)^3 - 3*d*cosh(d*x + c))*sinh(d*x + c)^5 + 6*d*cosh(d*x +
c)^4 + 2*(35*d*cosh(d*x + c)^4 - 30*d*cosh(d*x + c)^2 + 3*d)*sinh(d*x + c)^4 + 8*(7*d*cosh(d*x + c)^5 - 10*d*c
osh(d*x + c)^3 + 3*d*cosh(d*x + c))*sinh(d*x + c)^3 - 4*d*cosh(d*x + c)^2 + 4*(7*d*cosh(d*x + c)^6 - 15*d*cosh
(d*x + c)^4 + 9*d*cosh(d*x + c)^2 - d)*sinh(d*x + c)^2 + 8*(d*cosh(d*x + c)^7 - 3*d*cosh(d*x + c)^5 + 3*d*cosh
(d*x + c)^3 - d*cosh(d*x + c))*sinh(d*x + c) + d)

________________________________________________________________________________________

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(coth(d*x+c)**5*(a+b*tanh(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.20055, size = 131, normalized size = 2.67 \begin{align*} -\frac{{\left (d x + c\right )}{\left (a + b\right )}}{d} + \frac{{\left (a + b\right )} \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right )}{d} - \frac{2 \,{\left ({\left (2 \, a + b\right )} e^{\left (6 \, d x + 6 \, c\right )} - 2 \,{\left (a + b\right )} e^{\left (4 \, d x + 4 \, c\right )} +{\left (2 \, a + b\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{d{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{4}} \end{align*}

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

[In]

integrate(coth(d*x+c)^5*(a+b*tanh(d*x+c)^2),x, algorithm="giac")

[Out]

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