Electric Field of Hollow Cylinder Let's say we have a hollow cylinder with a charge $q$, radius $r$ and height $h$ as in the figure below.

I am trying to find the electric field perpendicular to the surface of the hollow cylinder. I think the easiest way is Gauss' law which is;
$$
\phi_E=\int_SEdA= \frac Q{\epsilon_0}
$$
Thus when we apply the Gaussian surface(whom I chose as a cylinder) we should take the surface integral of it. However, I can not figure the rest out. What would be the final equation when we try to find $E$ in means of $q$, $r$, $h$, $\pi$ and $\epsilon_0$?
Moreover, would the electric field inside the cylinder be 0 because of the symmetry and since all electric field vectors that are exerted by each charge would cancel each other out?
 A: I'm assuming here that the cylinder is "infinitely long", or at least very long so that $h >> r$.  Otherwise, there are complicated non-integrable "end effects", but it doesn't look like you're interested in those.
As you said, you need Gauss's law.  You're losing something important if you drop the vector notation, though, so I've added it back in.
$$
\phi_E=\int_S \vec{E} \cdot d\vec{A}= \frac Q{\epsilon_0}
$$
The critical part, which you've already done, is to choose a surface on which $E$ is constant, so the integral is easy to evaluate.
You should pick a cylindrical surface of radius $R$ and height $L$, centered on the axis of the charged cylinder.  An illustration of that surface (in green) is shown here:
With that choice of surface, simply by symmetry, the $E$ field must have the same value, and the same direction relative to the normal vector $d\vec{A}$, everywhere on the curved part of the surface!
On the flat ends of your cylindrical surface, the $E$ field is not constant, but it is parallel to the surface, and therefore perpendicular to the surface vector $d\vec{A}$, so the dot product $\vec{E} \cdot d\vec{A}$ is zero on those surfaces, and we can ignore them in the integral.
Here I've split the integral into the two parts - the integral over the curved part of the surface, and the flat ends, and I've evaluated both parts of the integral.
$$\int_{curved} \vec{E} \cdot d\vec{A} + \int_{ends} \vec{E} \cdot d\vec{A}= \frac Q{\epsilon_0}$$
$$\int_{curved} E dA + 0= \frac Q{\epsilon_0}$$
$$E \int_{curved} dA= \frac Q{\epsilon_0}$$
$$E ~A_{curved} = \frac Q{\epsilon_0}$$
$$E ~2 \pi R L = \frac Q{\epsilon_0}$$
Notice that on the curved part, since $\vec{E}$ and $d\vec{A}$ are in the same direction, their dot product is simply $E dA$, and since the magnitude $E$ is the same everywhere, we can remove it from the integral as a constant.  Then we're simply integrating $dA$, which simply gives us the area of that part of the surface.
The last job we have is to find how much charge ($Q$) is inside our surface.  The charge density is $\sigma = \frac{q}{2 \pi r h}$
There are two cases.

*

*If $R > r$, then the $Q = 2 \pi r L \sigma = q \frac{L}{h}$.

*If $R < r$, then no charge is inside our surface, so $Q = 0$.

So, using our final version of Gauss's law:
$$E ~2 \pi R L = \frac Q{\epsilon_0}$$
$$E = \frac{Q}{2 \pi \epsilon_0 R L}$$
And our final answer is:
$R<r$;$$E(R) = 0$$
$R>r$;$$E(R) = \frac{q}{2 \pi \epsilon_0 R h}$$
A: Your answer is right but the cylinder is of infinite length so you have to express the Electric field in terms of aerial charge density, not in terms of total charge.
$$  E=\frac{\sigma}{\epsilon_0}\frac{r}{R}$$
