In[]:=
Module[​​{r=RandomReal[{-5,5}],θ=RandomReal[{0,2π}],c,s,αplu,αmin,β,γ},​​c=Cos[θ];s=Sin[θ];​​αplu=1+4cr+2(2c^2+1)r^2+4cr^3+r^4;​​αmin=1-4cr+2(2c^2+1)r^2-4cr^3+r^4;​​β=1-2r^2(2s^2+1)+r^4;​​γ=(2β)/Sqrt[αpluαmin];​​ Echo[{r,θ},"{r, θ} = "];​​ ​​{{"OP integral","v-integral","post-residue thm",​​"closed form"},{"","","",""},​​{​​NIntegrate[1/(r^2+1-2rCos[u]),{u,θ-π,θ-2π}]-NIntegrate[1/(r^2+1-2rCos[u]),{u,θ,θ-π}],​​(4rsγ)/βNIntegrate[1/(1+γv+v^2),{v,0,∞}],​​(8rSin[θ])/(1-2r^2Cos[2θ]+r^4)*(1-2r^2Cos[2θ]+r^4)/(8r(1-r^2)Abs[Sin[θ]])(Arg[1-4r^2+r^4-4Ir(-1+r^2)Abs[Sin[θ]]+2r^2Cos[2θ]]-Arg[1-4r^2+r^4+4Ir(-1+r^2)Abs[Sin[θ]]+2r^2Cos[2θ]]),​​Sign[s]/(1-r^2)(ArcTan[β,4r(1-r^2)Abs[s]]-ArcTan[β,-4r(1-r^2)Abs[s]])​​}​​}//Transpose//Grid​​]
»
{r, θ} = {2.6612,4.88414}
Out[]=
OP integral
-0.467976
v-integral
-0.467976
post-residue thm
-0.467976
closed form
-0.467976