3.62 \(\int (1+\coth (x))^4 \, dx\)

Optimal. Leaf size=31 \[ 8 x-\frac {1}{3} (\coth (x)+1)^3-(\coth (x)+1)^2-4 \coth (x)+8 \log (\sinh (x)) \]

[Out]

8*x-4*coth(x)-(1+coth(x))^2-1/3*(1+coth(x))^3+8*ln(sinh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3478, 3477, 3475} \[ 8 x-\frac {1}{3} (\coth (x)+1)^3-(\coth (x)+1)^2-4 \coth (x)+8 \log (\sinh (x)) \]

Antiderivative was successfully verified.

[In]

Int[(1 + Coth[x])^4,x]

[Out]

8*x - 4*Coth[x] - (1 + Coth[x])^2 - (1 + Coth[x])^3/3 + 8*Log[Sinh[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 3477

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

Rule 3478

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

Rubi steps

\begin {align*} \int (1+\coth (x))^4 \, dx &=-\frac {1}{3} (1+\coth (x))^3+2 \int (1+\coth (x))^3 \, dx\\ &=-(1+\coth (x))^2-\frac {1}{3} (1+\coth (x))^3+4 \int (1+\coth (x))^2 \, dx\\ &=8 x-4 \coth (x)-(1+\coth (x))^2-\frac {1}{3} (1+\coth (x))^3+8 \int \coth (x) \, dx\\ &=8 x-4 \coth (x)-(1+\coth (x))^2-\frac {1}{3} (1+\coth (x))^3+8 \log (\sinh (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.19, size = 84, normalized size = 2.71 \[ \frac {\sinh (x) (\coth (x)+1)^4 \left (3 \sinh (x) \left (-6 \sinh (x) \cosh (x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\tanh ^2(x)\right )-2 \cosh ^2(x)+\sinh ^2(x) (x+8 \log (\tanh (x))+8 \log (\cosh (x)))\right )-\cosh ^3(x) \, _2F_1\left (-\frac {3}{2},1;-\frac {1}{2};\tanh ^2(x)\right )\right )}{3 (\sinh (x)+\cosh (x))^4} \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + Coth[x])^4,x]

[Out]

((1 + Coth[x])^4*Sinh[x]*(-(Cosh[x]^3*Hypergeometric2F1[-3/2, 1, -1/2, Tanh[x]^2]) + 3*Sinh[x]*(-2*Cosh[x]^2 -
 6*Cosh[x]*Hypergeometric2F1[-1/2, 1, 1/2, Tanh[x]^2]*Sinh[x] + (x + 8*Log[Cosh[x]] + 8*Log[Tanh[x]])*Sinh[x]^
2)))/(3*(Cosh[x] + Sinh[x])^4)

________________________________________________________________________________________

fricas [B]  time = 0.40, size = 273, normalized size = 8.81 \[ -\frac {4 \, {\left (18 \, \cosh \relax (x)^{4} + 72 \, \cosh \relax (x) \sinh \relax (x)^{3} + 18 \, \sinh \relax (x)^{4} + 27 \, {\left (4 \, \cosh \relax (x)^{2} - 1\right )} \sinh \relax (x)^{2} - 27 \, \cosh \relax (x)^{2} - 6 \, {\left (\cosh \relax (x)^{6} + 6 \, \cosh \relax (x) \sinh \relax (x)^{5} + \sinh \relax (x)^{6} + 3 \, {\left (5 \, \cosh \relax (x)^{2} - 1\right )} \sinh \relax (x)^{4} - 3 \, \cosh \relax (x)^{4} + 4 \, {\left (5 \, \cosh \relax (x)^{3} - 3 \, \cosh \relax (x)\right )} \sinh \relax (x)^{3} + 3 \, {\left (5 \, \cosh \relax (x)^{4} - 6 \, \cosh \relax (x)^{2} + 1\right )} \sinh \relax (x)^{2} + 3 \, \cosh \relax (x)^{2} + 6 \, {\left (\cosh \relax (x)^{5} - 2 \, \cosh \relax (x)^{3} + \cosh \relax (x)\right )} \sinh \relax (x) - 1\right )} \log \left (\frac {2 \, \sinh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right ) + 18 \, {\left (4 \, \cosh \relax (x)^{3} - 3 \, \cosh \relax (x)\right )} \sinh \relax (x) + 11\right )}}{3 \, {\left (\cosh \relax (x)^{6} + 6 \, \cosh \relax (x) \sinh \relax (x)^{5} + \sinh \relax (x)^{6} + 3 \, {\left (5 \, \cosh \relax (x)^{2} - 1\right )} \sinh \relax (x)^{4} - 3 \, \cosh \relax (x)^{4} + 4 \, {\left (5 \, \cosh \relax (x)^{3} - 3 \, \cosh \relax (x)\right )} \sinh \relax (x)^{3} + 3 \, {\left (5 \, \cosh \relax (x)^{4} - 6 \, \cosh \relax (x)^{2} + 1\right )} \sinh \relax (x)^{2} + 3 \, \cosh \relax (x)^{2} + 6 \, {\left (\cosh \relax (x)^{5} - 2 \, \cosh \relax (x)^{3} + \cosh \relax (x)\right )} \sinh \relax (x) - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+coth(x))^4,x, algorithm="fricas")

[Out]

-4/3*(18*cosh(x)^4 + 72*cosh(x)*sinh(x)^3 + 18*sinh(x)^4 + 27*(4*cosh(x)^2 - 1)*sinh(x)^2 - 27*cosh(x)^2 - 6*(
cosh(x)^6 + 6*cosh(x)*sinh(x)^5 + sinh(x)^6 + 3*(5*cosh(x)^2 - 1)*sinh(x)^4 - 3*cosh(x)^4 + 4*(5*cosh(x)^3 - 3
*cosh(x))*sinh(x)^3 + 3*(5*cosh(x)^4 - 6*cosh(x)^2 + 1)*sinh(x)^2 + 3*cosh(x)^2 + 6*(cosh(x)^5 - 2*cosh(x)^3 +
 cosh(x))*sinh(x) - 1)*log(2*sinh(x)/(cosh(x) - sinh(x))) + 18*(4*cosh(x)^3 - 3*cosh(x))*sinh(x) + 11)/(cosh(x
)^6 + 6*cosh(x)*sinh(x)^5 + sinh(x)^6 + 3*(5*cosh(x)^2 - 1)*sinh(x)^4 - 3*cosh(x)^4 + 4*(5*cosh(x)^3 - 3*cosh(
x))*sinh(x)^3 + 3*(5*cosh(x)^4 - 6*cosh(x)^2 + 1)*sinh(x)^2 + 3*cosh(x)^2 + 6*(cosh(x)^5 - 2*cosh(x)^3 + cosh(
x))*sinh(x) - 1)

________________________________________________________________________________________

giac [A]  time = 0.11, size = 35, normalized size = 1.13 \[ -\frac {4 \, {\left (18 \, e^{\left (4 \, x\right )} - 27 \, e^{\left (2 \, x\right )} + 11\right )}}{3 \, {\left (e^{\left (2 \, x\right )} - 1\right )}^{3}} + 8 \, \log \left ({\left | e^{\left (2 \, x\right )} - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+coth(x))^4,x, algorithm="giac")

[Out]

-4/3*(18*e^(4*x) - 27*e^(2*x) + 11)/(e^(2*x) - 1)^3 + 8*log(abs(e^(2*x) - 1))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 25, normalized size = 0.81 \[ -\frac {\left (\coth ^{3}\relax (x )\right )}{3}-2 \left (\coth ^{2}\relax (x )\right )-7 \coth \relax (x )-8 \ln \left (\coth \relax (x )-1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+coth(x))^4,x)

[Out]

-1/3*coth(x)^3-2*coth(x)^2-7*coth(x)-8*ln(coth(x)-1)

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 95, normalized size = 3.06 \[ 12 \, x - \frac {4 \, {\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} - 2\right )}}{3 \, {\left (3 \, e^{\left (-2 \, x\right )} - 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} - 1\right )}} + \frac {8 \, e^{\left (-2 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} - e^{\left (-4 \, x\right )} - 1} + \frac {12}{e^{\left (-2 \, x\right )} - 1} + 4 \, \log \left (e^{\left (-x\right )} + 1\right ) + 4 \, \log \left (e^{\left (-x\right )} - 1\right ) + 4 \, \log \left (\sinh \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+coth(x))^4,x, algorithm="maxima")

[Out]

12*x - 4/3*(3*e^(-2*x) - 3*e^(-4*x) - 2)/(3*e^(-2*x) - 3*e^(-4*x) + e^(-6*x) - 1) + 8*e^(-2*x)/(2*e^(-2*x) - e
^(-4*x) - 1) + 12/(e^(-2*x) - 1) + 4*log(e^(-x) + 1) + 4*log(e^(-x) - 1) + 4*log(sinh(x))

________________________________________________________________________________________

mupad [B]  time = 1.14, size = 60, normalized size = 1.94 \[ 8\,\ln \left ({\mathrm {e}}^{2\,x}-1\right )-\frac {8}{3\,\left (3\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}-1\right )}-\frac {12}{{\mathrm {e}}^{4\,x}-2\,{\mathrm {e}}^{2\,x}+1}-\frac {24}{{\mathrm {e}}^{2\,x}-1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((coth(x) + 1)^4,x)

[Out]

8*log(exp(2*x) - 1) - 8/(3*(3*exp(2*x) - 3*exp(4*x) + exp(6*x) - 1)) - 12/(exp(4*x) - 2*exp(2*x) + 1) - 24/(ex
p(2*x) - 1)

________________________________________________________________________________________

sympy [A]  time = 0.92, size = 37, normalized size = 1.19 \[ 16 x - 8 \log {\left (\tanh {\relax (x )} + 1 \right )} + 8 \log {\left (\tanh {\relax (x )} \right )} - \frac {7}{\tanh {\relax (x )}} - \frac {2}{\tanh ^{2}{\relax (x )}} - \frac {1}{3 \tanh ^{3}{\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+coth(x))**4,x)

[Out]

16*x - 8*log(tanh(x) + 1) + 8*log(tanh(x)) - 7/tanh(x) - 2/tanh(x)**2 - 1/(3*tanh(x)**3)

________________________________________________________________________________________