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

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

[Out]

x*ArcTan[E^(2*a + 2*b*x)] + x*ArcTan[Coth[a + b*x]] - ((I/4)*PolyLog[2, (-I)*E^(2*a + 2*b*x)])/b + ((I/4)*Poly
Log[2, I*E^(2*a + 2*b*x)])/b

________________________________________________________________________________________

Rubi [A]  time = 0.043107, antiderivative size = 73, 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 = {5181, 4180, 2279, 2391} \[ -\frac{i \text{PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}+\frac{i \text{PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}+x \tan ^{-1}\left (e^{2 a+2 b x}\right )+x \tan ^{-1}(\coth (a+b x)) \]

Antiderivative was successfully verified.

[In]

Int[ArcTan[Coth[a + b*x]],x]

[Out]

x*ArcTan[E^(2*a + 2*b*x)] + x*ArcTan[Coth[a + b*x]] - ((I/4)*PolyLog[2, (-I)*E^(2*a + 2*b*x)])/b + ((I/4)*Poly
Log[2, I*E^(2*a + 2*b*x)])/b

Rule 5181

Int[ArcTan[Coth[(a_.) + (b_.)*(x_)]], x_Symbol] :> Simp[x*ArcTan[Coth[a + b*x]], x] + Dist[b, Int[x*Sech[2*a +
 2*b*x], x], x] /; FreeQ[{a, b}, x]

Rule 4180

Int[csc[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c
+ d*x)^m*ArcTanh[E^(-(I*e) + f*fz*x)/E^(I*k*Pi)])/(f*fz*I), x] + (-Dist[(d*m)/(f*fz*I), Int[(c + d*x)^(m - 1)*
Log[1 - E^(-(I*e) + f*fz*x)/E^(I*k*Pi)], x], x] + Dist[(d*m)/(f*fz*I), Int[(c + d*x)^(m - 1)*Log[1 + E^(-(I*e)
 + f*fz*x)/E^(I*k*Pi)], x], x]) /; FreeQ[{c, d, e, f, fz}, 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 \tan ^{-1}(\coth (a+b x)) \, dx &=x \tan ^{-1}(\coth (a+b x))+b \int x \text{sech}(2 a+2 b x) \, dx\\ &=x \tan ^{-1}\left (e^{2 a+2 b x}\right )+x \tan ^{-1}(\coth (a+b x))-\frac{1}{2} i \int \log \left (1-i e^{2 a+2 b x}\right ) \, dx+\frac{1}{2} i \int \log \left (1+i e^{2 a+2 b x}\right ) \, dx\\ &=x \tan ^{-1}\left (e^{2 a+2 b x}\right )+x \tan ^{-1}(\coth (a+b x))-\frac{i \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{2 a+2 b x}\right )}{4 b}+\frac{i \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^{2 a+2 b x}\right )}{4 b}\\ &=x \tan ^{-1}\left (e^{2 a+2 b x}\right )+x \tan ^{-1}(\coth (a+b x))-\frac{i \text{Li}_2\left (-i e^{2 a+2 b x}\right )}{4 b}+\frac{i \text{Li}_2\left (i e^{2 a+2 b x}\right )}{4 b}\\ \end{align*}

Mathematica [A]  time = 0.0546063, size = 132, normalized size = 1.81 \[ x \tan ^{-1}(\coth (a+b x))+\frac{-2 i \left (\text{PolyLog}\left (2,-i e^{2 (a+b x)}\right )-\text{PolyLog}\left (2,i e^{2 (a+b x)}\right )\right )-(-4 i a-4 i b x+\pi ) \left (\log \left (1-i e^{2 (a+b x)}\right )-\log \left (1+i e^{2 (a+b x)}\right )\right )+(\pi -4 i a) \log \left (\cot \left (\frac{1}{4} (4 i a+4 i b x+\pi )\right )\right )}{8 b} \]

Antiderivative was successfully verified.

[In]

Integrate[ArcTan[Coth[a + b*x]],x]

[Out]

x*ArcTan[Coth[a + b*x]] + (-(((-4*I)*a + Pi - (4*I)*b*x)*(Log[1 - I*E^(2*(a + b*x))] - Log[1 + I*E^(2*(a + b*x
))])) + ((-4*I)*a + Pi)*Log[Cot[((4*I)*a + Pi + (4*I)*b*x)/4]] - (2*I)*(PolyLog[2, (-I)*E^(2*(a + b*x))] - Pol
yLog[2, I*E^(2*(a + b*x))]))/(8*b)

________________________________________________________________________________________

Maple [B]  time = 0.118, size = 440, normalized size = 6. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctan(coth(b*x+a)),x)

[Out]

