\(\int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx\) [233]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 9, antiderivative size = 57 \[ \int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx=-\frac {1}{2} i \operatorname {PolyLog}\left (2,-\frac {i}{x}\right )+\frac {1}{2} i \operatorname {PolyLog}\left (2,\frac {i}{x}\right )+\frac {1}{2} i \operatorname {PolyLog}(2,-i x)-\frac {1}{2} i \operatorname {PolyLog}(2,i x) \]

[Out]

-1/2*I*polylog(2,-I/x)+1/2*I*polylog(2,I/x)+1/2*I*polylog(2,-I*x)-1/2*I*polylog(2,I*x)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {14, 4941, 2438, 4940} \[ \int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx=-\frac {1}{2} i \operatorname {PolyLog}\left (2,-\frac {i}{x}\right )+\frac {1}{2} i \operatorname {PolyLog}\left (2,\frac {i}{x}\right )+\frac {1}{2} i \operatorname {PolyLog}(2,-i x)-\frac {1}{2} i \operatorname {PolyLog}(2,i x) \]

[In]

Int[(ArcCot[x] + ArcTan[x])/x,x]

[Out]

(-1/2*I)*PolyLog[2, (-I)/x] + (I/2)*PolyLog[2, I/x] + (I/2)*PolyLog[2, (-I)*x] - (I/2)*PolyLog[2, I*x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2438

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 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4941

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

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\cot ^{-1}(x)}{x}+\frac {\arctan (x)}{x}\right ) \, dx \\ & = \int \frac {\cot ^{-1}(x)}{x} \, dx+\int \frac {\arctan (x)}{x} \, dx \\ & = \frac {1}{2} i \int \frac {\log \left (1-\frac {i}{x}\right )}{x} \, dx-\frac {1}{2} i \int \frac {\log \left (1+\frac {i}{x}\right )}{x} \, dx+\frac {1}{2} i \int \frac {\log (1-i x)}{x} \, dx-\frac {1}{2} i \int \frac {\log (1+i x)}{x} \, dx \\ & = -\frac {1}{2} i \operatorname {PolyLog}\left (2,-\frac {i}{x}\right )+\frac {1}{2} i \operatorname {PolyLog}\left (2,\frac {i}{x}\right )+\frac {1}{2} i \operatorname {PolyLog}(2,-i x)-\frac {1}{2} i \operatorname {PolyLog}(2,i x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00 \[ \int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx=-\frac {1}{2} i \operatorname {PolyLog}\left (2,-\frac {i}{x}\right )+\frac {1}{2} i \operatorname {PolyLog}\left (2,\frac {i}{x}\right )+\frac {1}{2} i \operatorname {PolyLog}(2,-i x)-\frac {1}{2} i \operatorname {PolyLog}(2,i x) \]

[In]

Integrate[(ArcCot[x] + ArcTan[x])/x,x]

[Out]

(-1/2*I)*PolyLog[2, (-I)/x] + (I/2)*PolyLog[2, I/x] + (I/2)*PolyLog[2, (-I)*x] - (I/2)*PolyLog[2, I*x]

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.21

method result size
default \(\ln \left (x \right ) \operatorname {arccot}\left (x \right )+\ln \left (x \right ) \arctan \left (x \right )\) \(12\)
parts \(\ln \left (x \right ) \operatorname {arccot}\left (x \right )+\ln \left (x \right ) \arctan \left (x \right )\) \(12\)

[In]

int((arctan(x)+arccot(x))/x,x,method=_RETURNVERBOSE)

[Out]

ln(x)*arccot(x)+ln(x)*arctan(x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.09 \[ \int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx=-\frac {1}{2} \, \pi \log \left (x\right ) \]

[In]

integrate((arctan(x)+arccot(x))/x,x, algorithm="fricas")

[Out]

-1/2*pi*log(x)

Sympy [F]

\[ \int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx=\int \frac {\operatorname {acot}{\left (x \right )} + \operatorname {atan}{\left (x \right )}}{x}\, dx \]

[In]

integrate((atan(x)+acot(x))/x,x)

[Out]

Integral((acot(x) + atan(x))/x, x)

Maxima [A] (verification not implemented)

none

Time = 0.42 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.16 \[ \int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx={\left (\arctan \left (x\right ) + \arctan \left (1, x\right )\right )} \log \left (x\right ) \]

[In]

integrate((arctan(x)+arccot(x))/x,x, algorithm="maxima")

[Out]

(arctan(x) + arctan2(1, x))*log(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.09 \[ \int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx=-\frac {1}{2} \, \pi \log \left (x\right ) \]

[In]

integrate((arctan(x)+arccot(x))/x,x, algorithm="giac")

[Out]

-1/2*pi*log(x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\cot ^{-1}(x)+\arctan (x)}{x} \, dx=\int \frac {\mathrm {atan}\left (x\right )+\mathrm {acot}\left (x\right )}{x} \,d x \]

[In]

int((atan(x) + acot(x))/x,x)

[Out]

int((atan(x) + acot(x))/x, x)