Q.
A uniformly charged and infinitely long line having a liner charge density λ is placed at a normal distance y from a point O. Consider a sphere of radius R with O as centre and R>y. Electric flux through the surface of the sphere is
Electric flux, ∮SE.ds=ε0qin qin is the charge enclosed by the Gaussian surface which, in the present case, is the surface of given sphere. As shown, length AB of line lies inside the sphere.
In △OO′A R2=y2+(O′A)2 ∴O′A=R2−y2
and AB=2R2−y2
Charge on length AB=2R2−y2×λ ∴ Electric flux =∮SE⋅ds=ε02λR2−y2