3.51 \(\int \frac {\tanh ^{-1}(\tanh (a+b x))^2}{x^3} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2168, 29} \[ -\frac {\tanh ^{-1}(\tanh (a+b x))^2}{2 x^2}-\frac {b \tanh ^{-1}(\tanh (a+b x))}{x}+b^2 \log (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 42, normalized size = 1.17 \[ -\frac {2 b x \tanh ^{-1}(\tanh (a+b x))+\tanh ^{-1}(\tanh (a+b x))^2-b^2 x^2 (2 \log (x)+3)}{2 x^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 26, normalized size = 0.72 \[ \frac {2 \, b^{2} x^{2} \log \relax (x) - 4 \, a b x - a^{2}}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 22, normalized size = 0.61 \[ b^{2} \log \left ({\left | x \right |}\right ) - \frac {4 \, a b x + a^{2}}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.15, size = 35, normalized size = 0.97 \[ -\frac {b \arctanh \left (\tanh \left (b x +a \right )\right )}{x}-\frac {\arctanh \left (\tanh \left (b x +a \right )\right )^{2}}{2 x^{2}}+b^{2} \ln \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 34, normalized size = 0.94 \[ b^{2} \log \relax (x) - \frac {b \operatorname {artanh}\left (\tanh \left (b x + a\right )\right )}{x} - \frac {\operatorname {artanh}\left (\tanh \left (b x + a\right )\right )^{2}}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.93, size = 34, normalized size = 0.94 \[ b^2\,\ln \relax (x)-\frac {\frac {{\mathrm {atanh}\left (\mathrm {tanh}\left (a+b\,x\right )\right )}^2}{2}+b\,x\,\mathrm {atanh}\left (\mathrm {tanh}\left (a+b\,x\right )\right )}{x^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b^2*log(x) - (atanh(tanh(a + b*x))^2/2 + b*x*atanh(tanh(a + b*x)))/x^2

________________________________________________________________________________________

sympy [A]  time = 0.52, size = 32, normalized size = 0.89 \[ b^{2} \log {\relax (x )} - \frac {b \operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{x} - \frac {\operatorname {atanh}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b**2*log(x) - b*atanh(tanh(a + b*x))/x - atanh(tanh(a + b*x))**2/(2*x**2)

________________________________________________________________________________________