3.234 \(\int \coth ^{-1}(\tan (a+b x)) \, dx\)

Optimal. Leaf size=79 \[ -\frac{i \text{PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b}+\frac{i \text{PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b}+i x \tan ^{-1}\left (e^{2 i (a+b x)}\right )+x \coth ^{-1}(\tan (a+b x)) \]

[Out]

x*ArcCoth[Tan[a + b*x]] + I*x*ArcTan[E^((2*I)*(a + b*x))] - ((I/4)*PolyLog[2, (-I)*E^((2*I)*(a + b*x))])/b + (
(I/4)*PolyLog[2, I*E^((2*I)*(a + b*x))])/b

________________________________________________________________________________________

Rubi [A]  time = 0.047899, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.571, Rules used = {6248, 4181, 2279, 2391} \[ -\frac{i \text{PolyLog}\left (2,-i e^{2 i (a+b x)}\right )}{4 b}+\frac{i \text{PolyLog}\left (2,i e^{2 i (a+b x)}\right )}{4 b}+i x \tan ^{-1}\left (e^{2 i (a+b x)}\right )+x \coth ^{-1}(\tan (a+b x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x*ArcCoth[Tan[a + b*x]] + I*x*ArcTan[E^((2*I)*(a + b*x))] - ((I/4)*PolyLog[2, (-I)*E^((2*I)*(a + b*x))])/b + (
(I/4)*PolyLog[2, I*E^((2*I)*(a + b*x))])/b

Rule 6248

Int[ArcCoth[Tan[(a_.) + (b_.)*(x_)]], x_Symbol] :> Simp[x*ArcCoth[Tan[a + b*x]], x] - Dist[b, Int[x*Sec[2*a +
2*b*x], x], x] /; FreeQ[{a, b}, x]

Rule 4181

Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
 x], x] + Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \coth ^{-1}(\tan (a+b x)) \, dx &=x \coth ^{-1}(\tan (a+b x))-b \int x \sec (2 a+2 b x) \, dx\\ &=x \coth ^{-1}(\tan (a+b x))+i x \tan ^{-1}\left (e^{2 i (a+b x)}\right )+\frac{1}{2} \int \log \left (1-i e^{i (2 a+2 b x)}\right ) \, dx-\frac{1}{2} \int \log \left (1+i e^{i (2 a+2 b x)}\right ) \, dx\\ &=x \coth ^{-1}(\tan (a+b x))+i x \tan ^{-1}\left (e^{2 i (a+b x)}\right )-\frac{i \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{4 b}+\frac{i \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{4 b}\\ &=x \coth ^{-1}(\tan (a+b x))+i x \tan ^{-1}\left (e^{2 i (a+b x)}\right )-\frac{i \text{Li}_2\left (-i e^{2 i (a+b x)}\right )}{4 b}+\frac{i \text{Li}_2\left (i e^{2 i (a+b x)}\right )}{4 b}\\ \end{align*}

Mathematica [A]  time = 0.0230426, size = 78, normalized size = 0.99 \[ \frac{-i \text{PolyLog}\left (2,-i e^{2 i (a+b x)}\right )+i \text{PolyLog}\left (2,i e^{2 i (a+b x)}\right )+4 b x \left (\coth ^{-1}(\tan (a+b x))+i \tan ^{-1}\left (e^{2 i (a+b x)}\right )\right )}{4 b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(4*b*x*(ArcCoth[Tan[a + b*x]] + I*ArcTan[E^((2*I)*(a + b*x))]) - I*PolyLog[2, (-I)*E^((2*I)*(a + b*x))] + I*Po
lyLog[2, I*E^((2*I)*(a + b*x))])/(4*b)

________________________________________________________________________________________

Maple [B]  time = 0.158, size = 178, normalized size = 2.3 \begin{align*}{\frac{\arctan \left ( \tan \left ( bx+a \right ) \right ){\rm arccoth} \left (\tan \left ( bx+a \right ) \right )}{b}}+{\frac{\arctan \left ( \tan \left ( bx+a \right ) \right ) }{2\,b}\ln \left ( 1+{\frac{i \left ( 1+i\tan \left ( bx+a \right ) \right ) ^{2}}{1+ \left ( \tan \left ( bx+a \right ) \right ) ^{2}}} \right ) }-{\frac{{\frac{i}{4}}}{b}{\it polylog} \left ( 2,{\frac{-i \left ( 1+i\tan \left ( bx+a \right ) \right ) ^{2}}{1+ \left ( \tan \left ( bx+a \right ) \right ) ^{2}}} \right ) }-{\frac{\arctan \left ( \tan \left ( bx+a \right ) \right ) }{2\,b}\ln \left ( 1-{\frac{i \left ( 1+i\tan \left ( bx+a \right ) \right ) ^{2}}{1+ \left ( \tan \left ( bx+a \right ) \right ) ^{2}}} \right ) }+{\frac{{\frac{i}{4}}}{b}{\it polylog} \left ( 2,{\frac{i \left ( 1+i\tan \left ( bx+a \right ) \right ) ^{2}}{1+ \left ( \tan \left ( bx+a \right ) \right ) ^{2}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arccoth(tan(b*x+a)),x)

[Out]

1/b*arctan(tan(b*x+a))*arccoth(tan(b*x+a))+1/2/b*arctan(tan(b*x+a))*ln(1+I*(1+I*tan(b*x+a))^2/(1+tan(b*x+a)^2)
)-1/4*I/b*polylog(2,-I*(1+I*tan(b*x+a))^2/(1+tan(b*x+a)^2))-1/2/b*arctan(tan(b*x+a))*ln(1-I*(1+I*tan(b*x+a))^2
/(1+tan(b*x+a)^2))+1/4*I/b*polylog(2,I*(1+I*tan(b*x+a))^2/(1+tan(b*x+a)^2))

________________________________________________________________________________________

Maxima [B]  time = 1.8146, size = 246, normalized size = 3.11 \begin{align*} \frac{4 \,{\left (b x + a\right )} \operatorname{arcoth}\left (\tan \left (b x + a\right )\right ) +{\left (\arctan \left (\frac{1}{2} \, \tan \left (b x + a\right ) + \frac{1}{2}, \frac{1}{2} \, \tan \left (b x + a\right ) + \frac{1}{2}\right ) - \arctan \left (\frac{1}{2} \, \tan \left (b x + a\right ) - \frac{1}{2}, -\frac{1}{2} \, \tan \left (b x + a\right ) + \frac{1}{2}\right )\right )} \log \left (\tan \left (b x + a\right )^{2} + 1\right ) -{\left (b x + a\right )} \log \left (\frac{1}{2} \, \tan \left (b x + a\right )^{2} + \tan \left (b x + a\right ) + \frac{1}{2}\right ) +{\left (b x + a\right )} \log \left (\frac{1}{2} \, \tan \left (b x + a\right )^{2} - \tan \left (b x + a\right ) + \frac{1}{2}\right ) - i \,{\rm Li}_2\left (\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \tan \left (b x + a\right ) - \frac{1}{2} i + \frac{1}{2}\right ) + i \,{\rm Li}_2\left (-\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \tan \left (b x + a\right ) + \frac{1}{2} i + \frac{1}{2}\right ) + i \,{\rm Li}_2\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \tan \left (b x + a\right ) + \frac{1}{2} i + \frac{1}{2}\right ) - i \,{\rm Li}_2\left (-\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \tan \left (b x + a\right ) - \frac{1}{2} i + \frac{1}{2}\right )}{4 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(4*(b*x + a)*arccoth(tan(b*x + a)) + (arctan2(1/2*tan(b*x + a) + 1/2, 1/2*tan(b*x + a) + 1/2) - arctan2(1/
2*tan(b*x + a) - 1/2, -1/2*tan(b*x + a) + 1/2))*log(tan(b*x + a)^2 + 1) - (b*x + a)*log(1/2*tan(b*x + a)^2 + t
an(b*x + a) + 1/2) + (b*x + a)*log(1/2*tan(b*x + a)^2 - tan(b*x + a) + 1/2) - I*dilog((1/2*I + 1/2)*tan(b*x +
a) - 1/2*I + 1/2) + I*dilog(-(1/2*I - 1/2)*tan(b*x + a) + 1/2*I + 1/2) + I*dilog((1/2*I - 1/2)*tan(b*x + a) +
1/2*I + 1/2) - I*dilog(-(1/2*I + 1/2)*tan(b*x + a) - 1/2*I + 1/2))/b

________________________________________________________________________________________

Fricas [B]  time = 1.896, size = 1493, normalized size = 18.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*(4*b*x*log((tan(b*x + a) + 1)/(tan(b*x + a) - 1)) - 2*(b*x + a)*log(((I + 1)*tan(b*x + a)^2 + 2*tan(b*x +
a) - I + 1)/(tan(b*x + a)^2 + 1)) + 2*a*log(((I + 1)*tan(b*x + a)^2 + 2*I*tan(b*x + a) + I - 1)/(tan(b*x + a)^
2 + 1)) - 2*a*log(((I + 1)*tan(b*x + a)^2 - 2*I*tan(b*x + a) + I - 1)/(tan(b*x + a)^2 + 1)) + 2*(b*x + a)*log(
((I + 1)*tan(b*x + a)^2 - 2*tan(b*x + a) - I + 1)/(tan(b*x + a)^2 + 1)) - 2*(b*x + a)*log((-(I - 1)*tan(b*x +
a)^2 + 2*tan(b*x + a) + I + 1)/(tan(b*x + a)^2 + 1)) + 2*(b*x + a)*log((-(I - 1)*tan(b*x + a)^2 - 2*tan(b*x +
a) + I + 1)/(tan(b*x + a)^2 + 1)) + 2*a*log(((I - 1)*tan(b*x + a)^2 + 2*I*tan(b*x + a) + I + 1)/(tan(b*x + a)^
2 + 1)) - 2*a*log(((I - 1)*tan(b*x + a)^2 - 2*I*tan(b*x + a) + I + 1)/(tan(b*x + a)^2 + 1)) + I*dilog(-((I + 1
)*tan(b*x + a)^2 + 2*tan(b*x + a) - I + 1)/(tan(b*x + a)^2 + 1) + 1) + I*dilog(-((I + 1)*tan(b*x + a)^2 - 2*ta
n(b*x + a) - I + 1)/(tan(b*x + a)^2 + 1) + 1) - I*dilog(-(-(I - 1)*tan(b*x + a)^2 + 2*tan(b*x + a) + I + 1)/(t
an(b*x + a)^2 + 1) + 1) - I*dilog(-(-(I - 1)*tan(b*x + a)^2 - 2*tan(b*x + a) + I + 1)/(tan(b*x + a)^2 + 1) + 1
))/b

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \operatorname{acoth}{\left (\tan{\left (a + b x \right )} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(acoth(tan(a + b*x)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \operatorname{arcoth}\left (\tan \left (b x + a\right )\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(arccoth(tan(b*x + a)), x)