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

1 Answer

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$.

-
That is the result, but for homework problems we don't give the result, we give hints for how to get the result. See physics.stackexchange.com/faq –  FrankH Dec 12 '12 at 17:15
@FrankH: I'm sorry, I wasn't aware that you have a different homework policy here; I originally saw this question on math.SE and followed it here when it was migrated. It's rather ironic that the FAQ you linked to (or rather the meta thread that it links to) quotes an obsolete thread on meta.math.SE to argue for this policy, which is not the current math.SE policy on homework (which is basically that everyone deals with it as they see fit). –  joriki Dec 14 '12 at 11:54
No problem, I should have given this link meta.physics.stackexchange.com/q/714 –  FrankH Dec 14 '12 at 15:29
@FrankH: Yes, that's also the one I was referring to; I found it from the FAQ you linked to. –  joriki Dec 14 '12 at 17:44