# Finding the electric field for a shell of charge

Suppose we have charge density defined

$$\rho(x,y,z) = \begin{cases} 0 & 0 \leq r < a \\ K & a \leq r\leq b\\ 0 & b< r \end{cases}$$

For some constants $K,a,b$

How would we find the electric field for all points in space? Any help I would greatly appreciate! I imagine we argue that the field must be symmetric, but I was having difficulty proceeding from there.

-
Does it help if I tell you that everyone who has already had the first upper division semester of either E&M or mechanics can write the answer down even if they can't recall how you get there? In any case,as I recall you start with a infinitesimal shell so that you have only the inside and outside cases to worry about, put the center of the charge distribution at the origin, use spherical coordinates and then just plow through the integral. Once you know the thin shell answer the rest is easy to bootstrap. – dmckee Dec 12 '12 at 14:20
Do you know Gauss's Law? – Colin McFaul Dec 12 '12 at 14:39

The electric field due to a spherical shell is zero inside the sphere and equal to the field of an equivalent charge at the centre outside the sphere. Thus the field is directed outward everywhere, and its strength is zero for $r\lt a$, $K\frac43\pi(r^3-a^3)/r^2$ for $a\le r\le b$ and $K\frac43\pi(b^3-a^3)/r^2$ for $b\lt r$.