Integrand size = 12, antiderivative size = 183 \[ \int \frac {\cot ^{-1}(c x)}{1+x^2} \, dx=\frac {1}{2} i \arctan (x) \log \left (1-\frac {i}{c x}\right )-\frac {1}{2} i \arctan (x) \log \left (1+\frac {i}{c x}\right )-\frac {1}{2} i \arctan (x) \log \left (-\frac {2 i (i-c x)}{(1-c) (1-i x)}\right )+\frac {1}{2} i \arctan (x) \log \left (-\frac {2 i (i+c x)}{(1+c) (1-i x)}\right )-\frac {1}{4} \operatorname {PolyLog}\left (2,1+\frac {2 i (i-c x)}{(1-c) (1-i x)}\right )+\frac {1}{4} \operatorname {PolyLog}\left (2,1+\frac {2 i (i+c x)}{(1+c) (1-i x)}\right ) \]
1/2*I*arctan(x)*ln(1-I/c/x)-1/2*I*arctan(x)*ln(1+I/c/x)-1/2*I*arctan(x)*ln (-2*I*(I-c*x)/(1-c)/(1-I*x))+1/2*I*arctan(x)*ln(-2*I*(c*x+I)/(1+c)/(1-I*x) )-1/4*polylog(2,1+2*I*(I-c*x)/(1-c)/(1-I*x))+1/4*polylog(2,1+2*I*(c*x+I)/( 1+c)/(1-I*x))
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(592\) vs. \(2(183)=366\).
Time = 0.61 (sec) , antiderivative size = 592, normalized size of antiderivative = 3.23 \[ \int \frac {\cot ^{-1}(c x)}{1+x^2} \, dx=\frac {c \left (2 \arccos \left (\frac {1+c^2}{-1+c^2}\right ) \text {arctanh}\left (\frac {\sqrt {-c^2}}{c x}\right )-4 \cot ^{-1}(c x) \text {arctanh}\left (\frac {c x}{\sqrt {-c^2}}\right )-\left (\arccos \left (\frac {1+c^2}{-1+c^2}\right )-2 i \text {arctanh}\left (\frac {\sqrt {-c^2}}{c x}\right )\right ) \log \left (-\frac {2 \left (c^2+i \sqrt {-c^2}\right ) (-i+c x)}{\left (-1+c^2\right ) \left (\sqrt {-c^2}-c x\right )}\right )-\left (\arccos \left (\frac {1+c^2}{-1+c^2}\right )+2 i \text {arctanh}\left (\frac {\sqrt {-c^2}}{c x}\right )\right ) \log \left (\frac {2 i \left (i c^2+\sqrt {-c^2}\right ) (i+c x)}{\left (-1+c^2\right ) \left (\sqrt {-c^2}-c x\right )}\right )+\left (\arccos \left (\frac {1+c^2}{-1+c^2}\right )-2 i \text {arctanh}\left (\frac {\sqrt {-c^2}}{c x}\right )+2 i \text {arctanh}\left (\frac {c x}{\sqrt {-c^2}}\right )\right ) \log \left (\frac {\sqrt {2} \sqrt {-c^2} e^{-i \cot ^{-1}(c x)}}{\sqrt {-1+c^2} \sqrt {-1-c^2+\left (-1+c^2\right ) \cos \left (2 \cot ^{-1}(c x)\right )}}\right )+\left (\arccos \left (\frac {1+c^2}{-1+c^2}\right )+2 i \text {arctanh}\left (\frac {\sqrt {-c^2}}{c x}\right )-2 i \text {arctanh}\left (\frac {c x}{\sqrt {-c^2}}\right )\right ) \log \left (\frac {\sqrt {2} \sqrt {-c^2} e^{i \cot ^{-1}(c x)}}{\sqrt {-1+c^2} \sqrt {-1-c^2+\left (-1+c^2\right ) \cos \left (2 \cot ^{-1}(c x)\right )}}\right )+i \left (-\operatorname {PolyLog}\left (2,\frac {\left (1+c^2-2 i \sqrt {-c^2}\right ) \left (\sqrt {-c^2}+c x\right )}{\left (-1+c^2\right ) \left (\sqrt {-c^2}-c x\right )}\right )+\operatorname {PolyLog}\left (2,\frac {\left (1+c^2+2 i \sqrt {-c^2}\right ) \left (\sqrt {-c^2}+c x\right )}{\left (-1+c^2\right ) \left (\sqrt {-c^2}-c x\right )}\right )\right )\right )}{4 \sqrt {-c^2}} \]
(c*(2*ArcCos[(1 + c^2)/(-1 + c^2)]*ArcTanh[Sqrt[-c^2]/(c*x)] - 4*ArcCot[c* x]*ArcTanh[(c*x)/Sqrt[-c^2]] - (ArcCos[(1 + c^2)/(-1 + c^2)] - (2*I)*ArcTa nh[Sqrt[-c^2]/(c*x)])*Log[(-2*(c^2 + I*Sqrt[-c^2])*(-I + c*x))/((-1 + c^2) *(Sqrt[-c^2] - c*x))] - (ArcCos[(1 + c^2)/(-1 + c^2)] + (2*I)*ArcTanh[Sqrt [-c^2]/(c*x)])*Log[((2*I)*(I*c^2 + Sqrt[-c^2])*(I + c*x))/((-1 + c^2)*(Sqr t[-c^2] - c*x))] + (ArcCos[(1 + c^2)/(-1 + c^2)] - (2*I)*ArcTanh[Sqrt[-c^2 ]/(c*x)] + (2*I)*ArcTanh[(c*x)/Sqrt[-c^2]])*Log[(Sqrt[2]*Sqrt[-c^2])/(Sqrt [-1 + c^2]*E^(I*ArcCot[c*x])*Sqrt[-1 - c^2 + (-1 + c^2)*Cos[2*ArcCot[c*x]] ])] + (ArcCos[(1 + c^2)/(-1 + c^2)] + (2*I)*ArcTanh[Sqrt[-c^2]/(c*x)] - (2 *I)*ArcTanh[(c*x)/Sqrt[-c^2]])*Log[(Sqrt[2]*Sqrt[-c^2]*E^(I*ArcCot[c*x]))/ (Sqrt[-1 + c^2]*Sqrt[-1 - c^2 + (-1 + c^2)*Cos[2*ArcCot[c*x]]])] + I*(-Pol yLog[2, ((1 + c^2 - (2*I)*Sqrt[-c^2])*(Sqrt[-c^2] + c*x))/((-1 + c^2)*(Sqr t[-c^2] - c*x))] + PolyLog[2, ((1 + c^2 + (2*I)*Sqrt[-c^2])*(Sqrt[-c^2] + c*x))/((-1 + c^2)*(Sqrt[-c^2] - c*x))])))/(4*Sqrt[-c^2])
Time = 0.70 (sec) , antiderivative size = 311, normalized size of antiderivative = 1.70, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5444, 2920, 27, 2005, 5411, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^{-1}(c x)}{x^2+1} \, dx\) |
\(\Big \downarrow \) 5444 |
\(\displaystyle \frac {1}{2} i \int \frac {\log \left (1-\frac {i}{c x}\right )}{x^2+1}dx-\frac {1}{2} i \int \frac {\log \left (1+\frac {i}{c x}\right )}{x^2+1}dx\) |
\(\Big \downarrow \) 2920 |
\(\displaystyle \frac {1}{2} i \left (\arctan (x) \log \left (1-\frac {i}{c x}\right )-\frac {i \int \frac {c \arctan (x)}{\left (c-\frac {i}{x}\right ) x^2}dx}{c}\right )-\frac {1}{2} i \left (\frac {i \int \frac {c \arctan (x)}{\left (c+\frac {i}{x}\right ) x^2}dx}{c}+\arctan (x) \log \left (1+\frac {i}{c x}\right )\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} i \left (\arctan (x) \log \left (1-\frac {i}{c x}\right )-i \int \frac {\arctan (x)}{\left (c-\frac {i}{x}\right ) x^2}dx\right )-\frac {1}{2} i \left (i \int \frac {\arctan (x)}{\left (c+\frac {i}{x}\right ) x^2}dx+\arctan (x) \log \left (1+\frac {i}{c x}\right )\right )\) |
\(\Big \downarrow \) 2005 |
\(\displaystyle \frac {1}{2} i \left (\arctan (x) \log \left (1-\frac {i}{c x}\right )-i \int \frac {\arctan (x)}{x (c x-i)}dx\right )-\frac {1}{2} i \left (i \int \frac {\arctan (x)}{x (c x+i)}dx+\arctan (x) \log \left (1+\frac {i}{c x}\right )\right )\) |
\(\Big \downarrow \) 5411 |
\(\displaystyle \frac {1}{2} i \left (\arctan (x) \log \left (1-\frac {i}{c x}\right )-i \int \left (\frac {i \arctan (x)}{x}-\frac {i c \arctan (x)}{c x-i}\right )dx\right )-\frac {1}{2} i \left (i \int \left (\frac {i c \arctan (x)}{c x+i}-\frac {i \arctan (x)}{x}\right )dx+\arctan (x) \log \left (1+\frac {i}{c x}\right )\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} i \left (\arctan (x) \log \left (1-\frac {i}{c x}\right )-i \left (-i \arctan (x) \log \left (-\frac {2 i (-c x+i)}{(1-c) (1-i x)}\right )+i \arctan (x) \log \left (\frac {2}{1-i x}\right )-\frac {1}{2} \operatorname {PolyLog}\left (2,\frac {2 i (i-c x)}{(1-c) (1-i x)}+1\right )+\frac {1}{2} \operatorname {PolyLog}\left (2,1-\frac {2}{1-i x}\right )-\frac {\operatorname {PolyLog}(2,-i x)}{2}+\frac {\operatorname {PolyLog}(2,i x)}{2}\right )\right )-\frac {1}{2} i \left (i \left (i \arctan (x) \log \left (-\frac {2 i (c x+i)}{(c+1) (1-i x)}\right )-i \arctan (x) \log \left (\frac {2}{1-i x}\right )+\frac {1}{2} \operatorname {PolyLog}\left (2,\frac {2 i (c x+i)}{(c+1) (1-i x)}+1\right )-\frac {1}{2} \operatorname {PolyLog}\left (2,1-\frac {2}{1-i x}\right )+\frac {\operatorname {PolyLog}(2,-i x)}{2}-\frac {\operatorname {PolyLog}(2,i x)}{2}\right )+\arctan (x) \log \left (1+\frac {i}{c x}\right )\right )\) |
(I/2)*(ArcTan[x]*Log[1 - I/(c*x)] - I*(I*ArcTan[x]*Log[2/(1 - I*x)] - I*Ar cTan[x]*Log[((-2*I)*(I - c*x))/((1 - c)*(1 - I*x))] + PolyLog[2, 1 - 2/(1 - I*x)]/2 - PolyLog[2, (-I)*x]/2 + PolyLog[2, I*x]/2 - PolyLog[2, 1 + ((2* I)*(I - c*x))/((1 - c)*(1 - I*x))]/2)) - (I/2)*(ArcTan[x]*Log[1 + I/(c*x)] + I*((-I)*ArcTan[x]*Log[2/(1 - I*x)] + I*ArcTan[x]*Log[((-2*I)*(I + c*x)) /((1 + c)*(1 - I*x))] - PolyLog[2, 1 - 2/(1 - I*x)]/2 + PolyLog[2, (-I)*x] /2 - PolyLog[2, I*x]/2 + PolyLog[2, 1 + ((2*I)*(I + c*x))/((1 + c)*(1 - I* x))]/2))
3.1.48.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(Fx_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p*Fx, x] /; FreeQ[{a, b, m, n}, x] && IntegerQ[p] && Neg Q[n]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))/((f_) + (g_.) *(x_)^2), x_Symbol] :> With[{u = IntHide[1/(f + g*x^2), x]}, Simp[u*(a + b* Log[c*(d + e*x^n)^p]), x] - Simp[b*e*n*p Int[u*(x^(n - 1)/(d + e*x^n)), x ], x]] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && IntegerQ[n]
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ .)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f* x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] & & IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
Int[ArcCot[(c_.)*(x_)]/((d_.) + (e_.)*(x_)^2), x_Symbol] :> Simp[I/2 Int[ Log[1 - I/(c*x)]/(d + e*x^2), x], x] - Simp[I/2 Int[Log[1 + I/(c*x)]/(d + e*x^2), x], x] /; FreeQ[{c, d, e}, x]
Time = 1.17 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.00
method | result | size |
risch | \(\frac {\pi \arctan \left (x \right )}{2}-\frac {\ln \left (-i c x +1\right ) \ln \left (\frac {-i c x -c}{-c -1}\right )}{4}-\frac {\operatorname {dilog}\left (\frac {-i c x -c}{-c -1}\right )}{4}+\frac {\ln \left (-i c x +1\right ) \ln \left (\frac {-i c x +c}{c -1}\right )}{4}+\frac {\operatorname {dilog}\left (\frac {-i c x +c}{c -1}\right )}{4}-\frac {\ln \left (i c x +1\right ) \ln \left (\frac {i c x -c}{-c -1}\right )}{4}-\frac {\operatorname {dilog}\left (\frac {i c x -c}{-c -1}\right )}{4}+\frac {\ln \left (i c x +1\right ) \ln \left (\frac {i c x +c}{c -1}\right )}{4}+\frac {\operatorname {dilog}\left (\frac {i c x +c}{c -1}\right )}{4}\) | \(183\) |
parts | \(\operatorname {arccot}\left (c x \right ) \arctan \left (x \right )+c \left (\frac {\arctan \left (c x \right ) \arctan \left (x \right )}{c}-\frac {\frac {i c^{2} \ln \left (1-\frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right ) \arctan \left (c x \right )}{2+2 c}+\frac {i c \arctan \left (c x \right ) \ln \left (1-\frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{2+2 c}+\frac {c^{2} \arctan \left (c x \right )^{2}}{2+2 c}+\frac {c^{2} \operatorname {polylog}\left (2, \frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{4+4 c}+\frac {c \arctan \left (c x \right )^{2}}{2+2 c}+\frac {c \operatorname {polylog}\left (2, \frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{4+4 c}-\frac {i c \arctan \left (c x \right ) \ln \left (1-\frac {\left (1+c \right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (1-c \right )}\right )}{2}-\frac {c \arctan \left (c x \right )^{2}}{2}-\frac {c \operatorname {polylog}\left (2, \frac {\left (1+c \right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (1-c \right )}\right )}{4}}{c^{2}}\right )\) | \(328\) |
derivativedivides | \(\frac {c \arctan \left (x \right ) \operatorname {arccot}\left (c x \right )+c^{2} \left (\frac {\arctan \left (c x \right ) \arctan \left (x \right )}{c}-\frac {\frac {i c^{2} \ln \left (1-\frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right ) \arctan \left (c x \right )}{2+2 c}+\frac {i c \arctan \left (c x \right ) \ln \left (1-\frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{2+2 c}+\frac {c^{2} \arctan \left (c x \right )^{2}}{2+2 c}+\frac {c^{2} \operatorname {polylog}\left (2, \frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{4+4 c}+\frac {c \arctan \left (c x \right )^{2}}{2+2 c}+\frac {c \operatorname {polylog}\left (2, \frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{4+4 c}-\frac {i c \arctan \left (c x \right ) \ln \left (1-\frac {\left (1+c \right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (1-c \right )}\right )}{2}-\frac {c \arctan \left (c x \right )^{2}}{2}-\frac {c \operatorname {polylog}\left (2, \frac {\left (1+c \right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (1-c \right )}\right )}{4}}{c^{2}}\right )}{c}\) | \(335\) |
default | \(\frac {c \arctan \left (x \right ) \operatorname {arccot}\left (c x \right )+c^{2} \left (\frac {\arctan \left (c x \right ) \arctan \left (x \right )}{c}-\frac {\frac {i c^{2} \ln \left (1-\frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right ) \arctan \left (c x \right )}{2+2 c}+\frac {i c \arctan \left (c x \right ) \ln \left (1-\frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{2+2 c}+\frac {c^{2} \arctan \left (c x \right )^{2}}{2+2 c}+\frac {c^{2} \operatorname {polylog}\left (2, \frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{4+4 c}+\frac {c \arctan \left (c x \right )^{2}}{2+2 c}+\frac {c \operatorname {polylog}\left (2, \frac {\left (c -1\right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (-c -1\right )}\right )}{4+4 c}-\frac {i c \arctan \left (c x \right ) \ln \left (1-\frac {\left (1+c \right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (1-c \right )}\right )}{2}-\frac {c \arctan \left (c x \right )^{2}}{2}-\frac {c \operatorname {polylog}\left (2, \frac {\left (1+c \right ) \left (i c x +1\right )^{2}}{\left (c^{2} x^{2}+1\right ) \left (1-c \right )}\right )}{4}}{c^{2}}\right )}{c}\) | \(335\) |
1/2*Pi*arctan(x)-1/4*ln(1-I*c*x)*ln((-c-I*c*x)/(-c-1))-1/4*dilog((-c-I*c*x )/(-c-1))+1/4*ln(1-I*c*x)*ln((c-I*c*x)/(c-1))+1/4*dilog((c-I*c*x)/(c-1))-1 /4*ln(1+I*c*x)*ln((-c+I*c*x)/(-c-1))-1/4*dilog((-c+I*c*x)/(-c-1))+1/4*ln(1 +I*c*x)*ln((c+I*c*x)/(c-1))+1/4*dilog((c+I*c*x)/(c-1))
\[ \int \frac {\cot ^{-1}(c x)}{1+x^2} \, dx=\int { \frac {\operatorname {arccot}\left (c x\right )}{x^{2} + 1} \,d x } \]
\[ \int \frac {\cot ^{-1}(c x)}{1+x^2} \, dx=\int \frac {\operatorname {acot}{\left (c x \right )}}{x^{2} + 1}\, dx \]
Time = 0.30 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.02 \[ \int \frac {\cot ^{-1}(c x)}{1+x^2} \, dx=-\frac {1}{8} \, c {\left (\frac {8 \, \arctan \left (c x\right ) \arctan \left (x\right )}{c} - \frac {4 \, \arctan \left (c x\right ) \arctan \left (x\right ) - 4 \, \arctan \left (x\right ) \arctan \left (\frac {c x}{c - 1}, -\frac {1}{c - 1}\right ) + \log \left (x^{2} + 1\right ) \log \left (\frac {c^{2} x^{2} + 1}{c^{2} + 2 \, c + 1}\right ) - \log \left (x^{2} + 1\right ) \log \left (\frac {c^{2} x^{2} + 1}{c^{2} - 2 \, c + 1}\right ) + 2 \, {\rm Li}_2\left (\frac {i \, c x + c}{c + 1}\right ) + 2 \, {\rm Li}_2\left (-\frac {i \, c x - c}{c + 1}\right ) - 2 \, {\rm Li}_2\left (\frac {i \, c x + c}{c - 1}\right ) - 2 \, {\rm Li}_2\left (-\frac {i \, c x - c}{c - 1}\right )}{c}\right )} + \operatorname {arccot}\left (c x\right ) \arctan \left (x\right ) + \arctan \left (c x\right ) \arctan \left (x\right ) \]
-1/8*c*(8*arctan(c*x)*arctan(x)/c - (4*arctan(c*x)*arctan(x) - 4*arctan(x) *arctan2(c*x/(c - 1), -1/(c - 1)) + log(x^2 + 1)*log((c^2*x^2 + 1)/(c^2 + 2*c + 1)) - log(x^2 + 1)*log((c^2*x^2 + 1)/(c^2 - 2*c + 1)) + 2*dilog((I*c *x + c)/(c + 1)) + 2*dilog(-(I*c*x - c)/(c + 1)) - 2*dilog((I*c*x + c)/(c - 1)) - 2*dilog(-(I*c*x - c)/(c - 1)))/c) + arccot(c*x)*arctan(x) + arctan (c*x)*arctan(x)
\[ \int \frac {\cot ^{-1}(c x)}{1+x^2} \, dx=\int { \frac {\operatorname {arccot}\left (c x\right )}{x^{2} + 1} \,d x } \]
Timed out. \[ \int \frac {\cot ^{-1}(c x)}{1+x^2} \, dx=\int \frac {\mathrm {acot}\left (c\,x\right )}{x^2+1} \,d x \]