# How do I use a charge density to calculate an electric field (e.g. $\nabla \cdot\vec E = \frac{\rho}{\epsilon_0}$)? [duplicate]

Simple, possibly stupid question, but here it is.

So I know $$\nabla \cdot\vec E = \frac{\rho}{\epsilon_0},$$ but how do I use a given charge density to calculate an electric field?

I guess the root of my question is about the mathematical procedure of "undoing" the div operator.

• The div operator represents differentiation. Do you know how to solve differential equations? – Floris Sep 25 '17 at 2:44
• Yeah, so would I just differentiate the charge density expression? – Swoldier Sep 25 '17 at 2:48
• No - you have to integrate both sides to get E on the left. See this question and associated answer - which is probably a duplicate of this one... – Floris Sep 25 '17 at 2:52
• You also need the curl of the $\vec{E}$ field. If this is electrostatics ($\nabla X\vec{E}=0$), then you can just use Coulomb's law for a continuous charge distribution: $\vec{E}=\frac{1}{4\pi\epsilon_0}\int \frac{dq}{r^2}\hat{r}$ – AlbertB Sep 25 '17 at 2:54
• Not quite a duplicate, @Floris. The other question is about electric potential, this is about electric field. It's trivial to get from potential to field (negative gradient), but they are distinct concepts. In Purcell's textbook they draw a triangle among charge density, electric field, and electric potential, with lines going both directions between every pair of quantities with formulae for how to get from one to the other. – Sean E. Lake Sep 25 '17 at 3:00