Question
State Gauss's law in electrostatics. Use this law to derive an expression for the electric field due to an infinitely long straight wire of linear charge density A cm–1.
Solution
Gauss’s law in electrostatics: It states that total electric flux over the closed surface S is times the total charge (q) contained in side S.
Electric field due to an infinitely long straight wire.
Let us consider an infinitely long line charge having linear charge density . Assume a cylindrical Gaussian surface of radius r and length 1 coaxial with the line charge.

By symmetry, the electric field E has same magnitude at each point of the curved surface S1 and is directed radially outward. So angle at surfaces between is zero, and angle of with at are .
Total flux through the cylindrical surface,
Since λ is the charge per unit length and l is the length of the wire.
Thus, the charge enclosed
Electric field due to an infinitely long straight wire.
Let us consider an infinitely long line charge having linear charge density . Assume a cylindrical Gaussian surface of radius r and length 1 coaxial with the line charge.

By symmetry, the electric field E has same magnitude at each point of the curved surface S1 and is directed radially outward. So angle at surfaces between is zero, and angle of with at are .
Total flux through the cylindrical surface,
Since λ is the charge per unit length and l is the length of the wire.
Thus, the charge enclosed
q = λl
According to Gaussian law,

According to Gaussian law,
