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

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

Optimal result

Integrand size = 7, antiderivative size = 16 \[ \int \coth ^{-1}(\tanh (a+b x)) \, dx=\frac {\coth ^{-1}(\tanh (a+b x))^2}{2 b} \]

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2188, 30} \[ \int \coth ^{-1}(\tanh (a+b x)) \, dx=\frac {\coth ^{-1}(\tanh (a+b x))^2}{2 b} \]

[In]

Int[ArcCoth[Tanh[a + b*x]],x]

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

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]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.12 \[ \int \coth ^{-1}(\tanh (a+b x)) \, dx=-\frac {b x^2}{2}+x \coth ^{-1}(\tanh (a+b x)) \]

[In]

Integrate[ArcCoth[Tanh[a + b*x]],x]

[Out]

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

Maple [A] (verified)

Time = 0.56 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06

method result size
parallelrisch \(-\frac {b \,x^{2}}{2}+x \,\operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )\) \(17\)
derivativedivides \(\frac {\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right ) \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )-\frac {\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right )^{2}}{2}}{b}\) \(32\)
default \(\frac {\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right ) \operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )-\frac {\operatorname {arctanh}\left (\tanh \left (b x +a \right )\right )^{2}}{2}}{b}\) \(32\)
parts \(x \,\operatorname {arccoth}\left (\tanh \left (b x +a \right )\right )+\frac {-\frac {\left (b x +a \right )^{2}}{2}+\left (b x +a \right ) a}{b}\) \(32\)
risch \(x \ln \left ({\mathrm e}^{b x +a}\right )-\frac {i \pi \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3} x}{2}-\frac {i \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 ) x}{4}+\frac {i \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} x}{4}-\frac {i \pi \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{3} x}{4}+\frac {i \pi \operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{b x +a}\right ) x}{2}+\frac {i \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} x}{4}-\frac {i \pi \,\operatorname {csgn}\left (i {\mathrm e}^{2 b x +2 a}\right ) \operatorname {csgn}\left (i {\mathrm e}^{b x +a}\right )^{2} x}{4}-\frac {i \pi \operatorname {csgn}\left (\frac {i {\mathrm e}^{2 b x +2 a}}{{\mathrm e}^{2 b x +2 a}+1}\right )^{3} x}{4}-\frac {b \,x^{2}}{2}+\frac {i \pi \operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 b x +2 a}+1}\right )^{2} x}{2}-\frac {i \pi x}{2}\) \(340\)

[In]

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

[Out]

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

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.25 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \coth ^{-1}(\tanh (a+b x)) \, dx=\frac {1}{2} \, b x^{2} + \frac {1}{2} i \, \pi x + a x \]

[In]

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

[Out]

1/2*b*x^2 + 1/2*I*pi*x + a*x

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \coth ^{-1}(\tanh (a+b x)) \, dx=-\frac {1}{2} \, b x^{2} + x \operatorname {arcoth}\left (\tanh \left (b x + a\right )\right ) \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 69 vs. \(2 (14) = 28\).

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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