3.1.41 \(\int \frac {\tanh ^{-1}(\tanh (a+b x))}{x^2} \, dx\) [41]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 17, 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 = {2199, 29} \begin {gather*} b \log (x)-\frac {\tanh ^{-1}(\tanh (a+b x))}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

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

Rule 2199

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

b - ArcTanh[Tanh[a + b*x]]/x + b*Log[x]

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 18, normalized size = 1.06

method result size
default \(-\frac {\arctanh \left (\tanh \left (b x +a \right )\right )}{x}+b \ln \left (x \right )\) \(18\)
risch \(-\frac {\ln \left ({\mathrm e}^{b x +a}\right )}{x}+\frac {i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}+i \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+i \pi \mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )+i \pi \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3}-i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}-i \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}-2 i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2}+4 \ln \left (x \right ) x b}{4 x}\) \(289\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 17, normalized size = 1.00 \begin {gather*} b \log \left (x\right ) - \frac {\operatorname {artanh}\left (\tanh \left (b x + a\right )\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 13, normalized size = 0.76 \begin {gather*} \frac {b x \log \left (x\right ) - a}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*x*log(x) - a)/x

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 14, normalized size = 0.82 \begin {gather*} b \log {\left (x \right )} - \frac {\operatorname {atanh}{\left (\tanh {\left (a + b x \right )} \right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.38, size = 12, normalized size = 0.71 \begin {gather*} b \log \left ({\left | x \right |}\right ) - \frac {a}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b*log(abs(x)) - a/x

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 17, normalized size = 1.00 \begin {gather*} b\,\ln \left (x\right )-\frac {\mathrm {atanh}\left (\mathrm {tanh}\left (a+b\,x\right )\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________