3.79 \(\int (a+b \coth (c+d x))^3 \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0638579, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3482, 3525, 3475} \[ \frac{b \left (3 a^2+b^2\right ) \log (\sinh (c+d x))}{d}+a x \left (a^2+3 b^2\right )-\frac{2 a b^2 \coth (c+d x)}{d}-\frac{b (a+b \coth (c+d x))^2}{2 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3482

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

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

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

Mathematica [A]  time = 0.402468, size = 86, normalized size = 1.25 \[ -\frac{-2 b \left (3 a^2+b^2\right ) \log (\tanh (c+d x))+6 a b^2 \coth (c+d x)+(a-b)^3 (-\log (\tanh (c+d x)+1))+(a+b)^3 \log (1-\tanh (c+d x))+b^3 \coth ^2(c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.004, size = 173, normalized size = 2.5 \begin{align*} -{\frac{{b}^{3} \left ({\rm coth} \left (dx+c\right ) \right ) ^{2}}{2\,d}}-3\,{\frac{a{b}^{2}{\rm coth} \left (dx+c\right )}{d}}-{\frac{\ln \left ({\rm coth} \left (dx+c\right )-1 \right ){a}^{3}}{2\,d}}-{\frac{3\,\ln \left ({\rm coth} \left (dx+c\right )-1 \right ){a}^{2}b}{2\,d}}-{\frac{3\,\ln \left ({\rm coth} \left (dx+c\right )-1 \right ) a{b}^{2}}{2\,d}}-{\frac{\ln \left ({\rm coth} \left (dx+c\right )-1 \right ){b}^{3}}{2\,d}}+{\frac{\ln \left ({\rm coth} \left (dx+c\right )+1 \right ){a}^{3}}{2\,d}}-{\frac{3\,\ln \left ({\rm coth} \left (dx+c\right )+1 \right ){a}^{2}b}{2\,d}}+{\frac{3\,\ln \left ({\rm coth} \left (dx+c\right )+1 \right ) a{b}^{2}}{2\,d}}-{\frac{\ln \left ({\rm coth} \left (dx+c\right )+1 \right ){b}^{3}}{2\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.11061, size = 184, normalized size = 2.67 \begin{align*} b^{3}{\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 )} + 3 \, a b^{2}{\left (x + \frac{c}{d} + \frac{2}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}}\right )} + a^{3} x + \frac{3 \, a^{2} b \log \left (\sinh \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.64428, size = 1563, normalized size = 22.65 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((a^3 - 3*a^2*b + 3*a*b^2 - b^3)*d*x*cosh(d*x + c)^4 + 4*(a^3 - 3*a^2*b + 3*a*b^2 - b^3)*d*x*cosh(d*x + c)*sin
h(d*x + c)^3 + (a^3 - 3*a^2*b + 3*a*b^2 - b^3)*d*x*sinh(d*x + c)^4 + 6*a*b^2 + (a^3 - 3*a^2*b + 3*a*b^2 - b^3)
*d*x - 2*(3*a*b^2 + b^3 + (a^3 - 3*a^2*b + 3*a*b^2 - b^3)*d*x)*cosh(d*x + c)^2 + 2*(3*(a^3 - 3*a^2*b + 3*a*b^2
 - b^3)*d*x*cosh(d*x + c)^2 - 3*a*b^2 - b^3 - (a^3 - 3*a^2*b + 3*a*b^2 - b^3)*d*x)*sinh(d*x + c)^2 + ((3*a^2*b
 + b^3)*cosh(d*x + c)^4 + 4*(3*a^2*b + b^3)*cosh(d*x + c)*sinh(d*x + c)^3 + (3*a^2*b + b^3)*sinh(d*x + c)^4 +
3*a^2*b + b^3 - 2*(3*a^2*b + b^3)*cosh(d*x + c)^2 - 2*(3*a^2*b + b^3 - 3*(3*a^2*b + b^3)*cosh(d*x + c)^2)*sinh
(d*x + c)^2 + 4*((3*a^2*b + b^3)*cosh(d*x + c)^3 - (3*a^2*b + b^3)*cosh(d*x + c))*sinh(d*x + c))*log(2*sinh(d*
x + c)/(cosh(d*x + c) - sinh(d*x + c))) + 4*((a^3 - 3*a^2*b + 3*a*b^2 - b^3)*d*x*cosh(d*x + c)^3 - (3*a*b^2 +
b^3 + (a^3 - 3*a^2*b + 3*a*b^2 - b^3)*d*x)*cosh(d*x + c))*sinh(d*x + c))/(d*cosh(d*x + c)^4 + 4*d*cosh(d*x + c
)*sinh(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 [A]  time = 4.43112, size = 175, normalized size = 2.54 \begin{align*} \begin{cases} x \left (a + b \coth{\left (c \right )}\right )^{3} & \text{for}\: d = 0 \\a^{3} x + \tilde{\infty } a^{2} b x + \tilde{\infty } a b^{2} x + \tilde{\infty } b^{3} x & \text{for}\: c = \log{\left (- e^{- d x} \right )} \vee c = \log{\left (e^{- d x} \right )} \\a^{3} x + 3 a^{2} b x - \frac{3 a^{2} b \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} + \frac{3 a^{2} b \log{\left (\tanh{\left (c + d x \right )} \right )}}{d} + 3 a b^{2} x - \frac{3 a b^{2}}{d \tanh{\left (c + d x \right )}} + b^{3} x - \frac{b^{3} \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} + \frac{b^{3} \log{\left (\tanh{\left (c + d x \right )} \right )}}{d} - \frac{b^{3}}{2 d \tanh ^{2}{\left (c + d x \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*coth(d*x+c))**3,x)

[Out]

Piecewise((x*(a + b*coth(c))**3, Eq(d, 0)), (a**3*x + zoo*a**2*b*x + zoo*a*b**2*x + zoo*b**3*x, Eq(c, log(exp(
-d*x))) | Eq(c, log(-exp(-d*x)))), (a**3*x + 3*a**2*b*x - 3*a**2*b*log(tanh(c + d*x) + 1)/d + 3*a**2*b*log(tan
h(c + d*x))/d + 3*a*b**2*x - 3*a*b**2/(d*tanh(c + d*x)) + b**3*x - b**3*log(tanh(c + d*x) + 1)/d + b**3*log(ta
nh(c + d*x))/d - b**3/(2*d*tanh(c + d*x)**2), True))

________________________________________________________________________________________

Giac [A]  time = 1.14267, size = 140, normalized size = 2.03 \begin{align*} \frac{{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )}{\left (d x + c\right )}}{d} + \frac{{\left (3 \, a^{2} b + b^{3}\right )} \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right )}{d} + \frac{2 \,{\left (3 \, a b^{2} -{\left (3 \, a b^{2} + b^{3}\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{d{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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