Disclaimer: I've done the calculation myself, but trying to verify this is hard. I couldn't find much online, and when I did, the sources disagreed in their finding. Also, searching reveals one question on here like this, but the math is far different than what we use in my class. (And a tutor at my school had a completely different response. Anway, on to the problem...)
For an infinitely long nonconducting cylinder of radius R, which carries a uniform volume charge density $\rho$, calculate the electric field at a distance $r<R$.
I did:
$\phi_e = \int \vec{E}d\vec{A} = \frac{Q_{in}}{\epsilon_0}$, where I'm measuring $A$ to be the area of the Gaussian surface (not the real cylinder).
$\phi_e = \vec{E}(2\pi rl) = \frac{Q_{in}}{\epsilon_0}$ ; however I can write $Q_{in} = \rho(\pi r^2 l)$
$\rightarrow \vec{E} = \frac{\rho\pi r^2 l}{(2\pi rl)\epsilon_0} = \frac{\rho r}{2\epsilon_0}$
Can someone please confirm/deny if this is correct? I feel like the equation should be taking into consideration the cylinder radius R, but perhaps it doesn't matter (and is only in the problem to make me question it?).
Thanks!