Evaluation of integrals for a cylindrical field distribution of finite and infinite length.

ClearAll[i, iu]
i = Integrate[{1,u}(u^2 + a^2)^(-3/2),u, Assumptions-> (a > 0)];
iu[x_] = i /. u -> x;
Limit[iu[z]-iu[-z] ,z -> Infinity,Direction->1]
Limit[iu[z]-iu[-z] ,z -> -Infinity,Direction->-1]

ClearAll[int1]

int1[p_,phip_,a_]=Integrate[1/(1+a^2-2 a Cos[phip - p]),p,Assumptions->(a∈Reals && 0≤p≤2 Pi && 0≤phip≤2 Pi )];
int1[ϕ,θ,r]// TraditionalForm

FullSimplify[int1[2 Pi,phip,r]-int1[0,phip,r], Assumptions-> 0≤phip≤2 Pi]

ClearAll[ int21,int22,do]
int21[p_,a_]=Integrate[E^( I p)/(1+a^2-2 a Cos[p]),p,Assumptions->(a∈Reals && 0≤p≤2 Pi)];
int22[p_,a_]=Integrate[E^( 2I p)/(1+a^2-2 a Cos[p]),p,Assumptions->(a∈Reals && 0≤p≤2 Pi)];
int21[ϕ,r]// TraditionalForm
int22[ϕ,r]// TraditionalForm

FullSimplify[int21[2 Pi -theta,r]-int21[-theta,r], 0≤theta≤2 Pi]
FullSimplify[int22[2 Pi-theta,r]-int22[-theta,r], 0≤theta≤2 Pi]