3.54 \(\int x^m \tanh ^{-1}(\tanh (a+b x))^3 \, dx\)

Optimal. Leaf size=110 \[ \frac{6 b^2 x^{m+3} \tanh ^{-1}(\tanh (a+b x))}{m^3+6 m^2+11 m+6}-\frac{3 b x^{m+2} \tanh ^{-1}(\tanh (a+b x))^2}{m^2+3 m+2}+\frac{x^{m+1} \tanh ^{-1}(\tanh (a+b x))^3}{m+1}-\frac{6 b^3 x^{m+4}}{(m+1) \left (m^3+9 m^2+26 m+24\right )} \]

[Out]

(-6*b^3*x^(4 + m))/((1 + m)*(24 + 26*m + 9*m^2 + m^3)) + (6*b^2*x^(3 + m)*ArcTanh[Tanh[a + b*x]])/(6 + 11*m +
6*m^2 + m^3) - (3*b*x^(2 + m)*ArcTanh[Tanh[a + b*x]]^2)/(2 + 3*m + m^2) + (x^(1 + m)*ArcTanh[Tanh[a + b*x]]^3)
/(1 + m)

________________________________________________________________________________________

Rubi [A]  time = 0.0576198, antiderivative size = 110, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2168, 30} \[ \frac{6 b^2 x^{m+3} \tanh ^{-1}(\tanh (a+b x))}{m^3+6 m^2+11 m+6}-\frac{3 b x^{m+2} \tanh ^{-1}(\tanh (a+b x))^2}{m^2+3 m+2}+\frac{x^{m+1} \tanh ^{-1}(\tanh (a+b x))^3}{m+1}-\frac{6 b^3 x^{m+4}}{(m+1) \left (m^3+9 m^2+26 m+24\right )} \]

Antiderivative was successfully verified.

[In]

Int[x^m*ArcTanh[Tanh[a + b*x]]^3,x]

[Out]

(-6*b^3*x^(4 + m))/((1 + m)*(24 + 26*m + 9*m^2 + m^3)) + (6*b^2*x^(3 + m)*ArcTanh[Tanh[a + b*x]])/(6 + 11*m +
6*m^2 + m^3) - (3*b*x^(2 + m)*ArcTanh[Tanh[a + b*x]]^2)/(2 + 3*m + m^2) + (x^(1 + m)*ArcTanh[Tanh[a + b*x]]^3)
/(1 + m)

Rule 2168

Int[(u_)^(m_)*(v_)^(n_.), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Simplify[D[v, x]]}, Simp[(u^(m + 1)*v^
n)/(a*(m + 1)), x] - Dist[(b*n)/(a*(m + 1)), Int[u^(m + 1)*v^(n - 1), x], x] /; NeQ[b*u - a*v, 0]] /; FreeQ[{m
, n}, x] && PiecewiseLinearQ[u, v, x] && NeQ[m, -1] && ((LtQ[m, -1] && GtQ[n, 0] &&  !(ILtQ[m + n, -2] && (Fra
ctionQ[m] || GeQ[2*n + m + 1, 0]))) || (IGtQ[n, 0] && IGtQ[m, 0] && LeQ[n, m]) || (IGtQ[n, 0] &&  !IntegerQ[m]
) || (ILtQ[m, 0] &&  !IntegerQ[n]))

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int x^m \tanh ^{-1}(\tanh (a+b x))^3 \, dx &=\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^3}{1+m}-\frac{(3 b) \int x^{1+m} \tanh ^{-1}(\tanh (a+b x))^2 \, dx}{1+m}\\ &=-\frac{3 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^2}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^3}{1+m}+\frac{\left (6 b^2\right ) \int x^{2+m} \tanh ^{-1}(\tanh (a+b x)) \, dx}{2+3 m+m^2}\\ &=\frac{6 b^2 x^{3+m} \tanh ^{-1}(\tanh (a+b x))}{6+11 m+6 m^2+m^3}-\frac{3 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^2}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^3}{1+m}-\frac{\left (6 b^3\right ) \int x^{3+m} \, dx}{6+11 m+6 m^2+m^3}\\ &=-\frac{6 b^3 x^{4+m}}{(4+m) \left (6+11 m+6 m^2+m^3\right )}+\frac{6 b^2 x^{3+m} \tanh ^{-1}(\tanh (a+b x))}{6+11 m+6 m^2+m^3}-\frac{3 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^2}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^3}{1+m}\\ \end{align*}

Mathematica [A]  time = 0.103638, size = 97, normalized size = 0.88 \[ \frac{x^{m+1} \left (6 b^2 (m+4) x^2 \tanh ^{-1}(\tanh (a+b x))-3 b \left (m^2+7 m+12\right ) x \tanh ^{-1}(\tanh (a+b x))^2+\left (m^3+9 m^2+26 m+24\right ) \tanh ^{-1}(\tanh (a+b x))^3-6 b^3 x^3\right )}{(m+1) (m+2) (m+3) (m+4)} \]

Antiderivative was successfully verified.

[In]

Integrate[x^m*ArcTanh[Tanh[a + b*x]]^3,x]

