3.1.59 \(\int \frac {\tanh ^{-1}(\tanh (a+b x))^3}{x} \, dx\) [59]

Optimal. Leaf size=77 \[ b x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2-\frac {1}{2} \left (b x-\tanh ^{-1}(\tanh (a+b x))\right ) \tanh ^{-1}(\tanh (a+b x))^2+\frac {1}{3} \tanh ^{-1}(\tanh (a+b x))^3-\left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3 \log (x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2190, 2189, 29} \begin {gather*} b x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2-\frac {1}{2} \tanh ^{-1}(\tanh (a+b x))^2 \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )+\frac {1}{3} \tanh ^{-1}(\tanh (a+b x))^3-\log (x) \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

b*x*(b*x - ArcTanh[Tanh[a + b*x]])^2 - ((b*x - ArcTanh[Tanh[a + b*x]])*ArcTanh[Tanh[a + b*x]]^2)/2 + ArcTanh[T
anh[a + b*x]]^3/3 - (b*x - ArcTanh[Tanh[a + b*x]])^3*Log[x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 2189

Int[(v_)/(u_), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Simplify[D[v, x]]}, Simp[b*(x/a), x] - Dist[(b*u
- a*v)/a, Int[1/u, x], x] /; NeQ[b*u - a*v, 0]] /; PiecewiseLinearQ[u, v, x]

Rule 2190

Int[(v_)^(n_)/(u_), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Simplify[D[v, x]]}, Simp[v^n/(a*n), x] - Dis
t[(b*u - a*v)/a, Int[v^(n - 1)/u, x], x] /; NeQ[b*u - a*v, 0]] /; PiecewiseLinearQ[u, v, x] && GtQ[n, 0] && Ne
Q[n, 1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 104, normalized size = 1.35 \begin {gather*} \frac {1}{3} (a+b x)^3+(a+b x) \left (a^2-3 a \left (a+b x-\tanh ^{-1}(\tanh (a+b x))\right )+3 \left (a+b x-\tanh ^{-1}(\tanh (a+b x))\right )^2\right )-\frac {1}{2} (a+b x)^2 \left (2 a+3 b x-3 \tanh ^{-1}(\tanh (a+b x))\right )+\left (-b x+\tanh ^{-1}(\tanh (a+b x))\right )^3 \log (b x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(187\) vs. \(2(73)=146\).
time = 0.43, size = 188, normalized size = 2.44

method result size
default \(\ln \left (x \right ) \arctanh \left (\tanh \left (b x +a \right )\right )^{3}-3 b \left (\frac {b^{2} x^{3} \ln \left (x \right )}{3}-\frac {b^{2} x^{3}}{9}+a b \,x^{2} \ln \left (x \right )-\frac {a b \,x^{2}}{2}+b \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right ) x^{2} \ln \left (x \right )-\frac {b \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right ) x^{2}}{2}+\ln \left (x \right ) x \,a^{2}-x \,a^{2}+2 \ln \left (x \right ) x a \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )-2 x a \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )+\ln \left (x \right ) x \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2}-x \left (\arctanh \left (\tanh \left (b x +a \right )\right )-b x -a \right )^{2}\right )\) \(188\)
risch \(\text {Expression too large to display}\) \(10482\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.66, size = 31, normalized size = 0.40 \begin {gather*} \frac {1}{3} \, b^{3} x^{3} + \frac {3}{2} \, a b^{2} x^{2} + 3 \, a^{2} b x + a^{3} \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 31, normalized size = 0.40 \begin {gather*} \frac {1}{3} \, b^{3} x^{3} + \frac {3}{2} \, a b^{2} x^{2} + 3 \, a^{2} b x + a^{3} \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {atanh}^{3}{\left (\tanh {\left (a + b x \right )} \right )}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(atanh(tanh(a + b*x))**3/x, x)

________________________________________________________________________________________

Giac [A]
time = 0.37, size = 32, normalized size = 0.42 \begin {gather*} \frac {1}{3} \, b^{3} x^{3} + \frac {3}{2} \, a b^{2} x^{2} + 3 \, a^{2} b x + a^{3} \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*b^3*x^3 + 3/2*a*b^2*x^2 + 3*a^2*b*x + a^3*log(abs(x))

________________________________________________________________________________________

Mupad [B]
time = 0.14, size = 306, normalized size = 3.97 \begin {gather*} \frac {b^3\,x^3}{3}-\ln \left (x\right )\,\left (\frac {{\left (2\,a-\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 )+2\,b\,x\right )}^3}{8}-a^3-\frac {3\,a\,{\left (2\,a-\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 )+2\,b\,x\right )}^2}{4}+\frac {3\,a^2\,\left (2\,a-\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 )+2\,b\,x\right )}{2}\right )-\frac {3\,b^2\,x^2\,\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 )}{4}+\frac {3\,b\,x\,{\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}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b^3*x^3)/3 - log(x)*((2*a - 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)) + 2*b*x)^3/8 - a^3 - (3*a*(2*a - 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)) + 2*b*x)^2)/4 + (3*a^2*(2*a - log((2*exp(2*a)*exp(2*b*x))/(exp(2*a)*exp(2*b*x) + 1)) + l
og(2/(exp(2*a)*exp(2*b*x) + 1)) + 2*b*x))/2) - (3*b^2*x^2*(log(2/(exp(2*a)*exp(2*b*x) + 1)) - log((2*exp(2*a)*
exp(2*b*x))/(exp(2*a)*exp(2*b*x) + 1)) + 2*b*x))/4 + (3*b*x*(log(2/(exp(2*a)*exp(2*b*x) + 1)) - log((2*exp(2*a
)*exp(2*b*x))/(exp(2*a)*exp(2*b*x) + 1)) + 2*b*x)^2)/4

________________________________________________________________________________________