\(\int \tanh ^6(a+b x) \, dx\) [1]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 43 \[ \int \tanh ^6(a+b x) \, dx=x-\frac {\tanh (a+b x)}{b}-\frac {\tanh ^3(a+b x)}{3 b}-\frac {\tanh ^5(a+b x)}{5 b} \]

[Out]

x-tanh(b*x+a)/b-1/3*tanh(b*x+a)^3/b-1/5*tanh(b*x+a)^5/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3554, 8} \[ \int \tanh ^6(a+b x) \, dx=-\frac {\tanh ^5(a+b x)}{5 b}-\frac {\tanh ^3(a+b x)}{3 b}-\frac {\tanh (a+b x)}{b}+x \]

[In]

Int[Tanh[a + b*x]^6,x]

[Out]

x - Tanh[a + b*x]/b - Tanh[a + b*x]^3/(3*b) - Tanh[a + b*x]^5/(5*b)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3554

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*} \text {integral}& = -\frac {\tanh ^5(a+b x)}{5 b}+\int \tanh ^4(a+b x) \, dx \\ & = -\frac {\tanh ^3(a+b x)}{3 b}-\frac {\tanh ^5(a+b x)}{5 b}+\int \tanh ^2(a+b x) \, dx \\ & = -\frac {\tanh (a+b x)}{b}-\frac {\tanh ^3(a+b x)}{3 b}-\frac {\tanh ^5(a+b x)}{5 b}+\int 1 \, dx \\ & = x-\frac {\tanh (a+b x)}{b}-\frac {\tanh ^3(a+b x)}{3 b}-\frac {\tanh ^5(a+b x)}{5 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.23 \[ \int \tanh ^6(a+b x) \, dx=\frac {\text {arctanh}(\tanh (a+b x))}{b}-\frac {\tanh (a+b x)}{b}-\frac {\tanh ^3(a+b x)}{3 b}-\frac {\tanh ^5(a+b x)}{5 b} \]

[In]

Integrate[Tanh[a + b*x]^6,x]

[Out]

ArcTanh[Tanh[a + b*x]]/b - Tanh[a + b*x]/b - Tanh[a + b*x]^3/(3*b) - Tanh[a + b*x]^5/(5*b)

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.91

method result size
parallelrisch \(-\frac {3 \tanh \left (b x +a \right )^{5}+5 \tanh \left (b x +a \right )^{3}-15 b x +15 \tanh \left (b x +a \right )}{15 b}\) \(39\)
derivativedivides \(\frac {-\frac {\tanh \left (b x +a \right )^{5}}{5}-\frac {\tanh \left (b x +a \right )^{3}}{3}-\tanh \left (b x +a \right )-\frac {\ln \left (-1+\tanh \left (b x +a \right )\right )}{2}+\frac {\ln \left (1+\tanh \left (b x +a \right )\right )}{2}}{b}\) \(56\)
default \(\frac {-\frac {\tanh \left (b x +a \right )^{5}}{5}-\frac {\tanh \left (b x +a \right )^{3}}{3}-\tanh \left (b x +a \right )-\frac {\ln \left (-1+\tanh \left (b x +a \right )\right )}{2}+\frac {\ln \left (1+\tanh \left (b x +a \right )\right )}{2}}{b}\) \(56\)
risch \(x +\frac {6 \,{\mathrm e}^{8 b x +8 a}+12 \,{\mathrm e}^{6 b x +6 a}+\frac {56 \,{\mathrm e}^{4 b x +4 a}}{3}+\frac {28 \,{\mathrm e}^{2 b x +2 a}}{3}+\frac {46}{15}}{b \left (1+{\mathrm e}^{2 b x +2 a}\right )^{5}}\) \(67\)

[In]

int(tanh(b*x+a)^6,x,method=_RETURNVERBOSE)

[Out]

-1/15*(3*tanh(b*x+a)^5+5*tanh(b*x+a)^3-15*b*x+15*tanh(b*x+a))/b

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 254 vs. \(2 (39) = 78\).

Time = 0.26 (sec) , antiderivative size = 254, normalized size of antiderivative = 5.91 \[ \int \tanh ^6(a+b x) \, dx=\frac {{\left (15 \, b x + 23\right )} \cosh \left (b x + a\right )^{5} + 5 \, {\left (15 \, b x + 23\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{4} - 23 \, \sinh \left (b x + a\right )^{5} + 5 \, {\left (15 \, b x + 23\right )} \cosh \left (b x + a\right )^{3} - 5 \, {\left (46 \, \cosh \left (b x + a\right )^{2} + 5\right )} \sinh \left (b x + a\right )^{3} + 5 \, {\left (2 \, {\left (15 \, b x + 23\right )} \cosh \left (b x + a\right )^{3} + 3 \, {\left (15 \, b x + 23\right )} \cosh \left (b x + a\right )\right )} \sinh \left (b x + a\right )^{2} + 10 \, {\left (15 \, b x + 23\right )} \cosh \left (b x + a\right ) - 5 \, {\left (23 \, \cosh \left (b x + a\right )^{4} + 15 \, \cosh \left (b x + a\right )^{2} + 10\right )} \sinh \left (b x + a\right )}{15 \, {\left (b \cosh \left (b x + a\right )^{5} + 5 \, b \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{4} + 5 \, b \cosh \left (b x + a\right )^{3} + 5 \, {\left (2 \, b \cosh \left (b x + a\right )^{3} + 3 \, b \cosh \left (b x + a\right )\right )} \sinh \left (b x + a\right )^{2} + 10 \, b \cosh \left (b x + a\right )\right )}} \]

[In]

integrate(tanh(b*x+a)^6,x, algorithm="fricas")

[Out]

1/15*((15*b*x + 23)*cosh(b*x + a)^5 + 5*(15*b*x + 23)*cosh(b*x + a)*sinh(b*x + a)^4 - 23*sinh(b*x + a)^5 + 5*(
15*b*x + 23)*cosh(b*x + a)^3 - 5*(46*cosh(b*x + a)^2 + 5)*sinh(b*x + a)^3 + 5*(2*(15*b*x + 23)*cosh(b*x + a)^3
 + 3*(15*b*x + 23)*cosh(b*x + a))*sinh(b*x + a)^2 + 10*(15*b*x + 23)*cosh(b*x + a) - 5*(23*cosh(b*x + a)^4 + 1
5*cosh(b*x + a)^2 + 10)*sinh(b*x + a))/(b*cosh(b*x + a)^5 + 5*b*cosh(b*x + a)*sinh(b*x + a)^4 + 5*b*cosh(b*x +
 a)^3 + 5*(2*b*cosh(b*x + a)^3 + 3*b*cosh(b*x + a))*sinh(b*x + a)^2 + 10*b*cosh(b*x + a))

Sympy [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.91 \[ \int \tanh ^6(a+b x) \, dx=\begin {cases} x - \frac {\tanh ^{5}{\left (a + b x \right )}}{5 b} - \frac {\tanh ^{3}{\left (a + b x \right )}}{3 b} - \frac {\tanh {\left (a + b x \right )}}{b} & \text {for}\: b \neq 0 \\x \tanh ^{6}{\left (a \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(tanh(b*x+a)**6,x)

[Out]

Piecewise((x - tanh(a + b*x)**5/(5*b) - tanh(a + b*x)**3/(3*b) - tanh(a + b*x)/b, Ne(b, 0)), (x*tanh(a)**6, Tr
ue))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (39) = 78\).

Time = 0.19 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.67 \[ \int \tanh ^6(a+b x) \, dx=x + \frac {a}{b} - \frac {2 \, {\left (70 \, e^{\left (-2 \, b x - 2 \, a\right )} + 140 \, e^{\left (-4 \, b x - 4 \, a\right )} + 90 \, e^{\left (-6 \, b x - 6 \, a\right )} + 45 \, e^{\left (-8 \, b x - 8 \, a\right )} + 23\right )}}{15 \, b {\left (5 \, e^{\left (-2 \, b x - 2 \, a\right )} + 10 \, e^{\left (-4 \, b x - 4 \, a\right )} + 10 \, e^{\left (-6 \, b x - 6 \, a\right )} + 5 \, e^{\left (-8 \, b x - 8 \, a\right )} + e^{\left (-10 \, b x - 10 \, a\right )} + 1\right )}} \]

[In]

integrate(tanh(b*x+a)^6,x, algorithm="maxima")

[Out]

x + a/b - 2/15*(70*e^(-2*b*x - 2*a) + 140*e^(-4*b*x - 4*a) + 90*e^(-6*b*x - 6*a) + 45*e^(-8*b*x - 8*a) + 23)/(
b*(5*e^(-2*b*x - 2*a) + 10*e^(-4*b*x - 4*a) + 10*e^(-6*b*x - 6*a) + 5*e^(-8*b*x - 8*a) + e^(-10*b*x - 10*a) +
1))

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.72 \[ \int \tanh ^6(a+b x) \, dx=\frac {15 \, b x + 15 \, a + \frac {2 \, {\left (45 \, e^{\left (8 \, b x + 8 \, a\right )} + 90 \, e^{\left (6 \, b x + 6 \, a\right )} + 140 \, e^{\left (4 \, b x + 4 \, a\right )} + 70 \, e^{\left (2 \, b x + 2 \, a\right )} + 23\right )}}{{\left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )}^{5}}}{15 \, b} \]

[In]

integrate(tanh(b*x+a)^6,x, algorithm="giac")

[Out]

1/15*(15*b*x + 15*a + 2*(45*e^(8*b*x + 8*a) + 90*e^(6*b*x + 6*a) + 140*e^(4*b*x + 4*a) + 70*e^(2*b*x + 2*a) +
23)/(e^(2*b*x + 2*a) + 1)^5)/b

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.79 \[ \int \tanh ^6(a+b x) \, dx=x-\frac {\frac {{\mathrm {tanh}\left (a+b\,x\right )}^5}{5}+\frac {{\mathrm {tanh}\left (a+b\,x\right )}^3}{3}+\mathrm {tanh}\left (a+b\,x\right )}{b} \]

[In]

int(tanh(a + b*x)^6,x)

[Out]

x - (tanh(a + b*x) + tanh(a + b*x)^3/3 + tanh(a + b*x)^5/5)/b