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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2159, 2158, 29} \[ -b x \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^3+\frac {1}{2} \tanh ^{-1}(\tanh (a+b x))^2 \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^2-\frac {1}{3} \tanh ^{-1}(\tanh (a+b x))^3 \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )+\frac {1}{4} \tanh ^{-1}(\tanh (a+b x))^4+\log (x) \left (b x-\tanh ^{-1}(\tanh (a+b x))\right )^4 \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

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

Rule 2158

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 2159

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

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 175, normalized size = 1.67 \[ \frac {1}{2} (a+b x)^2 \left (a^2-4 a \left (-\tanh ^{-1}(\tanh (a+b x))+a+b x\right )+6 \left (-\tanh ^{-1}(\tanh (a+b x))+a+b x\right )^2\right )+(a+b x) \left (a^3-4 a^2 \left (-\tanh ^{-1}(\tanh (a+b x))+a+b x\right )+6 a \left (-\tanh ^{-1}(\tanh (a+b x))+a+b x\right )^2-4 \left (-\tanh ^{-1}(\tanh (a+b x))+a+b x\right )^3\right )+\frac {1}{4} (a+b x)^4-\frac {1}{3} (a+b x)^3 \left (-4 \tanh ^{-1}(\tanh (a+b x))+3 a+4 b x\right )+\log (b x) \left (\tanh ^{-1}(\tanh (a+b x))-b x\right )^4 \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 42, normalized size = 0.40 \[ \frac {1}{4} \, b^{4} x^{4} + \frac {4}{3} \, a b^{3} x^{3} + 3 \, a^{2} b^{2} x^{2} + 4 \, a^{3} b x + a^{4} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.21, size = 43, normalized size = 0.41 \[ \frac {1}{4} \, b^{4} x^{4} + \frac {4}{3} \, a b^{3} x^{3} + 3 \, a^{2} b^{2} x^{2} + 4 \, a^{3} b x + a^{4} \log \left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.17, size = 127, normalized size = 1.21 \[ \ln \relax (x ) \arctanh \left (\tanh \left (b x +a \right )\right )^{4}-4 \arctanh \left (\tanh \left (b x +a \right )\right ) \ln \relax (x ) x^{3} b^{3}+6 \arctanh \left (\tanh \left (b x +a \right )\right )^{2} \ln \relax (x ) x^{2} b^{2}+4 b \arctanh \left (\tanh \left (b x +a \right )\right )^{3} x +b^{4} x^{4} \ln \relax (x )-\frac {25 b^{4} x^{4}}{12}-4 b \arctanh \left (\tanh \left (b x +a \right )\right )^{3} \ln \relax (x ) x -9 \arctanh \left (\tanh \left (b x +a \right )\right )^{2} x^{2} b^{2}+\frac {22 \arctanh \left (\tanh \left (b x +a \right )\right ) x^{3} b^{3}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

ln(x)*arctanh(tanh(b*x+a))^4-4*arctanh(tanh(b*x+a))*ln(x)*x^3*b^3+6*arctanh(tanh(b*x+a))^2*ln(x)*x^2*b^2+4*b*a
rctanh(tanh(b*x+a))^3*x+b^4*x^4*ln(x)-25/12*b^4*x^4-4*b*arctanh(tanh(b*x+a))^3*ln(x)*x-9*arctanh(tanh(b*x+a))^
2*x^2*b^2+22/3*arctanh(tanh(b*x+a))*x^3*b^3

________________________________________________________________________________________

maxima [A]  time = 0.72, size = 42, normalized size = 0.40 \[ \frac {1}{4} \, b^{4} x^{4} + \frac {4}{3} \, a b^{3} x^{3} + 3 \, a^{2} b^{2} x^{2} + 4 \, a^{3} b x + a^{4} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 423, normalized size = 4.03 \[ \ln \relax (x)\,\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 )}^4}{16}+\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}{2}+a^4-\frac {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 )}^3}{2}-2\,a^3\,\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 )\right )+\frac {b^4\,x^4}{4}-\frac {2\,b^3\,x^3\,\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 )}{3}+\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 )}^2}{4}-\frac {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 )}^3}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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)^4/16 + (3*a^2*(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)/2 + a^4 - (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)^3)/2 - 2*a^3*(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)) + (b^4*x^4)/4 - (2*b^3*x^3*(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))/3 + (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)^2)/4 - (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)^3)/2

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {atanh}^{4}{\left (\tanh {\left (a + b x \right )} \right )}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________