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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 40, normalized size = 1.3 \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{b\ln \left ( \sinh \left ( dx+c \right ) \right ) }{d}} \end{align*}

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

[In]

int(coth(d*x+c)^3*(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/d*b*ln(sinh(d*x+c))

________________________________________________________________________________________

Maxima [B]  time = 1.0785, size = 143, normalized size = 4.61 \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{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 )} + \frac{b \log \left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}{d} \end{align*}

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

[In]

integrate(coth(d*x+c)^3*(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 + 2*e^(-2*d*x - 2*c)/(d*(2*e^(-2*d*x - 2*c) - e
^(-4*d*x - 4*c) - 1))) + b*log(e^(d*x + c) - e^(-d*x - c))/d

________________________________________________________________________________________

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

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

[In]

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

[Out]

-((a + b)*d*x*cosh(d*x + c)^4 + 4*(a + b)*d*x*cosh(d*x + c)*sinh(d*x + c)^3 + (a + b)*d*x*sinh(d*x + c)^4 + (a
+ b)*d*x - 2*((a + b)*d*x - a)*cosh(d*x + c)^2 + 2*(3*(a + b)*d*x*cosh(d*x + c)^2 - (a + b)*d*x + a)*sinh(d*x
+ c)^2 - ((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sinh(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 - 2*(a
+ b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 - a - b)*sinh(d*x + c)^2 + 4*((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)/(cosh(d*x + c) - sinh(d*x + c))) + 4*((a + b)*
d*x*cosh(d*x + c)^3 - ((a + b)*d*x - a)*cosh(d*x + c))*sinh(d*x + c))/(d*cosh(d*x + c)^4 + 4*d*cosh(d*x + c)*s
inh(d*x + c)^3 + d*sinh(d*x + c)^4 - 2*d*cosh(d*x + c)^2 + 2*(3*d*cosh(d*x + c)^2 - d)*sinh(d*x + c)^2 + 4*(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)**3*(a+b*tanh(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.18364, size = 84, normalized size = 2.71 \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 \, a e^{\left (2 \, d x + 2 \, c\right )}}{d{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{2}} \end{align*}

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

[In]

integrate(coth(d*x+c)^3*(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*a*e^(2*d*x + 2*c)/(d*(e^(2*d*x + 2*c) - 1)^
2)