3.215 \(\int \cot ^{-1}(c-(i-c) \coth (a+b x)) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.124294, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.278, Rules used = {5190, 2184, 2190, 2279, 2391} \[ \frac{i \text{PolyLog}\left (2,-i c e^{2 a+2 b x}\right )}{4 b}+\frac{1}{2} i x \log \left (1+i c e^{2 a+2 b x}\right )+x \cot ^{-1}(c-(-c+i) \coth (a+b x))-\frac{1}{2} i b x^2 \]

Antiderivative was successfully verified.

[In]

Int[ArcCot[c - (I - c)*Coth[a + b*x]],x]

[Out]

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

Rule 5190

Int[ArcCot[(c_.) + Coth[(a_.) + (b_.)*(x_)]*(d_.)], x_Symbol] :> Simp[x*ArcCot[c + d*Coth[a + b*x]], x] + Dist
[b, Int[x/(c - d - c*E^(2*a + 2*b*x)), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[(c - d)^2, -1]

Rule 2184

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[(c
+ d*x)^(m + 1)/(a*d*(m + 1)), x] - Dist[b/a, Int[((c + d*x)^m*(F^(g*(e + f*x)))^n)/(a + b*(F^(g*(e + f*x)))^n)
, x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && 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 \cot ^{-1}(c-(i-c) \coth (a+b x)) \, dx &=x \cot ^{-1}(c-(i-c) \coth (a+b x))+b \int \frac{x}{i-c e^{2 a+2 b x}} \, dx\\ &=-\frac{1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \coth (a+b x))-(i b c) \int \frac{e^{2 a+2 b x} x}{i-c e^{2 a+2 b x}} \, dx\\ &=-\frac{1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \coth (a+b x))+\frac{1}{2} i x \log \left (1+i c e^{2 a+2 b x}\right )-\frac{1}{2} i \int \log \left (1+i c e^{2 a+2 b x}\right ) \, dx\\ &=-\frac{1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \coth (a+b x))+\frac{1}{2} i x \log \left (1+i c e^{2 a+2 b x}\right )-\frac{i \operatorname{Subst}\left (\int \frac{\log (1+i c x)}{x} \, dx,x,e^{2 a+2 b x}\right )}{4 b}\\ &=-\frac{1}{2} i b x^2+x \cot ^{-1}(c-(i-c) \coth (a+b x))+\frac{1}{2} i x \log \left (1+i c e^{2 a+2 b x}\right )+\frac{i \text{Li}_2\left (-i c e^{2 a+2 b x}\right )}{4 b}\\ \end{align*}

Mathematica [A]  time = 0.643599, size = 71, normalized size = 0.87 \[ \frac{i \left (2 b x \log \left (1-\frac{i e^{-2 (a+b x)}}{c}\right )-\text{PolyLog}\left (2,\frac{i e^{-2 (a+b x)}}{c}\right )\right )}{4 b}+x \cot ^{-1}(c+(c-i) \coth (a+b x)) \]

Antiderivative was successfully verified.

[In]

Integrate[ArcCot[c - (I - c)*Coth[a + b*x]],x]

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.12, size = 1351, normalized size = 16.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arccot(c-(I-c)*coth(b*x+a)),x)

[Out]

-1/b/(c-I)*arccot((c-I)*coth(b*x+a)+c)/(2*I-2*c)*ln((c-I)*coth(b*x+a)-c+I)+1/4*I/b/(c-I)/(I-c)*ln(-1/2*I*((c-I
)*coth(b*x+a)+c+I))*ln((c-I)*coth(b*x+a)+c-I)-1/4*I/b/(c-I)/(I-c)*ln((c-I)*coth(b*x+a)-c+I)*ln(1/2*((c-I)*coth
(b*x+a)+c+I)/c)-1/4*I/b/(c-I)/(I-c)*dilog(((c-I)*coth(b*x+a)+c-I)/(-2*I+2*c))*c^2+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+c-I)^2*c+1/2/
b/(c-I)/(I-c)*dilog(1/2*((c-I)*coth(b*x+a)+c+I)/c)*c-1/2/b/(c-I)/(I-c)*dilog(((c-I)*coth(b*x+a)+c-I)/(-2*I+2*c
))*c-1/2/b/(c-I)/(I-c)*dilog(-1/2*I*((c-I)*coth(b*x+a)+c+I))*c+1/b/(c-I)*arccot((c-I)*coth(b*x+a)+c)/(2*I-2*c)
*ln((c-I)*coth(b*x+a)+c-I)-1/8*I/b/(c-I)/(I-c)*ln((c-I)*coth(b*x+a)+c-I)^2-1/4*I/b/(c-I)/(I-c)*dilog(1/2*((c-I
)*coth(b*x+a)+c+I)/c)+1/4*I/b/(c-I)/(I-c)*dilog(((c-I)*coth(b*x+a)+c-I)/(-2*I+2*c))+1/4*I/b/(c-I)/(I-c)*dilog(
-1/2*I*((c-I)*coth(b*x+a)+c+I))

________________________________________________________________________________________

Maxima [A]  time = 5.90343, size = 108, normalized size = 1.32 \begin{align*} 2 \, b{\left (c - i\right )}{\left (\frac{2 \, x^{2}}{2 i \, c + 2} - \frac{2 \, b x \log \left (i \, c e^{\left (2 \, b x + 2 \, a\right )} + 1\right ) +{\rm Li}_2\left (-i \, c e^{\left (2 \, b x + 2 \, a\right )}\right )}{-2 \, b^{2}{\left (-i \, c - 1\right )}}\right )} + x \operatorname{arccot}\left ({\left (c - i\right )} \coth \left (b x + a\right ) + c\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arccot(c-(I-c)*coth(b*x+a)),x, algorithm="maxima")

[Out]

2*b*(c - I)*(2*x^2/(2*I*c + 2) - (2*b*x*log(I*c*e^(2*b*x + 2*a) + 1) + dilog(-I*c*e^(2*b*x + 2*a)))/(b^2*(2*I*
c + 2))) + x*arccot((c - I)*coth(b*x + a) + c)

________________________________________________________________________________________

Fricas [B]  time = 2.17169, size = 517, normalized size = 6.3 \begin{align*} \frac{-i \, b^{2} x^{2} + i \, b x \log \left (\frac{{\left (c - i\right )} e^{\left (2 \, b x + 2 \, a\right )}}{c e^{\left (2 \, b x + 2 \, a\right )} - i}\right ) + i \, a^{2} +{\left (i \, b x + i \, a\right )} \log \left (\frac{1}{2} \, \sqrt{-4 i \, c} e^{\left (b x + a\right )} + 1\right ) +{\left (i \, b x + i \, a\right )} \log \left (-\frac{1}{2} \, \sqrt{-4 i \, c} e^{\left (b x + a\right )} + 1\right ) - i \, a \log \left (\frac{2 \, c e^{\left (b x + a\right )} + i \, \sqrt{-4 i \, c}}{2 \, c}\right ) - i \, a \log \left (\frac{2 \, c e^{\left (b x + a\right )} - i \, \sqrt{-4 i \, c}}{2 \, c}\right ) + i \,{\rm Li}_2\left (\frac{1}{2} \, \sqrt{-4 i \, c} e^{\left (b x + a\right )}\right ) + i \,{\rm Li}_2\left (-\frac{1}{2} \, \sqrt{-4 i \, c} e^{\left (b x + a\right )}\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arccot(c-(I-c)*coth(b*x+a)),x, algorithm="fricas")

[Out]

1/2*(-I*b^2*x^2 + I*b*x*log((c - I)*e^(2*b*x + 2*a)/(c*e^(2*b*x + 2*a) - I)) + I*a^2 + (I*b*x + I*a)*log(1/2*s
qrt(-4*I*c)*e^(b*x + a) + 1) + (I*b*x + I*a)*log(-1/2*sqrt(-4*I*c)*e^(b*x + a) + 1) - I*a*log(1/2*(2*c*e^(b*x
+ a) + I*sqrt(-4*I*c))/c) - I*a*log(1/2*(2*c*e^(b*x + a) - I*sqrt(-4*I*c))/c) + I*dilog(1/2*sqrt(-4*I*c)*e^(b*
x + a)) + I*dilog(-1/2*sqrt(-4*I*c)*e^(b*x + a)))/b

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - b \left (c^{6} - 6 i c^{5} - 15 c^{4} + 20 i c^{3} + 15 c^{2} - 6 i c - 1\right ) \int \frac{x}{c^{7} e^{2 a} e^{2 b x} - 6 i c^{6} e^{2 a} e^{2 b x} - i c^{6} - 15 c^{5} e^{2 a} e^{2 b x} - 6 c^{5} + 20 i c^{4} e^{2 a} e^{2 b x} + 15 i c^{4} + 15 c^{3} e^{2 a} e^{2 b x} + 20 c^{3} - 6 i c^{2} e^{2 a} e^{2 b x} - 15 i c^{2} - c e^{2 a} e^{2 b x} - 6 c + i}\, dx + \frac{i x \log{\left (1 - \frac{i}{c + \frac{c}{e^{2 a} e^{2 b x} - 1} + \frac{c e^{a} e^{b x}}{e^{a} e^{b x} - e^{- a} e^{- b x}} - \frac{i}{e^{2 a} e^{2 b x} - 1} - \frac{i e^{a} e^{b x}}{e^{a} e^{b x} - e^{- a} e^{- b x}}} \right )}}{2} - \frac{\left (i c x + x\right ) \log{\left (1 + \frac{i}{c + \frac{c}{e^{2 a} e^{2 b x} - 1} + \frac{c e^{a} e^{b x}}{e^{a} e^{b x} - e^{- a} e^{- b x}} - \frac{i}{e^{2 a} e^{2 b x} - 1} - \frac{i e^{a} e^{b x}}{e^{a} e^{b x} - e^{- a} e^{- b x}}} \right )}}{2 c - 2 i} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(acot(c-(I-c)*coth(b*x+a)),x)

[Out]

-b*(c**6 - 6*I*c**5 - 15*c**4 + 20*I*c**3 + 15*c**2 - 6*I*c - 1)*Integral(x/(c**7*exp(2*a)*exp(2*b*x) - 6*I*c*
*6*exp(2*a)*exp(2*b*x) - I*c**6 - 15*c**5*exp(2*a)*exp(2*b*x) - 6*c**5 + 20*I*c**4*exp(2*a)*exp(2*b*x) + 15*I*
c**4 + 15*c**3*exp(2*a)*exp(2*b*x) + 20*c**3 - 6*I*c**2*exp(2*a)*exp(2*b*x) - 15*I*c**2 - c*exp(2*a)*exp(2*b*x
) - 6*c + I), x) + I*x*log(1 - I/(c + c/(exp(2*a)*exp(2*b*x) - 1) + c*exp(a)*exp(b*x)/(exp(a)*exp(b*x) - exp(-
a)*exp(-b*x)) - I/(exp(2*a)*exp(2*b*x) - 1) - I*exp(a)*exp(b*x)/(exp(a)*exp(b*x) - exp(-a)*exp(-b*x))))/2 - (I
*c*x + x)*log(1 + I/(c + c/(exp(2*a)*exp(2*b*x) - 1) + c*exp(a)*exp(b*x)/(exp(a)*exp(b*x) - exp(-a)*exp(-b*x))
 - I/(exp(2*a)*exp(2*b*x) - 1) - I*exp(a)*exp(b*x)/(exp(a)*exp(b*x) - exp(-a)*exp(-b*x))))/(2*c - 2*I)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arccot(c-(I-c)*coth(b*x+a)),x, algorithm="giac")

[Out]

integrate(arccot((c - I)*coth(b*x + a) + c), x)