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

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

[Out]

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

(24*b^4*x^(5 + m))/((1 + m)*(2 + m)*(3 + m)*(20 + 9*m + m^2)) - (24*b^3*x^(4 + m)*ArcTanh[Tanh[a + b*x]])/((1
+ m)*(24 + 26*m + 9*m^2 + m^3)) + (12*b^2*x^(3 + m)*ArcTanh[Tanh[a + b*x]]^2)/(6 + 11*m + 6*m^2 + m^3) - (4*b*
x^(2 + m)*ArcTanh[Tanh[a + b*x]]^3)/(2 + 3*m + m^2) + (x^(1 + m)*ArcTanh[Tanh[a + b*x]]^4)/(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))^4 \, dx &=\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}-\frac{(4 b) \int x^{1+m} \tanh ^{-1}(\tanh (a+b x))^3 \, dx}{1+m}\\ &=-\frac{4 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^3}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}+\frac{\left (12 b^2\right ) \int x^{2+m} \tanh ^{-1}(\tanh (a+b x))^2 \, dx}{2+3 m+m^2}\\ &=\frac{12 b^2 x^{3+m} \tanh ^{-1}(\tanh (a+b x))^2}{6+11 m+6 m^2+m^3}-\frac{4 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^3}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}-\frac{\left (24 b^3\right ) \int x^{3+m} \tanh ^{-1}(\tanh (a+b x)) \, dx}{6+11 m+6 m^2+m^3}\\ &=-\frac{24 b^3 x^{4+m} \tanh ^{-1}(\tanh (a+b x))}{(4+m) \left (6+11 m+6 m^2+m^3\right )}+\frac{12 b^2 x^{3+m} \tanh ^{-1}(\tanh (a+b x))^2}{6+11 m+6 m^2+m^3}-\frac{4 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^3}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}+\frac{\left (24 b^4\right ) \int x^{4+m} \, dx}{(4+m) \left (6+11 m+6 m^2+m^3\right )}\\ &=\frac{24 b^4 x^{5+m}}{(4+m) (5+m) \left (6+11 m+6 m^2+m^3\right )}-\frac{24 b^3 x^{4+m} \tanh ^{-1}(\tanh (a+b x))}{(4+m) \left (6+11 m+6 m^2+m^3\right )}+\frac{12 b^2 x^{3+m} \tanh ^{-1}(\tanh (a+b x))^2}{6+11 m+6 m^2+m^3}-\frac{4 b x^{2+m} \tanh ^{-1}(\tanh (a+b x))^3}{2+3 m+m^2}+\frac{x^{1+m} \tanh ^{-1}(\tanh (a+b x))^4}{1+m}\\ \end{align*}

