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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2191, 2188, 29} \begin {gather*} \frac {\log \left (\coth ^{-1}(\tanh (a+b x))\right )}{b x-\coth ^{-1}(\tanh (a+b x))}-\frac {\log (x)}{b x-\coth ^{-1}(\tanh (a+b x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/(x*ArcCoth[Tanh[a + b*x]]),x]

[Out]

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

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 2191

Int[1/((u_)*(v_)), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Simplify[D[v, x]]}, Dist[b/(b*u - a*v), Int[1
/v, x], x] - Dist[a/(b*u - a*v), Int[1/u, x], x] /; NeQ[b*u - a*v, 0]] /; PiecewiseLinearQ[u, v, x]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[1/(x*ArcCoth[Tanh[a + b*x]]),x]

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 8.69, size = 972, normalized size = 22.09

method result size
risch \(-\frac {4 i \ln \left (\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 )-\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 \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2}+2 \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}+\pi \mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )-2 \pi \,\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2}+\pi \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3}-\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}+\pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}+4 i b x +4 i \left (\ln \left ({\mathrm e}^{b x +a}\right )-b x -a \right )+4 i a +2 \pi \right )}{\pi \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3}-2 \pi \,\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2}-\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}+\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 )+\pi \mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )+\pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}-\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 \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}-4 i b x -2 \pi \mathrm {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 }+\frac {4 i \ln \left (x \right )}{\pi \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3}-2 \pi \,\mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right ) \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2}-\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}+\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 )+\pi \mathrm {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )+\pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}-\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 \pi \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3}-4 i b x -2 \pi \mathrm {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 }\) \(972\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*I/(Pi*csgn(I*exp(2*b*x+2*a))^3-2*Pi*csgn(I*exp(b*x+a))*csgn(I*exp(2*b*x+2*a))^2-Pi*csgn(I*exp(2*b*x+2*a))*c
sgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^2+Pi*csgn(I/(exp(2*b*x+2*a)+1))*csgn(I*exp(2*b*x+2*a))*csgn(I*exp(2*b
*x+2*a)/(exp(2*b*x+2*a)+1))+Pi*csgn(I*exp(b*x+a))^2*csgn(I*exp(2*b*x+2*a))+Pi*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x
+2*a)+1))^3-Pi*csgn(I/(exp(2*b*x+2*a)+1))*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^2+2*Pi*csgn(I/(exp(2*b*x+2
*a)+1))^3-4*I*b*x-2*Pi*csgn(I/(exp(2*b*x+2*a)+1))^2+4*I*ln(exp(b*x+a))+2*Pi)*ln(Pi*csgn(I/(exp(2*b*x+2*a)+1))*
csgn(I*exp(2*b*x+2*a))*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))-Pi*csgn(I/(exp(2*b*x+2*a)+1))*csgn(I*exp(2*b*
x+2*a)/(exp(2*b*x+2*a)+1))^2-2*Pi*csgn(I/(exp(2*b*x+2*a)+1))^2+2*Pi*csgn(I/(exp(2*b*x+2*a)+1))^3+Pi*csgn(I*exp
(b*x+a))^2*csgn(I*exp(2*b*x+2*a))-2*Pi*csgn(I*exp(b*x+a))*csgn(I*exp(2*b*x+2*a))^2+Pi*csgn(I*exp(2*b*x+2*a))^3
-Pi*csgn(I*exp(2*b*x+2*a))*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^2+Pi*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a
)+1))^3+4*I*b*x+4*I*(ln(exp(b*x+a))-b*x-a)+4*I*a+2*Pi)+4*I/(Pi*csgn(I*exp(2*b*x+2*a))^3-2*Pi*csgn(I*exp(b*x+a)
)*csgn(I*exp(2*b*x+2*a))^2-Pi*csgn(I*exp(2*b*x+2*a))*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^2+Pi*csgn(I/(ex
p(2*b*x+2*a)+1))*csgn(I*exp(2*b*x+2*a))*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))+Pi*csgn(I*exp(b*x+a))^2*csgn
(I*exp(2*b*x+2*a))+Pi*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^3-Pi*csgn(I/(exp(2*b*x+2*a)+1))*csgn(I*exp(2*b
*x+2*a)/(exp(2*b*x+2*a)+1))^2+2*Pi*csgn(I/(exp(2*b*x+2*a)+1))^3-4*I*b*x-2*Pi*csgn(I/(exp(2*b*x+2*a)+1))^2+4*I*
ln(exp(b*x+a))+2*Pi)*ln(x)

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.53, size = 37, normalized size = 0.84 \begin {gather*} \frac {2 \, \log \left (-i \, \pi + 2 \, b x + 2 \, a\right )}{i \, \pi - 2 \, a} - \frac {2 \, \log \left (x\right )}{i \, \pi - 2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 87, normalized size = 1.98 \begin {gather*} -\frac {2 \, {\left (2 \, \pi \arctan \left (-\frac {2 \, b x + 2 \, a - \sqrt {4 \, b^{2} x^{2} + 8 \, a b x + \pi ^{2} + 4 \, a^{2}}}{\pi }\right ) + a \log \left (4 \, b^{2} x^{2} + 8 \, a b x + \pi ^{2} + 4 \, a^{2}\right ) - 2 \, a \log \left (x\right )\right )}}{\pi ^{2} + 4 \, a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*(2*pi*arctan(-(2*b*x + 2*a - sqrt(4*b^2*x^2 + 8*a*b*x + pi^2 + 4*a^2))/pi) + a*log(4*b^2*x^2 + 8*a*b*x + pi
^2 + 4*a^2) - 2*a*log(x))/(pi^2 + 4*a^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{x \operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(1/(x*acoth(tanh(a + b*x))), x)

________________________________________________________________________________________

Giac [C] Result contains complex when optimal does not.
time = 0.41, size = 33, normalized size = 0.75 \begin {gather*} \frac {2 \, \log \left (\pi - 2 i \, b x - 2 i \, a\right )}{-i \, \pi - 2 \, a} - \frac {2 i \, \log \left (x\right )}{\pi - 2 i \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 2.91, size = 113, normalized size = 2.57 \begin {gather*} -\frac {4\,\mathrm {atanh}\left (\frac {4\,b\,x}{\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}-1\right )}{\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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(4*atanh((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) - 1))/(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)

________________________________________________________________________________________