Derivation of electric field intensity for Line charge
In the highlighted area vector R is the place translation from a charge element dl in z axis to the observation point where the total E is wanted.

The first term of R is the placement of the xy projection of the observation point (a constant vector in xy plane when the integration is done), the second term is the z component of R, it's the z-difference times z-unit vector. The second term contains the integration variable (=the z coordinate of the charge element).

ϕ is constant in integration, it is included to xy-place of the observation point (ϕ=the direction angle of unit vector ap), but it isn't needed as variable in the integration, where only a zone in z axis is walked through to collect total E