This is just a quick question of a misconception I have. I've looked through books, and online pretty extensively, and I couldn't find the simple answer I was looking for, so I came here.

Gauss's Law is of the form: $$ \Phi_E=\oint \vec E\cdot ~\mathrm d\vec a = \frac {q_\textrm{enc}} {\varepsilon_0}$$

Say we have some charged sphere, with continuous charge distribution $ \rho $, and radius $R.$ We have to draw a Gaussian surface, of radius $r.$

My question is... how do we determine the volume parameters inside $q_\textrm{enc}$ I know it can be defined as $q_\textrm{enc} = \displaystyle \int\rho ~\mathrm dV $, and since the charge distribution is continuous we can pull it out, and integrate and get $q_\textrm{enc} = \rho V $. We also know what $\rho$ is, and that is $\rho = q/V.$ Depending on where the Gaussian surface is placed, these volumes can be different.

For example, if we are inside the sphere, we get $ q_\textrm{enc} = \rho V=\frac q {V_1}V_2=\frac {q} {\frac 4 3\pi R^3}(\frac 4 3\pi r^3) =\frac {qr^3} {R^3}$. This will then simplify to the proper electric field, once we set it divided by $\varepsilon_0$ equal to the flux, which is $\vec E =\frac 1 {4\pi \varepsilon_0} \frac {qr} {R^3}$.

How do we determine which volume is which, the volume the sphere encloses, or the volume the Gaussian surface encloses? Because when we examine the electric field outside the sphere, $V_1$ and $V_2$ equal each other and cancel, giving $\vec E = \frac 1 {4\pi \varepsilon_0} \frac q {r^2} \hat r\,.$ So those $V_1$ and $V_2$ must have some reasoning behind their choosing, or I'm interpreting something wrong, and everything I've written is invalid.

  • $\begingroup$ "since the charge distribution is continuous we can pull it out" not true, you can only pull out a term like that if it is independent of the parameters being integrated over. In this case, this means that the charge density is constant over some volume, or homogeneous. It could be continuous and spatially varing (e.g. $\rho = \rho_0*r^2$) and you would need to keep the positional part in the integral. $\endgroup$ Sep 19, 2016 at 5:41

3 Answers 3


First of all, let's see what Gauss's divergence theorem tells: the outward flux of a vector field through a closed surface is equal to the volume integral of the divergence over the region inside the surface. Intuitively, it states that the sum of all sources minus the sum of all sinks gives the net flow out of a region.

Now, let's look at the Gauss's law in electrostatics:

In differential form, it reads


This means the net outward flux of the electric field lines normal to the surface enclosing the charge is equal to the net charge enclosed by the surface. On integrating the above equation over a spherical volume enclosing the charge,

$$\int_V \nabla\cdot\vec{E}d\tau'=\frac{1}{\epsilon_0}\int_V \rho_{enc}d\tau'$$

By Gauss's divergence theorem, this volume integral of $\vec{E}$ is equal to the outward flux of $\vec{E}$ throgh a closed surface enclosing the charge:

$$\int_V \nabla\cdot\vec{E}d\tau'=\int_{\sigma}\vec{E}\cdot d\vec{\sigma}$$


$$\int_{\sigma}\vec{E}\cdot d\vec{\sigma}=\frac{1}{\epsilon_0}\int_V \rho_{enc}d\tau'=\frac{q_{enc}}{\epsilon_0}$$

where we have assumed that the volume charge density is continuous and constant. This is Gauss's law in integral form.

So, to use Gauss's law, you should choose the integrating region to be a surface that encloses the charge.

Now, let's look at your problem.

To find the electric field at some point outside the sphere of radius $R$:

We have

$$\int_{\sigma}\vec{E}\cdot d\vec{\sigma}=\frac{q_{enc}}{\epsilon_0}$$

where the integration is over a Gaussian spherical surface enclosing the charged sphere of radius $r$ such that $r>R$ Since the electric field is symmetrical about a spherical surface, we can take it out of the integral. Also the electric field pointing outside the surface is in the same direction as area vector of the spherical surface. Taking $q_{enc}=q$, the total charge enclosed by the charged sphere:

$$E\int_{\sigma}d\sigma=E.4\pi r^2=\frac{q}{\epsilon_0}$$


In particular, at the surface ($r=R$),


To find the electric field at some point inside the sphere of radius $R$:

Here our Gaussian sphere is inside the charged sphere. i.e., $r<R$. Since the Gaussian surface is inside the charged sphere, our Gaussian surface do not enclose the entire charge distribution, but only less. Hence the electric field at any point inside the charged sphere will be less than that at the surface.

First we need to find out what is $q_{enc}$.

$$q_{enc}=\int_0^r \rho d\tau'=q\left(\frac{r}{R}\right)^3$$.

Hence the electric field inside the sphere is

$$E.4\pi r^2=\frac{1}{\epsilon_0}q\left(\frac{r}{R}\right)^3$$

$$E=\frac{1}{4\pi\epsilon_0}\frac{qr}{R^3} $$


$$ \vec{E}= \begin{cases} \Large{\frac{1}{4\pi\epsilon_0}\frac{q}{r^2}\hat{r}}, &\text{if $r>R$; outside the charged sphere}\\[2ex] \Large{\frac{1}{4\pi\epsilon_0}\frac{q}{R^2}\hat{r}}, &\text{if $r=R$; on the charged sphere}\\[2ex] \Large{\frac{1}{4\pi\epsilon_0}\frac{qr}{R^3}\hat{r}}, &\text{if $r<R$; inside the charged sphere} \end{cases} $$


I don't really understand your question in fact.

But anyway, the $q_{\text{enc}}$ always means the charge enclosed by the Gaussian surface. Hope this help.


In a simple case you are given the volume charge density as being constant or a function which depends on the distance from the centre of a charged sphere of radius $R$.
You are asked to find the electric field at some distance from the centre of the sphere $a$.

If $a<R$ then the enclosed charge will be that enclosed in a sphere of radius $a$ whereas if $a\ge R$ then the enclosed charge will be the charge in a sphere of radius $R$ ie all the charge.


Not the answer you're looking for? Browse other questions tagged or ask your own question.