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

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

[Out]

-1/2*b*x^2+x*(Pi-arccot(-c-(1-I*c)*cot(b*x+a)))-1/2*I*x*ln(1-I*c*exp(2*I*a+2*I*b*x))-1/4*polylog(2,I*c*exp(2*I
*a+2*I*b*x))/b

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {5166, 2184, 2190, 2279, 2391} \[ -\frac {\text {PolyLog}\left (2,i c e^{2 i a+2 i b x}\right )}{4 b}-\frac {1}{2} i x \log \left (1-i c e^{2 i a+2 i b x}\right )+x \cot ^{-1}(c+(1-i c) \cot (a+b x))-\frac {b x^2}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]

Rule 5166

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 6.88, size = 929, normalized size = 10.93 \[ \frac {i x \left (2 b x \log (2 \cos (b x) (\cos (b x)-i \sin (b x)))+i \log \left (\frac {\sec (b x) (\cos (a)-i \sin (a)) ((c+i) \cos (a+b x)+(i c+1) \sin (a+b x))}{2 c}\right ) \log (1-i \tan (b x))-i \log \left (\frac {\sec (b x) ((1-i c) \cos (a+b x)+(c-i) \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \log (i \tan (b x)+1)+i \text {Li}_2(i \sin (2 b x)-\cos (2 b x))+i \text {Li}_2\left (\frac {\sec (b x) ((c-i) \cos (a)+i (c+i) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right )-i \text {Li}_2\left (\frac {1}{2} \sec (b x) ((i c+1) \cos (a)-(c+i) \sin (a)) (\cos (a+b x)+i \sin (a+b x))\right )\right ) (\cos (b x)-i \sin (b x)) (\cos (b x)+i \sin (b x)) \csc ^2(a+b x)}{(\cot (a+b x)+i) (i c+(c+i) \cot (a+b x)+1) \left (i \log (i \tan (b x)+1) \tan (b x) \cos ^2(a)+2 i b x+\log \left (1-\frac {\sec (b x) ((c-i) \cos (a)+i (c+i) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right )+\log \left (\frac {1}{2} \sec (b x) ((-i c-1) \cos (a)+(c+i) \sin (a)) (\cos (a+b x)+i \sin (a+b x))+1\right )+i \log (i \tan (b x)+1) \sin ^2(a) \tan (b x)+2 b x \tan (b x)+i \log \left (1-\frac {\sec (b x) ((c-i) \cos (a)+i (c+i) \sin (a)) (\cos (a+b x)-i \sin (a+b x))}{2 c}\right ) \tan (b x)-i \log \left (\frac {1}{2} \sec (b x) ((-i c-1) \cos (a)+(c+i) \sin (a)) (\cos (a+b x)+i \sin (a+b x))+1\right ) \tan (b x)-i \log (1-i \tan (b x)) \tan (b x)+\frac {(c-i) \cos (a+b x) (\log (1-i \tan (b x))-\log (i \tan (b x)+1))}{(c+i) \cos (a+b x)+(i c+1) \sin (a+b x)}+\frac {(c+i) (\log (1-i \tan (b x))-\log (i \tan (b x)+1)) \sin (a+b x)}{(1-i c) \cos (a+b x)+(c-i) \sin (a+b x)}+\frac {i \log \left (\frac {\sec (b x) ((1-i c) \cos (a+b x)+(c-i) \sin (a+b x))}{2 \cos (a)-2 i \sin (a)}\right ) \sec ^2(b x)}{\tan (b x)-i}-\frac {i \log \left (\frac {\sec (b x) (\cos (a)-i \sin (a)) ((c+i) \cos (a+b x)+(i c+1) \sin (a+b x))}{2 c}\right ) \sec ^2(b x)}{\tan (b x)+i}\right )}+x \cot ^{-1}(c+(1-i c) \cot (a+b x)) \]

Warning: Unable to verify antiderivative.

[In]

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

[Out]

x*ArcCot[c + (1 - I*c)*Cot[a + b*x]] + (I*x*Csc[a + b*x]^2*(2*b*x*Log[2*Cos[b*x]*(Cos[b*x] - I*Sin[b*x])] + I*
Log[(Sec[b*x]*(Cos[a] - I*Sin[a])*((I + c)*Cos[a + b*x] + (1 + I*c)*Sin[a + b*x]))/(2*c)]*Log[1 - I*Tan[b*x]]
- I*Log[(Sec[b*x]*((1 - I*c)*Cos[a + b*x] + (-I + c)*Sin[a + b*x]))/(2*Cos[a] - (2*I)*Sin[a])]*Log[1 + I*Tan[b
*x]] + I*PolyLog[2, -Cos[2*b*x] + I*Sin[2*b*x]] + I*PolyLog[2, (Sec[b*x]*((-I + c)*Cos[a] + I*(I + c)*Sin[a])*
(Cos[a + b*x] - I*Sin[a + b*x]))/(2*c)] - I*PolyLog[2, (Sec[b*x]*((1 + I*c)*Cos[a] - (I + c)*Sin[a])*(Cos[a +
b*x] + I*Sin[a + b*x]))/2])*(Cos[b*x] - I*Sin[b*x])*(Cos[b*x] + I*Sin[b*x]))/((I + Cot[a + b*x])*(1 + I*c + (I
 + c)*Cot[a + b*x])*((2*I)*b*x + Log[1 - (Sec[b*x]*((-I + c)*Cos[a] + I*(I + c)*Sin[a])*(Cos[a + b*x] - I*Sin[
a + b*x]))/(2*c)] + Log[1 + (Sec[b*x]*((-1 - I*c)*Cos[a] + (I + c)*Sin[a])*(Cos[a + b*x] + I*Sin[a + b*x]))/2]
 + ((-I + c)*Cos[a + b*x]*(Log[1 - I*Tan[b*x]] - Log[1 + I*Tan[b*x]]))/((I + c)*Cos[a + b*x] + (1 + I*c)*Sin[a
 + b*x]) + ((I + c)*(Log[1 - I*Tan[b*x]] - Log[1 + I*Tan[b*x]])*Sin[a + b*x])/((1 - I*c)*Cos[a + b*x] + (-I +
c)*Sin[a + b*x]) + 2*b*x*Tan[b*x] + I*Log[1 - (Sec[b*x]*((-I + c)*Cos[a] + I*(I + c)*Sin[a])*(Cos[a + b*x] - I
*Sin[a + b*x]))/(2*c)]*Tan[b*x] - I*Log[1 + (Sec[b*x]*((-1 - I*c)*Cos[a] + (I + c)*Sin[a])*(Cos[a + b*x] + I*S
in[a + b*x]))/2]*Tan[b*x] - I*Log[1 - I*Tan[b*x]]*Tan[b*x] + I*Cos[a]^2*Log[1 + I*Tan[b*x]]*Tan[b*x] + I*Log[1
 + I*Tan[b*x]]*Sin[a]^2*Tan[b*x] + (I*Log[(Sec[b*x]*((1 - I*c)*Cos[a + b*x] + (-I + c)*Sin[a + b*x]))/(2*Cos[a
] - (2*I)*Sin[a])]*Sec[b*x]^2)/(-I + Tan[b*x]) - (I*Log[(Sec[b*x]*(Cos[a] - I*Sin[a])*((I + c)*Cos[a + b*x] +
(1 + I*c)*Sin[a + b*x]))/(2*c)]*Sec[b*x]^2)/(I + Tan[b*x])))

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 116, normalized size = 1.36 \[ -\frac {2 \, b^{2} x^{2} - 4 \, \pi b x - 2 i \, b x \log \left (\frac {{\left (c e^{\left (2 i \, b x + 2 i \, a\right )} + i\right )} e^{\left (-2 i \, b x - 2 i \, a\right )}}{c + i}\right ) - 2 \, a^{2} - {\left (-2 i \, b x - 2 i \, a\right )} \log \left (-i \, c e^{\left (2 i \, b x + 2 i \, a\right )} + 1\right ) - 2 i \, a \log \left (\frac {c e^{\left (2 i \, b x + 2 i \, a\right )} + i}{c}\right ) + {\rm Li}_2\left (i \, c e^{\left (2 i \, b x + 2 i \, a\right )}\right )}{4 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \pi - \operatorname {arccot}\left (-{\left (-i \, c + 1\right )} \cot \left (b x + a\right ) - c\right )\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(pi - arccot(-(-I*c + 1)*cot(b*x + a) - c), x)

________________________________________________________________________________________

maple [B]  time = 0.75, size = 1498, normalized size = 17.62 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(Pi-arccot(-c-(1-I*c)*cot(b*x+a)),x)

[Out]

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

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(c-1>0)', see `assume?` for mor
e details)Is c-1 zero or nonzero?

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \Pi +\mathrm {acot}\left (c-\mathrm {cot}\left (a+b\,x\right )\,\left (-1+c\,1{}\mathrm {i}\right )\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(Pi + acot(c - cot(a + b*x)*(c*1i - 1)),x)

[Out]

int(Pi + acot(c - cot(a + b*x)*(c*1i - 1)), x)

________________________________________________________________________________________

sympy [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: CoercionFailed} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(pi-acot(-c-(1-I*c)*cot(b*x+a)),x)

[Out]

Exception raised: CoercionFailed

________________________________________________________________________________________