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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [C] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [C] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 28 \[ \int \frac {x}{\coth ^{-1}(\tanh (a+b x))^2} \, dx=-\frac {x}{b \coth ^{-1}(\tanh (a+b x))}+\frac {\log \left (\coth ^{-1}(\tanh (a+b x))\right )}{b^2} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2199, 2188, 29} \[ \int \frac {x}{\coth ^{-1}(\tanh (a+b x))^2} \, dx=\frac {\log \left (\coth ^{-1}(\tanh (a+b x))\right )}{b^2}-\frac {x}{b \coth ^{-1}(\tanh (a+b x))} \]

[In]

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

[Out]

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

Rule 29

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

Rule 2188

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {x}{\coth ^{-1}(\tanh (a+b x))^2} \, dx=\frac {1-\frac {b x}{\coth ^{-1}(\tanh (a+b x))}+\log \left (\coth ^{-1}(\tanh (a+b x))\right )}{b^2} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.25

method result size
parallelrisch \(\frac {\ln \left (\operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )\right ) \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )-b x}{b^{2} \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )}\) \(35\)
risch \(-\frac {4 i x}{b \left (\pi \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3}-2 \pi \,\operatorname {csgn}\left (i {\mathrm e}^{b x +a}\right ) \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2}-\pi \,\operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+\pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )+\pi \operatorname {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )+\pi \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}-\pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+2 \pi \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}-2 \pi \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+4 i \ln \left ({\mathrm e}^{b x +a}\right )+2 \pi \right )}+\frac {\ln \left (\ln \left ({\mathrm e}^{b x +a}\right )-\frac {i \pi \left (\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )-\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+2 \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}-2 \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+\operatorname {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )-2 \,\operatorname {csgn}\left (i {\mathrm e}^{b x +a}\right ) \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2}+\operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3}-\operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+\operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}+2\right )}{4}\right )}{b^{2}}\) \(625\)

[In]

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

[Out]

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

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.26 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.89 \[ \int \frac {x}{\coth ^{-1}(\tanh (a+b x))^2} \, dx=\frac {i \, \pi + {\left (i \, \pi + 2 \, b x + 2 \, a\right )} \log \left (i \, \pi + 2 \, b x + 2 \, a\right ) + 2 \, a}{2 \, b^{3} x + i \, \pi b^{2} + 2 \, a b^{2}} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 12.37 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.29 \[ \int \frac {x}{\coth ^{-1}(\tanh (a+b x))^2} \, dx=\begin {cases} - \frac {x}{b \operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}} + \frac {\log {\left (\operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )} \right )}}{b^{2}} & \text {for}\: b \neq 0 \\\frac {x^{2}}{2 \operatorname {acoth}^{2}{\left (\tanh {\left (a \right )} \right )}} & \text {otherwise} \end {cases} \]

[In]

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

[Out]

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

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.54 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.64 \[ \int \frac {x}{\coth ^{-1}(\tanh (a+b x))^2} \, dx=\frac {-i \, \pi + 2 \, a}{2 \, b^{3} x - i \, \pi b^{2} + 2 \, a b^{2}} + \frac {\log \left (-i \, \pi + 2 \, b x + 2 \, a\right )}{b^{2}} \]

[In]

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

[Out]

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

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.29 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.68 \[ \int \frac {x}{\coth ^{-1}(\tanh (a+b x))^2} \, dx=-\frac {-i \, \pi - 2 \, a}{2 \, b^{3} x + i \, \pi b^{2} + 2 \, a b^{2}} + \frac {\log \left (i \, \pi + 2 \, b x + 2 \, a\right )}{b^{2}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00 \[ \int \frac {x}{\coth ^{-1}(\tanh (a+b x))^2} \, dx=\frac {\ln \left (\mathrm {acoth}\left (\mathrm {tanh}\left (a+b\,x\right )\right )\right )}{b^2}-\frac {x}{b\,\mathrm {acoth}\left (\mathrm {tanh}\left (a+b\,x\right )\right )} \]

[In]

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

[Out]

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