# Divergence/flux of an E field for two spherical regions

1. Oct 28, 2013

### Hakkinen

1. The problem statement, all variables and given/known data
Consider the following electric field:
$\vec{E}=\frac{\rho }{3\varepsilon _{0}}\vec{r}$ where $r\leq R$
and $\vec{E}=\frac{\rho R^3 }{3\varepsilon _{0}r^2}\hat{e_{r}}$
where $r>R$

(a) calculate the divergence of the electric field in the two regions

(b) calculate the electric flux through a sphere of radius r<R and show it is equal to:
$\int_{0}^{r}r^2 dr$ $\int_{0}^{\pi }\sin \theta d\theta$$\int_{0}^{2\pi }d\phi \frac{\rho }{\varepsilon _{0}}$

(c) calculate the electric flux through a sphere of radius r>R and show it's equal to:
$\int_{0}^{R}r^2 dr$ $\int_{0}^{\pi }\sin \theta d\theta$$\int_{0}^{2\pi }d\phi \frac{\rho }{\varepsilon _{0}}$

2. Relevant equations

Divergence in spherical coordinates: http://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates

3. The attempt at a solution

So far I have only been able to do part a.

Both regions of the electric field only have $E_{r}$ components which simplifies the dot product.
So the div for reg. 1 is
$\frac{1}{r^2}\frac{3\rho r^2}{3\varepsilon _{0}} = \frac{\rho }{\varepsilon _{0}}$

and for reg 2 the divergence is 0 since $\frac{\partial }{\partial r} \frac{r^2\rho R^3}{3r^2\varepsilon _{0}}=0$

The flux of an E in a region would be $\triangledown \cdot d\vec{A}$. I can see in the volume integrals I am supposed to get that the terms in the integrands are the elements of the general differential surface area element of a spherical region. I am just stuck as to how to proceed and use the divergence theorem to show parts b and c.

Any help and assistance will be greatly appreciated!

2. Oct 28, 2013

### king vitamin

Since you've already computed the value of $\nabla \cdot \vec{E}$ everywhere, you can use

$$\int d\vec{A} \cdot \vec{E} = \int dV (\nabla \cdot \vec{E})$$

and just use what you calculated in the first part. Just remember that the surface in the integral on the left bounds the volume in the integral on the right.

3. Oct 28, 2013

### Hakkinen

Thanks! So it's much simpler than I thought, just a straightforward application of the divergence theorem in the context of gauss' law.

Last edited: Oct 28, 2013
4. Oct 28, 2013

### Hakkinen

however, could there be a typo in part c? I wrote it exactly as typed from the professor but if the divergence of that 2nd region is zero than the whole volume integral should be zero too?

5. Oct 29, 2013

### king vitamin

Be careful! The divergence of E is actually a function of r here. As you noted, it takes different values in different regions. Did you notice the integration limits in part c)?