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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2159, 2158, 29} \[ -b x \left (b x-\coth ^{-1}(\tanh (a+b x))\right )+\frac {1}{2} \coth ^{-1}(\tanh (a+b x))^2+\log (x) \left (b x-\coth ^{-1}(\tanh (a+b x))\right )^2 \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

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

Rule 2158

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

Rule 2159

Int[(v_)^(n_)/(u_), x_Symbol] :> With[{a = Simplify[D[u, x]], b = Simplify[D[v, x]]}, Simp[v^n/(a*n), x] - Dis
t[(b*u - a*v)/a, Int[v^(n - 1)/u, x], x] /; NeQ[b*u - a*v, 0]] /; PiecewiseLinearQ[u, v, x] && GtQ[n, 0] && Ne
Q[n, 1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 53, normalized size = 1.08 \[ \frac {1}{2} (a+b x)^2-(a+b x) \left (-2 \coth ^{-1}(\tanh (a+b x))+a+2 b x\right )+\log (b x) \left (\coth ^{-1}(\tanh (a+b x))-b x\right )^2 \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 27, normalized size = 0.55 \[ \frac {1}{2} \, b^{2} x^{2} + 2 \, a b x - \frac {1}{4} \, {\left (\pi ^{2} - 4 \, a^{2}\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {arcoth}\left (\tanh \left (b x + a\right )\right )^{2}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.33, size = 3774, normalized size = 77.02 \[ \text {output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-3/2*b^2*x^2+ln(x)*ln(exp(b*x+a))^2-1/2*I*Pi*b*x*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))-1/8*Pi^2*ln(x)*csgn(I*exp(2*b*x+2*a))^3*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1
))^3+1/4*Pi^2*ln(x)*csgn(I/(exp(2*b*x+2*a)+1))^4*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^2+1/8*Pi^2*ln(x)*cs
gn(I/(exp(2*b*x+2*a)+1))*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^5-1/4*Pi^2*ln(x)*csgn(I/(exp(2*b*x+2*a)+1))
^3*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^2-1/16*Pi^2*ln(x)*csgn(I*exp(2*b*x+2*a))^2*csgn(I*exp(2*b*x+2*a)/
(exp(2*b*x+2*a)+1))^4+1/8*Pi^2*ln(x)*csgn(I*exp(2*b*x+2*a))*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^5-1/4*Pi
^2*ln(x)*csgn(I/(exp(2*b*x+2*a)+1))^3*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^3-1/4*Pi^2*ln(x)*csgn(I/(exp(2
*b*x+2*a)+1))^3*csgn(I*exp(2*b*x+2*a))^3+1/4*Pi^2*ln(x)*csgn(I*exp(2*b*x+2*a))^3*csgn(I/(exp(2*b*x+2*a)+1))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b*x+2*a)+1))^2-1
/2*I*Pi*ln(x)*x*b*csgn(I*exp(2*b*x+2*a))*csgn(I*exp(2*b*x+2*a)/(exp(2*b*x+2*a)+1))^2

________________________________________________________________________________________

maxima [C]  time = 0.73, size = 38, normalized size = 0.78 \[ \frac {1}{2} \, b^{2} x^{2} + \frac {1}{8} \, {\left (-8 i \, \pi b + 16 \, a b\right )} x - \frac {1}{4} \, {\left (\pi ^{2} + 4 i \, \pi a - 4 \, a^{2}\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*b^2*x^2 + 1/8*(-8*I*pi*b + 16*a*b)*x - 1/4*(pi^2 + 4*I*pi*a - 4*a^2)*log(x)

________________________________________________________________________________________

mupad [B]  time = 0.29, size = 183, normalized size = 3.73 \[ \ln \relax (x)\,\left (\frac {{\left (2\,a-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+2\,b\,x\right )}^2}{4}-a\,\left (2\,a-\ln \left (\frac {2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+\ln \left (-\frac {2}{{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}-1}\right )+2\,b\,x\right )+a^2\right )+\frac {b^2\,x^2}{2}-b\,x\,\left (\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\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x)*((2*a - log((2*exp(2*a)*exp(2*b*x))/(exp(2*a)*exp(2*b*x) - 1)) + log(-2/(exp(2*a)*exp(2*b*x) - 1)) + 2*
b*x)^2/4 - a*(2*a - log((2*exp(2*a)*exp(2*b*x))/(exp(2*a)*exp(2*b*x) - 1)) + log(-2/(exp(2*a)*exp(2*b*x) - 1))
 + 2*b*x) + a^2) + (b^2*x^2)/2 - 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)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {acoth}^{2}{\left (\tanh {\left (a + b x \right )} \right )}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________