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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0140836, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {2168, 2157, 29} \[ \frac{\log \left (\tanh ^{-1}(\tanh (a+b x))\right )}{b^2}-\frac{x}{b \tanh ^{-1}(\tanh (a+b x))} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]))

Rule 2157

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]

Rule 29

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

Rubi steps

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

Mathematica [A]  time = 0.0508815, size = 27, normalized size = 0.96 \[ \frac{-\frac{b x}{\tanh ^{-1}(\tanh (a+b x))}+\log \left (\tanh ^{-1}(\tanh (a+b x))\right )+1}{b^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 56, normalized size = 2. \begin{align*}{\frac{\ln \left ({\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) \right ) }{{b}^{2}}}+{\frac{a}{{b}^{2}{\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) }}+{\frac{{\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) -bx-a}{{b}^{2}{\it Artanh} \left ( \tanh \left ( bx+a \right ) \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 2.44653, size = 35, normalized size = 1.25 \begin{align*} \frac{a}{b^{3} x + a b^{2}} + \frac{\log \left (b x + a\right )}{b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.50046, size = 62, normalized size = 2.21 \begin{align*} \frac{{\left (b x + a\right )} \log \left (b x + a\right ) + a}{b^{3} x + a b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 15.1792, size = 36, normalized size = 1.29 \begin{align*} \begin{cases} - \frac{x}{b \operatorname{atanh}{\left (\tanh{\left (a + b x \right )} \right )}} + \frac{\log{\left (\operatorname{atanh}{\left (\tanh{\left (a + b x \right )} \right )} \right )}}{b^{2}} & \text{for}\: b \neq 0 \\\frac{x^{2}}{2 \operatorname{atanh}^{2}{\left (\tanh{\left (a \right )} \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((-x/(b*atanh(tanh(a + b*x))) + log(atanh(tanh(a + b*x)))/b**2, Ne(b, 0)), (x**2/(2*atanh(tanh(a))**2
), True))

________________________________________________________________________________________

Giac [A]  time = 1.12223, size = 32, normalized size = 1.14 \begin{align*} \frac{\log \left ({\left | b x + a \right |}\right )}{b^{2}} + \frac{a}{{\left (b x + a\right )} b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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