1/b*arctanh(coth(b*x+a))*arctan(coth(b*x+a))-1/4*I/b*dilog(-I*cosh(2*arctanh(coth(b*x+a)))-I*sinh(2*arctanh(co
th(b*x+a))))+1/2*I/b*ln((1-I)/(1-coth(b*x+a)^2)^(1/2)+(1+I)*coth(b*x+a)/(1-coth(b*x+a)^2)^(1/2))*arctanh(coth(
b*x+a))-1/4*I/b*ln((1-I)/(1-coth(b*x+a)^2)^(1/2)+(1+I)*coth(b*x+a)/(1-coth(b*x+a)^2)^(1/2))*ln(-I*cosh(2*arcta
nh(coth(b*x+a)))-I*sinh(2*arctanh(coth(b*x+a))))+1/4*I/b*dilog(I*cosh(2*arctanh(coth(b*x+a)))+I*sinh(2*arctanh
(coth(b*x+a))))-1/2*I/b*ln((1+I)/(1-coth(b*x+a)^2)^(1/2)+(1-I)*coth(b*x+a)/(1-coth(b*x+a)^2)^(1/2))*arctanh(co
th(b*x+a))+1/4*I/b*ln((1+I)/(1-coth(b*x+a)^2)^(1/2)+(1-I)*coth(b*x+a)/(1-coth(b*x+a)^2)^(1/2))*ln(I*cosh(2*arc
tanh(coth(b*x+a)))+I*sinh(2*arctanh(coth(b*x+a))))-1/4*I/b*arctanh(coth(b*x+a))*ln(-I*cosh(2*arctanh(coth(b*x+
a)))-I*sinh(2*arctanh(coth(b*x+a))))+1/4*I/b*arctanh(coth(b*x+a))*ln(I*cosh(2*arctanh(coth(b*x+a)))+I*sinh(2*a
rctanh(coth(b*x+a))))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} x \arctan \left (e^{\left (2 \, b x + 2 \, a\right )} + 1, e^{\left (2 \, b x + 2 \, a\right )} - 1\right ) + 2 \, b \int \frac{x e^{\left (2 \, b x + 2 \, a\right )}}{e^{\left (4 \, b x + 4 \, a\right )} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(coth(b*x+a)),x, algorithm="maxima")

[Out]

x*arctan2(e^(2*b*x + 2*a) + 1, e^(2*b*x + 2*a) - 1) + 2*b*integrate(x*e^(2*b*x + 2*a)/(e^(4*b*x + 4*a) + 1), x
)

________________________________________________________________________________________

Fricas [B]  time = 2.44648, size = 1098, normalized size = 15.04 \begin{align*} \frac{2 \, b x \arctan \left (\frac{\cosh \left (b x + a\right )}{\sinh \left (b x + a\right )}\right ) +{\left (i \, b x + i \, a\right )} \log \left (\frac{1}{2} \, \sqrt{4 i}{\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) +{\left (i \, b x + i \, a\right )} \log \left (-\frac{1}{2} \, \sqrt{4 i}{\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) +{\left (-i \, b x - i \, a\right )} \log \left (\frac{1}{2} \, \sqrt{-4 i}{\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) +{\left (-i \, b x - i \, a\right )} \log \left (-\frac{1}{2} \, \sqrt{-4 i}{\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} + 1\right ) - i \, a \log \left (i \, \sqrt{4 i} + 2 \, \cosh \left (b x + a\right ) + 2 \, \sinh \left (b x + a\right )\right ) - i \, a \log \left (-i \, \sqrt{4 i} + 2 \, \cosh \left (b x + a\right ) + 2 \, \sinh \left (b x + a\right )\right ) + i \, a \log \left (i \, \sqrt{-4 i} + 2 \, \cosh \left (b x + a\right ) + 2 \, \sinh \left (b x + a\right )\right ) + i \, a \log \left (-i \, \sqrt{-4 i} + 2 \, \cosh \left (b x + a\right ) + 2 \, \sinh \left (b x + a\right )\right ) + i \,{\rm Li}_2\left (\frac{1}{2} \, \sqrt{4 i}{\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) + i \,{\rm Li}_2\left (-\frac{1}{2} \, \sqrt{4 i}{\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - i \,{\rm Li}_2\left (\frac{1}{2} \, \sqrt{-4 i}{\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right ) - i \,{\rm Li}_2\left (-\frac{1}{2} \, \sqrt{-4 i}{\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(coth(b*x+a)),x, algorithm="fricas")

[Out]

1/2*(2*b*x*arctan(cosh(b*x + a)/sinh(b*x + a)) + (I*b*x + I*a)*log(1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a
)) + 1) + (I*b*x + I*a)*log(-1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a)) + 1) + (-I*b*x - I*a)*log(1/2*sqrt(
-4*I)*(cosh(b*x + a) + sinh(b*x + a)) + 1) + (-I*b*x - I*a)*log(-1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a)
) + 1) - I*a*log(I*sqrt(4*I) + 2*cosh(b*x + a) + 2*sinh(b*x + a)) - I*a*log(-I*sqrt(4*I) + 2*cosh(b*x + a) + 2
*sinh(b*x + a)) + I*a*log(I*sqrt(-4*I) + 2*cosh(b*x + a) + 2*sinh(b*x + a)) + I*a*log(-I*sqrt(-4*I) + 2*cosh(b
*x + a) + 2*sinh(b*x + a)) + I*dilog(1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a))) + I*dilog(-1/2*sqrt(4*I)*(
cosh(b*x + a) + sinh(b*x + a))) - I*dilog(1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a))) - I*dilog(-1/2*sqrt(
-4*I)*(cosh(b*x + a) + sinh(b*x + a))))/b

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atan(coth(b*x+a)),x)

[Out]

Integral(atan(coth(a + b*x)), x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(coth(b*x+a)),x, algorithm="giac")

[Out]

integrate(arctan(coth(b*x + a)), x)