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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, 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 3475

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

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]

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.42, 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]

-1/2*(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[T
anh[c + d*x]] - (a - b)^3*Log[1 + Tanh[c + d*x]])/d

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 654, normalized size = 9.48 \[ \frac {{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \cosh \left (d x + c\right )^{4} + 4 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \sinh \left (d x + c\right )^{4} + 6 \, a b^{2} + {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x - 2 \, {\left (3 \, a b^{2} + b^{3} + {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \cosh \left (d x + c\right )^{2} - 3 \, a b^{2} - b^{3} - {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x\right )} \sinh \left (d x + c\right )^{2} + {\left ({\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (3 \, a^{2} b + b^{3}\right )} \sinh \left (d x + c\right )^{4} + 3 \, a^{2} b + b^{3} - 2 \, {\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{2} - 2 \, {\left (3 \, a^{2} b + b^{3} - 3 \, {\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{2}\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{3} - {\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\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^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x \cosh \left (d x + c\right )^{3} - {\left (3 \, a b^{2} + b^{3} + {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x\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} \]

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)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 99, normalized size = 1.43 \[ \frac {{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (d x + c\right )} + {\left (3 \, a^{2} b + b^{3}\right )} \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right ) + \frac {2 \, {\left (3 \, a b^{2} - {\left (3 \, a b^{2} + b^{3}\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{2}}}{d} \]

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

________________________________________________________________________________________

maple [B]  time = 0.02, size = 173, normalized size = 2.51 \[ -\frac {\left (\coth ^{2}\left (d x +c \right )\right ) b^{3}}{2 d}-\frac {3 a \,b^{2} \coth \left (d x +c \right )}{d}-\frac {\ln \left (\coth \left (d x +c \right )-1\right ) a^{3}}{2 d}-\frac {3 \ln \left (\coth \left (d x +c \right )-1\right ) a^{2} b}{2 d}-\frac {3 \ln \left (\coth \left (d x +c \right )-1\right ) a \,b^{2}}{2 d}-\frac {\ln \left (\coth \left (d x +c \right )-1\right ) b^{3}}{2 d}+\frac {\ln \left (\coth \left (d x +c \right )+1\right ) a^{3}}{2 d}-\frac {3 \ln \left (\coth \left (d x +c \right )+1\right ) a^{2} b}{2 d}+\frac {3 \ln \left (\coth \left (d x +c \right )+1\right ) a \,b^{2}}{2 d}-\frac {\ln \left (\coth \left (d x +c \right )+1\right ) b^{3}}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2/d*coth(d*x+c)^2*b^3-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 = 0.32, size = 136, normalized size = 1.97 \[ 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} \]

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

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 97, normalized size = 1.41 \[ x\,{\left (a-b\right )}^3-\frac {2\,\left (b^3+3\,a\,b^2\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}-\frac {2\,b^3}{d\,\left ({\mathrm {e}}^{4\,c+4\,d\,x}-2\,{\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}+\frac {\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-1\right )\,\left (3\,a^2\,b+b^3\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 2.85, size = 175, normalized size = 2.54 \[ \begin {cases} 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 )} \\x \left (a + b \coth {\relax (c )}\right )^{3} & \text {for}\: d = 0 \\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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((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)))),
 (x*(a + b*coth(c))**3, Eq(d, 0)), (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))

________________________________________________________________________________________