3.3.70 \(\int \tanh ^{-1}(\tanh (a+b x))^n \, dx\) [270]

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

[Out]

arctanh(tanh(b*x+a))^(1+n)/b/(1+n)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2188, 30} \begin {gather*} \frac {\tanh ^{-1}(\tanh (a+b x))^{n+1}}{b (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 30

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

Rule 2188

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]

Rubi steps

\begin {align*} \int \tanh ^{-1}(\tanh (a+b x))^n \, dx &=\frac {\text {Subst}\left (\int x^n \, dx,x,\tanh ^{-1}(\tanh (a+b x))\right )}{b}\\ &=\frac {\tanh ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 20, normalized size = 1.00 \begin {gather*} \frac {\tanh ^{-1}(\tanh (a+b x))^{1+n}}{b (1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.37, size = 21, normalized size = 1.05

method result size
derivativedivides \(\frac {\arctanh \left (\tanh \left (b x +a \right )\right )^{1+n}}{b \left (1+n \right )}\) \(21\)
default \(\frac {\arctanh \left (\tanh \left (b x +a \right )\right )^{1+n}}{b \left (1+n \right )}\) \(21\)
risch \(\frac {\left (\frac {1}{2}\right )^{n} \left (2 \ln \left ({\mathrm e}^{b x +a}\right )-\frac {i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \left (-\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )+\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )\right )^{2}}{2}-\frac {i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right ) \left (-\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )\right ) \left (-\mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )\right )}{2}\right )^{1+n}}{2 b \left (1+n \right )}\) \(191\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctanh(tanh(b*x+a))^(1+n)/b/(1+n)

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 21, normalized size = 1.05 \begin {gather*} \frac {{\left (b x + a\right )} {\left (b x + a\right )}^{n}}{b {\left (n + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*x + a)*(b*x + a)^n/(b*(n + 1))

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 39, normalized size = 1.95 \begin {gather*} \frac {{\left (b x + a\right )} \cosh \left (n \log \left (b x + a\right )\right ) + {\left (b x + a\right )} \sinh \left (n \log \left (b x + a\right )\right )}{b n + b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((b*x + a)*cosh(n*log(b*x + a)) + (b*x + a)*sinh(n*log(b*x + a)))/(b*n + b)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (15) = 30\).
time = 0.20, size = 51, normalized size = 2.55 \begin {gather*} \begin {cases} \frac {x}{\operatorname {atanh}{\left (\tanh {\left (a \right )} \right )}} & \text {for}\: b = 0 \wedge n = -1 \\x \operatorname {atanh}^{n}{\left (\tanh {\left (a \right )} \right )} & \text {for}\: b = 0 \\\frac {\log {\left (\operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )} \right )}}{b} & \text {for}\: n = -1 \\\frac {\operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )} \operatorname {atanh}^{n}{\left (\tanh {\left (a + b x \right )} \right )}}{b n + b} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((x/atanh(tanh(a)), Eq(b, 0) & Eq(n, -1)), (x*atanh(tanh(a))**n, Eq(b, 0)), (log(atanh(tanh(a + b*x))
)/b, Eq(n, -1)), (atanh(tanh(a + b*x))*atanh(tanh(a + b*x))**n/(b*n + b), True))

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 28, normalized size = 1.40 \begin {gather*} \frac {{\left (b x + a\right )}^{n} b x + {\left (b x + a\right )}^{n} a}{b n + b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((b*x + a)^n*b*x + (b*x + a)^n*a)/(b*n + b)

________________________________________________________________________________________

Mupad [B]
time = 1.18, size = 121, normalized size = 6.05 \begin {gather*} {\left (\frac {1}{2}\right )}^n\,\left (\frac {x}{n+1}-\frac {\frac {\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )}{2}-\frac {\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}{b\,\left (n+1\right )}\right )\,{\left (\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )-\ln \left (\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+1}\right )\right )}^n \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________