I was wondering what was the direction of the electric field between the two surfaces of a hollow sphere with constant charge density $\rho$. With the help of Gauss' Law I got the following absolute values for $\vec{E}$:
$r<r_1$: $E = 0$
$r_1<r<r_2$: $E = \frac{\rho}{3 \epsilon_0} (r - \frac{r_1^3}{r})$
$r_2 < r$: $E = \frac{\rho}{3 \epsilon_0} \frac{r_2^3 - r_1^3}{r^2}$.
I would think that the field lines are directed outwards for $r>r_2$ and inwards for $r_1<r<r_2$ because there is more positive charge on the outer border of the shell than on the inner one (the volume element is there greater). But when I graph $E(r)$ it then creates a surprising discontinuity at $r_2$ that makes me think it might also be directed radially outwards. Can someone please clear up my doubts?
Thanks a lot in advance.
Julien.
Due to the spherical symmetry, the electric field can never be directed inwards (assuming $\rho$ is positive.) To prove this, proceed by contradiction:
Suppose there was some point in space where the electric field pointed inwards. Let $R$ denote the distance between this point and the center of the sphere.
By spherical symmetry, all points at this same distance $R$ from the center of the sphere must have an inward-directed electric field.
If we then take a Gaussian surface to be a sphere of radius $R$, the integral of the electric flux over this surface will be $\oint \vec{E} \cdot d\vec{a} < 0$, since $\vec{E}$ and $d\vec{a}$ point in opposite directions.
By Gauss's Law, the total charge enclosed in this sphere must therefore be negative. This is a contradiction, because $\rho$ is positive or zero everywhere in space.
By the way, your electric field magnitude isn't "discontinuous"; the value of the electric field as you approach $r_2$ (or $r_1$) from the inside is the same as you approach that same point from the outside. It does, however, have a "kink" in the plot. A general rule of thumb is that if the charge distribution $\rho$ is defined at all points in space and has a discontinuous $n$th derivative, then $\vec{E}$ will have a discontinuous $(n+1)$th derivative. Here, since the function $\rho$ is itself discontinuous at $r = r_1$ and $r = r_2$ (we can think of this as the "0th" derivative being discontinuous), then the first derivative of $\vec{E}$ is also discontinuous.