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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2168, 30} \[ \frac {x^{m+1} \tanh ^{-1}(\tanh (a+b x))}{m+1}-\frac {b x^{m+2}}{m^2+3 m+2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 30

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

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]))

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 34, normalized size = 0.92 \[ x^m \left (\frac {x \left (\tanh ^{-1}(\tanh (a+b x))-b x\right )}{m+1}+\frac {b x^2}{m+2}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 62, normalized size = 1.68 \[ \frac {{\left ({\left (b m + b\right )} x^{2} + {\left (a m + 2 \, a\right )} x\right )} \cosh \left (m \log \relax (x)\right ) + {\left ({\left (b m + b\right )} x^{2} + {\left (a m + 2 \, a\right )} x\right )} \sinh \left (m \log \relax (x)\right )}{m^{2} + 3 \, m + 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.32, size = 43, normalized size = 1.16 \[ \frac {b m x^{2} x^{m} + a m x x^{m} + b x^{2} x^{m} + 2 \, a x x^{m}}{m^{2} + 3 \, m + 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*m*x^2*x^m + a*m*x*x^m + b*x^2*x^m + 2*a*x*x^m)/(m^2 + 3*m + 2)

________________________________________________________________________________________

maple [A]  time = 0.15, size = 41, normalized size = 1.11 \[ \frac {b \,x^{2} {\mathrm e}^{m \ln \relax (x )}}{2+m}+\frac {\left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x \right ) x \,{\mathrm e}^{m \ln \relax (x )}}{1+m} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 38, normalized size = 1.03 \[ -\frac {b x^{2} x^{m}}{{\left (m + 2\right )} {\left (m + 1\right )}} + \frac {x^{m + 1} \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )}{m + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-b*x^2*x^m/((m + 2)*(m + 1)) + x^(m + 1)*arctanh(tanh(b*x + a))/(m + 1)

________________________________________________________________________________________

mupad [B]  time = 1.49, size = 96, normalized size = 2.59 \[ \frac {2\,b\,x^m\,x^2\,\left (m+1\right )}{2\,m^2+6\,m+4}-\frac {x\,x^m\,\left (m+2\right )\,\left (\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )+2\,b\,x\right )}{2\,m^2+6\,m+4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2*b*x^m*x^2*(m + 1))/(6*m + 2*m^2 + 4) - (x*x^m*(m + 2)*(log(2/(exp(2*a)*exp(2*b*x) + 1)) - log((2*exp(2*a)*e
xp(2*b*x))/(exp(2*a)*exp(2*b*x) + 1)) + 2*b*x))/(6*m + 2*m^2 + 4)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \begin {cases} b \log {\relax (x )} - \frac {\operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{x} & \text {for}\: m = -2 \\\int \frac {\operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{x}\, dx & \text {for}\: m = -1 \\- \frac {b x^{2} x^{m}}{m^{2} + 3 m + 2} + \frac {m x x^{m} \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{2} + 3 m + 2} + \frac {2 x x^{m} \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{m^{2} + 3 m + 2} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((b*log(x) - atanh(tanh(a + b*x))/x, Eq(m, -2)), (Integral(atanh(tanh(a + b*x))/x, x), Eq(m, -1)), (-
b*x**2*x**m/(m**2 + 3*m + 2) + m*x*x**m*atanh(tanh(a + b*x))/(m**2 + 3*m + 2) + 2*x*x**m*atanh(tanh(a + b*x))/
(m**2 + 3*m + 2), True))

________________________________________________________________________________________