3.578 \(\int \tanh ^4(x) \, dx\)

Optimal. Leaf size=14 \[ x-\frac {1}{3} \tanh ^3(x)-\tanh (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3473, 8} \[ x-\frac {1}{3} \tanh ^3(x)-\tanh (x) \]

Antiderivative was successfully verified.

[In]

Int[Tanh[x]^4,x]

[Out]

x - Tanh[x] - Tanh[x]^3/3

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, 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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 18, normalized size = 1.29 \[ x-\frac {4 \tanh (x)}{3}+\frac {1}{3} \tanh (x) \text {sech}^2(x) \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[x]^4,x]

[Out]

x - (4*Tanh[x])/3 + (Sech[x]^2*Tanh[x])/3

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \tanh ^4(x) \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[Tanh[x]^4,x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [B]  time = 1.28, size = 68, normalized size = 4.86 \[ \frac {{\left (3 \, x + 4\right )} \cosh \relax (x)^{3} + 3 \, {\left (3 \, x + 4\right )} \cosh \relax (x) \sinh \relax (x)^{2} - 12 \, \cosh \relax (x)^{2} \sinh \relax (x) - 4 \, \sinh \relax (x)^{3} + 3 \, {\left (3 \, x + 4\right )} \cosh \relax (x)}{3 \, {\left (\cosh \relax (x)^{3} + 3 \, \cosh \relax (x) \sinh \relax (x)^{2} + 3 \, \cosh \relax (x)\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4,x, algorithm="fricas")

[Out]

1/3*((3*x + 4)*cosh(x)^3 + 3*(3*x + 4)*cosh(x)*sinh(x)^2 - 12*cosh(x)^2*sinh(x) - 4*sinh(x)^3 + 3*(3*x + 4)*co
sh(x))/(cosh(x)^3 + 3*cosh(x)*sinh(x)^2 + 3*cosh(x))

________________________________________________________________________________________

giac [B]  time = 0.63, size = 26, normalized size = 1.86 \[ x + \frac {4 \, {\left (3 \, e^{\left (4 \, x\right )} + 3 \, e^{\left (2 \, x\right )} + 2\right )}}{3 \, {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4,x, algorithm="giac")

[Out]

x + 4/3*(3*e^(4*x) + 3*e^(2*x) + 2)/(e^(2*x) + 1)^3

________________________________________________________________________________________

maple [B]  time = 0.02, size = 26, normalized size = 1.86




method result size



derivativedivides \(-\frac {\left (\tanh ^{3}\relax (x )\right )}{3}-\tanh \relax (x )-\frac {\ln \left (\tanh \relax (x )-1\right )}{2}+\frac {\ln \left (1+\tanh \relax (x )\right )}{2}\) \(26\)
default \(-\frac {\left (\tanh ^{3}\relax (x )\right )}{3}-\tanh \relax (x )-\frac {\ln \left (\tanh \relax (x )-1\right )}{2}+\frac {\ln \left (1+\tanh \relax (x )\right )}{2}\) \(26\)
risch \(x +\frac {4 \,{\mathrm e}^{4 x}+4 \,{\mathrm e}^{2 x}+\frac {8}{3}}{\left (1+{\mathrm e}^{2 x}\right )^{3}}\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^4,x,method=_RETURNVERBOSE)

[Out]

-1/3*tanh(x)^3-tanh(x)-1/2*ln(tanh(x)-1)+1/2*ln(1+tanh(x))

________________________________________________________________________________________

maxima [B]  time = 0.43, size = 38, normalized size = 2.71 \[ 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 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^4,x, algorithm="maxima")

[Out]

x - 4/3*(3*e^(-2*x) + 3*e^(-4*x) + 2)/(3*e^(-2*x) + 3*e^(-4*x) + e^(-6*x) + 1)

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 12, normalized size = 0.86 \[ -\frac {{\mathrm {tanh}\relax (x)}^3}{3}-\mathrm {tanh}\relax (x)+x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^4,x)

[Out]

x - tanh(x) - tanh(x)^3/3

________________________________________________________________________________________

sympy [A]  time = 0.23, size = 10, normalized size = 0.71 \[ x - \frac {\tanh ^{3}{\relax (x )}}{3} - \tanh {\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)**4,x)

[Out]

x - tanh(x)**3/3 - tanh(x)

________________________________________________________________________________________