Consider a long thin wire of uniform linear charge density λ. Let us find electric field due to the wire at the point P at a normal distance. PN=r from the wire. Let AB=dxbe a small elementary portion of the wire at a distance x from point N.
Then charge on the elementary portion AB,dq=λdn
Therefore, electric field due to the small portion AB at the point P.
dE=14π∈0×dp(op)2=14π∈0×λdx(r2+x2)
The component dEsinθ due to the different small portions, such as AB will cancel rach other. Therefore, effective field due to the small portion AB,
dE1=sE=cosθ=14π∈0×λdx(r2+x2)cosθ
Here,
x=rtanθ
∴dx=rsec2θdθ
r2+x2=r2+r2tan2θ=r2sec2θ
∴dE1=14π∈0×λsec2θdθr2sec2θcosθ
=14π∈0×λrcosθdθ
The electric field due to the whole long wire can be found by integrating the above between proper limits i.e., θ=−π/2 to θ=−π/2
∴E=∫π/2−π/214π∈0×λrcosθdθ
=14π∈0×λr∫π/2−π/2cosθdθ=14π∈0×λr|sinθ|π/2−π/2
=14π∈0×λr∣∣∣sinπ2−sin(π2)∣∣∣
=14π∈0×λr|1−(−1)|=14π∈0×λr×2
=λ2π∈0r