Mathematica [A]  time = 0.142082, size = 137, normalized size = 0.89 \[ \frac{x^{m+1} \left (12 b^2 \left (m^2+9 m+20\right ) x^2 \tanh ^{-1}(\tanh (a+b x))^2-24 b^3 (m+5) x^3 \tanh ^{-1}(\tanh (a+b x))-4 b \left (m^3+12 m^2+47 m+60\right ) x \tanh ^{-1}(\tanh (a+b x))^3+\left (m^4+14 m^3+71 m^2+154 m+120\right ) \tanh ^{-1}(\tanh (a+b x))^4+24 b^4 x^4\right )}{(m+1) (m+2) (m+3) (m+4) (m+5)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(x^(1 + m)*(24*b^4*x^4 - 24*b^3*(5 + m)*x^3*ArcTanh[Tanh[a + b*x]] + 12*b^2*(20 + 9*m + m^2)*x^2*ArcTanh[Tanh[
a + b*x]]^2 - 4*b*(60 + 47*m + 12*m^2 + m^3)*x*ArcTanh[Tanh[a + b*x]]^3 + (120 + 154*m + 71*m^2 + 14*m^3 + m^4
)*ArcTanh[Tanh[a + b*x]]^4))/((1 + m)*(2 + m)*(3 + m)*(4 + m)*(5 + m))

________________________________________________________________________________________

Maple [A]  time = 0.042, size = 278, normalized size = 1.8 \begin{align*}{\frac{{b}^{4}{x}^{5}{{\rm e}^{m\ln \left ( x \right ) }}}{5+m}}+{\frac{ \left ({a}^{4}+4\,{a}^{3} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) +6\,{a}^{2} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{2}+4\,a \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{3}+ \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{4} \right ) x{{\rm e}^{m\ln \left ( x \right ) }}}{1+m}}+4\,{\frac{b \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}^{2}{{\rm e}^{m\ln \left ( x \right ) }}}{2+m}}+6\,{\frac{{b}^{2} \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}^{3}{{\rm e}^{m\ln \left ( x \right ) }}}{3+m}}+4\,{\frac{{b}^{3} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx \right ){x}^{4}{{\rm e}^{m\ln \left ( x \right ) }}}{4+m}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b^4/(5+m)*x^5*exp(m*ln(x))+(a^4+4*a^3*(arctanh(tanh(b*x+a))-b*x-a)+6*a^2*(arctanh(tanh(b*x+a))-b*x-a)^2+4*a*(a
rctanh(tanh(b*x+a))-b*x-a)^3+(arctanh(tanh(b*x+a))-b*x-a)^4)/(1+m)*x*exp(m*ln(x))+4*b*(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)/(2+m)*x^2*exp(m*ln(x))+6*b^
2*(a^2+2*a*(arctanh(tanh(b*x+a))-b*x-a)+(arctanh(tanh(b*x+a))-b*x-a)^2)/(3+m)*x^3*exp(m*ln(x))+4*b^3*(arctanh(
tanh(b*x+a))-b*x)/(4+m)*x^4*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))^4,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.593, size = 1076, normalized size = 6.99 \begin{align*} \frac{{\left ({\left (b^{4} m^{4} + 10 \, b^{4} m^{3} + 35 \, b^{4} m^{2} + 50 \, b^{4} m + 24 \, b^{4}\right )} x^{5} + 4 \,{\left (a b^{3} m^{4} + 11 \, a b^{3} m^{3} + 41 \, a b^{3} m^{2} + 61 \, a b^{3} m + 30 \, a b^{3}\right )} x^{4} + 6 \,{\left (a^{2} b^{2} m^{4} + 12 \, a^{2} b^{2} m^{3} + 49 \, a^{2} b^{2} m^{2} + 78 \, a^{2} b^{2} m + 40 \, a^{2} b^{2}\right )} x^{3} + 4 \,{\left (a^{3} b m^{4} + 13 \, a^{3} b m^{3} + 59 \, a^{3} b m^{2} + 107 \, a^{3} b m + 60 \, a^{3} b\right )} x^{2} +{\left (a^{4} m^{4} + 14 \, a^{4} m^{3} + 71 \, a^{4} m^{2} + 154 \, a^{4} m + 120 \, a^{4}\right )} x\right )} \cosh \left (m \log \left (x\right )\right ) +{\left ({\left (b^{4} m^{4} + 10 \, b^{4} m^{3} + 35 \, b^{4} m^{2} + 50 \, b^{4} m + 24 \, b^{4}\right )} x^{5} + 4 \,{\left (a b^{3} m^{4} + 11 \, a b^{3} m^{3} + 41 \, a b^{3} m^{2} + 61 \, a b^{3} m + 30 \, a b^{3}\right )} x^{4} + 6 \,{\left (a^{2} b^{2} m^{4} + 12 \, a^{2} b^{2} m^{3} + 49 \, a^{2} b^{2} m^{2} + 78 \, a^{2} b^{2} m + 40 \, a^{2} b^{2}\right )} x^{3} + 4 \,{\left (a^{3} b m^{4} + 13 \, a^{3} b m^{3} + 59 \, a^{3} b m^{2} + 107 \, a^{3} b m + 60 \, a^{3} b\right )} x^{2} +{\left (a^{4} m^{4} + 14 \, a^{4} m^{3} + 71 \, a^{4} m^{2} + 154 \, a^{4} m + 120 \, a^{4}\right )} x\right )} \sinh \left (m \log \left (x\right )\right )}{m^{5} + 15 \, m^{4} + 85 \, m^{3} + 225 \, m^{2} + 274 \, m + 120} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(((b^4*m^4 + 10*b^4*m^3 + 35*b^4*m^2 + 50*b^4*m + 24*b^4)*x^5 + 4*(a*b^3*m^4 + 11*a*b^3*m^3 + 41*a*b^3*m^2 + 6
1*a*b^3*m + 30*a*b^3)*x^4 + 6*(a^2*b^2*m^4 + 12*a^2*b^2*m^3 + 49*a^2*b^2*m^2 + 78*a^2*b^2*m + 40*a^2*b^2)*x^3
+ 4*(a^3*b*m^4 + 13*a^3*b*m^3 + 59*a^3*b*m^2 + 107*a^3*b*m + 60*a^3*b)*x^2 + (a^4*m^4 + 14*a^4*m^3 + 71*a^4*m^
2 + 154*a^4*m + 120*a^4)*x)*cosh(m*log(x)) + ((b^4*m^4 + 10*b^4*m^3 + 35*b^4*m^2 + 50*b^4*m + 24*b^4)*x^5 + 4*
(a*b^3*m^4 + 11*a*b^3*m^3 + 41*a*b^3*m^2 + 61*a*b^3*m + 30*a*b^3)*x^4 + 6*(a^2*b^2*m^4 + 12*a^2*b^2*m^3 + 49*a
^2*b^2*m^2 + 78*a^2*b^2*m + 40*a^2*b^2)*x^3 + 4*(a^3*b*m^4 + 13*a^3*b*m^3 + 59*a^3*b*m^2 + 107*a^3*b*m + 60*a^
3*b)*x^2 + (a^4*m^4 + 14*a^4*m^3 + 71*a^4*m^2 + 154*a^4*m + 120*a^4)*x)*sinh(m*log(x)))/(m^5 + 15*m^4 + 85*m^3
 + 225*m^2 + 274*m + 120)

________________________________________________________________________________________

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))**4,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 )^{4}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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