3.269 \(\int x \tanh ^{-1}(\tanh (a+b x))^n \, dx\)

Optimal. Leaf size=48 \[ \frac{x \tanh ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac{\tanh ^{-1}(\tanh (a+b x))^{n+2}}{b^2 (n+1) (n+2)} \]

[Out]

(x*ArcTanh[Tanh[a + b*x]]^(1 + n))/(b*(1 + n)) - ArcTanh[Tanh[a + b*x]]^(2 + n)/(b^2*(1 + n)*(2 + n))

________________________________________________________________________________________

Rubi [A]  time = 0.0194814, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {2168, 2157, 30} \[ \frac{x \tanh ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)}-\frac{\tanh ^{-1}(\tanh (a+b x))^{n+2}}{b^2 (n+1) (n+2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(x*ArcTanh[Tanh[a + b*x]]^(1 + n))/(b*(1 + n)) - ArcTanh[Tanh[a + b*x]]^(2 + n)/(b^2*(1 + n)*(2 + n))

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 2157

Int[(u_)^(m_.), x_Symbol] :> With[{c = Simplify[D[u, x]]}, Dist[1/c, Subst[Int[x^m, x], x, u], x]] /; FreeQ[m,
 x] && PiecewiseLinearQ[u, x]

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 \tanh ^{-1}(\tanh (a+b x))^n \, dx &=\frac{x \tanh ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac{\int \tanh ^{-1}(\tanh (a+b x))^{1+n} \, dx}{b (1+n)}\\ &=\frac{x \tanh ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac{\operatorname{Subst}\left (\int x^{1+n} \, dx,x,\tanh ^{-1}(\tanh (a+b x))\right )}{b^2 (1+n)}\\ &=\frac{x \tanh ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}-\frac{\tanh ^{-1}(\tanh (a+b x))^{2+n}}{b^2 (1+n) (2+n)}\\ \end{align*}

Mathematica [A]  time = 0.0422084, size = 41, normalized size = 0.85 \[ \frac{\left (b (n+2) x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))^{n+1}}{b^2 (n+1) (n+2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

((b*(2 + n)*x - ArcTanh[Tanh[a + b*x]])*ArcTanh[Tanh[a + b*x]]^(1 + n))/(b^2*(1 + n)*(2 + n))

________________________________________________________________________________________

Maple [B]  time = 0.042, size = 175, normalized size = 3.7 \begin{align*}{\frac{{x}^{2}{{\rm e}^{n\ln \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) }}}{2+n}}+{\frac{n \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx \right ) x{{\rm e}^{n\ln \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) }}}{b \left ({n}^{2}+3\,n+2 \right ) }}-{\frac{{{\rm e}^{n\ln \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) }}{a}^{2}}{{b}^{2} \left ({n}^{2}+3\,n+2 \right ) }}-2\,{\frac{{{\rm e}^{n\ln \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) }}a \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) }{{b}^{2} \left ({n}^{2}+3\,n+2 \right ) }}-{\frac{{{\rm e}^{n\ln \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) }} \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a \right ) ^{2}}{{b}^{2} \left ({n}^{2}+3\,n+2 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.78231, size = 57, normalized size = 1.19 \begin{align*} \frac{{\left (b^{2}{\left (n + 1\right )} x^{2} + a b n x - a^{2}\right )}{\left (b x + a\right )}^{n}}{{\left (n^{2} + 3 \, n + 2\right )} b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b^2*(n + 1)*x^2 + a*b*n*x - a^2)*(b*x + a)^n/((n^2 + 3*n + 2)*b^2)

________________________________________________________________________________________

Fricas [A]  time = 2.0834, size = 198, normalized size = 4.12 \begin{align*} \frac{{\left (a b n x +{\left (b^{2} n + b^{2}\right )} x^{2} - a^{2}\right )} \cosh \left (n \log \left (b x + a\right )\right ) +{\left (a b n x +{\left (b^{2} n + b^{2}\right )} x^{2} - a^{2}\right )} \sinh \left (n \log \left (b x + a\right )\right )}{b^{2} n^{2} + 3 \, b^{2} n + 2 \, b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((a*b*n*x + (b^2*n + b^2)*x^2 - a^2)*cosh(n*log(b*x + a)) + (a*b*n*x + (b^2*n + b^2)*x^2 - a^2)*sinh(n*log(b*x
 + a)))/(b^2*n^2 + 3*b^2*n + 2*b^2)

________________________________________________________________________________________

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*atanh(tanh(b*x+a))**n,x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [A]  time = 1.162, size = 103, normalized size = 2.15 \begin{align*} \frac{{\left (b x + a\right )}^{n} b^{2} n x^{2} +{\left (b x + a\right )}^{n} a b n x +{\left (b x + a\right )}^{n} b^{2} x^{2} -{\left (b x + a\right )}^{n} a^{2}}{b^{2} n^{2} + 3 \, b^{2} n + 2 \, b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((b*x + a)^n*b^2*n*x^2 + (b*x + a)^n*a*b*n*x + (b*x + a)^n*b^2*x^2 - (b*x + a)^n*a^2)/(b^2*n^2 + 3*b^2*n + 2*b
^2)