[Out]

(x^(1 + m)*(-6*b^3*x^3 + 6*b^2*(4 + m)*x^2*ArcTanh[Tanh[a + b*x]] - 3*b*(12 + 7*m + m^2)*x*ArcTanh[Tanh[a + b*
x]]^2 + (24 + 26*m + 9*m^2 + m^3)*ArcTanh[Tanh[a + b*x]]^3))/((1 + m)*(2 + m)*(3 + m)*(4 + m))

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 177, normalized size = 1.6 \begin{align*}{\frac{{x}^{4}{b}^{3}{{\rm e}^{m\ln \left ( x \right ) }}}{4+m}}+{\frac{ \left ({a}^{3}+3\,{a}^{2} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) +3\,a \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{2}+ \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{3} \right ) x{{\rm e}^{m\ln \left ( x \right ) }}}{1+m}}+3\,{\frac{b \left ({a}^{2}+2\,a \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) + \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{2} \right ){x}^{2}{{\rm e}^{m\ln \left ( x \right ) }}}{2+m}}+3\,{\frac{{b}^{2} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx \right ){x}^{3}{{\rm e}^{m\ln \left ( x \right ) }}}{3+m}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*arctanh(tanh(b*x+a))^3,x)

[Out]

b^3/(4+m)*x^4*exp(m*ln(x))+(a^3+3*a^2*(arctanh(tanh(b*x+a))-b*x-a)+3*a*(arctanh(tanh(b*x+a))-b*x-a)^2+(arctanh
(tanh(b*x+a))-b*x-a)^3)/(1+m)*x*exp(m*ln(x))+3*b*(a^2+2*a*(arctanh(tanh(b*x+a))-b*x-a)+(arctanh(tanh(b*x+a))-b
*x-a)^2)/(2+m)*x^2*exp(m*ln(x))+3*b^2*(arctanh(tanh(b*x+a))-b*x)/(3+m)*x^3*exp(m*ln(x))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*arctanh(tanh(b*x+a))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.67885, size = 657, normalized size = 5.97 \begin{align*} \frac{{\left ({\left (b^{3} m^{3} + 6 \, b^{3} m^{2} + 11 \, b^{3} m + 6 \, b^{3}\right )} x^{4} + 3 \,{\left (a b^{2} m^{3} + 7 \, a b^{2} m^{2} + 14 \, a b^{2} m + 8 \, a b^{2}\right )} x^{3} + 3 \,{\left (a^{2} b m^{3} + 8 \, a^{2} b m^{2} + 19 \, a^{2} b m + 12 \, a^{2} b\right )} x^{2} +{\left (a^{3} m^{3} + 9 \, a^{3} m^{2} + 26 \, a^{3} m + 24 \, a^{3}\right )} x\right )} \cosh \left (m \log \left (x\right )\right ) +{\left ({\left (b^{3} m^{3} + 6 \, b^{3} m^{2} + 11 \, b^{3} m + 6 \, b^{3}\right )} x^{4} + 3 \,{\left (a b^{2} m^{3} + 7 \, a b^{2} m^{2} + 14 \, a b^{2} m + 8 \, a b^{2}\right )} x^{3} + 3 \,{\left (a^{2} b m^{3} + 8 \, a^{2} b m^{2} + 19 \, a^{2} b m + 12 \, a^{2} b\right )} x^{2} +{\left (a^{3} m^{3} + 9 \, a^{3} m^{2} + 26 \, a^{3} m + 24 \, a^{3}\right )} x\right )} \sinh \left (m \log \left (x\right )\right )}{m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*arctanh(tanh(b*x+a))^3,x, algorithm="fricas")

[Out]

(((b^3*m^3 + 6*b^3*m^2 + 11*b^3*m + 6*b^3)*x^4 + 3*(a*b^2*m^3 + 7*a*b^2*m^2 + 14*a*b^2*m + 8*a*b^2)*x^3 + 3*(a
^2*b*m^3 + 8*a^2*b*m^2 + 19*a^2*b*m + 12*a^2*b)*x^2 + (a^3*m^3 + 9*a^3*m^2 + 26*a^3*m + 24*a^3)*x)*cosh(m*log(
x)) + ((b^3*m^3 + 6*b^3*m^2 + 11*b^3*m + 6*b^3)*x^4 + 3*(a*b^2*m^3 + 7*a*b^2*m^2 + 14*a*b^2*m + 8*a*b^2)*x^3 +
 3*(a^2*b*m^3 + 8*a^2*b*m^2 + 19*a^2*b*m + 12*a^2*b)*x^2 + (a^3*m^3 + 9*a^3*m^2 + 26*a^3*m + 24*a^3)*x)*sinh(m
*log(x)))/(m^4 + 10*m^3 + 35*m^2 + 50*m + 24)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*atanh(tanh(b*x+a))**3,x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{m} \operatorname{artanh}\left (\tanh \left (b x + a\right )\right )^{3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*arctanh(tanh(b*x+a))^3,x, algorithm="giac")

[Out]

integrate(x^m*arctanh(tanh(b*x + a))^3, x)