The total electric flux through a closed surface in free space is equal to \(\frac 1{\varepsilon_0}\) times the net charge enclosed by the surface.
i.e., \(\phi = \frac q{\varepsilon_0}\)
In the above fig.
AB is the infinitely long wire
E is the electric field
P is a point at a distance r from the wire
'r' is the radius of Gaussian cylinder
'l' is the length of the Gaussian cylinder
Let 'q' be the charge enclosed by the Gaussian cylinder . Let 'λ' be the linear charge density on the wire.
Flux through the end faces is zero because there are no components of electric field along the normal to the end faces.
ϕ = flux through curved surface
ϕ = E x area of curved surface (ϕ = E x area)
ϕ = E × 2πrl .......(1)
From Gauss's theorem
\(\phi = \frac q{\varepsilon_0}\) ......(2)
But \(\lambda = \frac ql\)
⇒ \(q = \lambda l\)
⇒ \(\phi = \frac {\lambda l}{\varepsilon_0}\) .....(3)
On comparing (1) and (3), we get
\(E \times 2\pi rl= \frac {\lambda l}{\varepsilon_0}\)
\(E = \frac {\lambda }{2\pi\varepsilon_0}\)
\(E = \frac 1{2\pi \varepsilon_0} \frac \lambda r\)
The direction of 'E' is perpendicular to the wire and directed away from the wire.