Calculate the electric field at a point P located at a distance r from the axis of a long cylindrical and homogeneous distribution of charge of density ρ and radius R.
Case 1 will be that P is outside the cylinder, in which case we consider an
enclosing surface with the shape of a cylinder of radius r and height h.
According to Gauss
\( \oint \vec E . d\vec a = \dfrac {Q_{enclosed}} {\epsilon_0} \)
So, in this case
\( E 2\pi r h = \dfrac {\rho h \pi R^2} {\epsilon_0} \)
After simplication we get
\( E = \dfrac {\rho R^2} {2 \epsilon_0 r} \) for r > R
Notice that the electric field drops like 1/r as opposed to the usual
1/r2 for point charges.
Case 2 will be that P is inside the cylinder, in which case we consider again an
enclosing surface with the shape of a cylinder of radius r and height h, but
only the charge inside the cylinder of radius r will be enclosed.
So, in this case
\( E 2\pi r h = \dfrac {\rho h \pi r^2} {\epsilon_0} \)
After simplication we get
\( E = \dfrac {\rho r} {2 \epsilon_0} \) for r < R
Notice that the electric field is linearly proportional to r, which is the
same for a uniformly charged sphere.