# Electromagnetism question

1. Feb 9, 2009

### latentcorpse

A sphere of radius R has a unifromly distributed charge Ze inside it (essentially it's a model of a nucleus)

now my tutor worked through the first part of the question with me and we established that the potential inside the sphere was

$\varphi(\mathbf{r})=-\frac{Zer^2}{8 \pi \epsilon_0 R^3} + \frac{3Ze}{8 \pi \epsilon_0 R}$ and the field inside was $\mathbf{E}(\mathbf{r})=\frac{Zer}{4 \pi \epsilon_0 R^3} \mathbf{\hat{r}}$

the question i'm stuck on is showing that the electrostatic energy, $\frac{1}{2} \int dV \rho \varphi$, of the nucleus is equal to the field energy, $\frac{1}{2} \epsilon_0 \int dV \mathbf{E}^2$.

i took $\rho=\frac{Ze}{\frac{4}{3} \pi R^3}=\frac{3Ze}{4 \pi R^3}$

and so electrostatic energy is
$\frac{1}{2} \frac{3Z^2e^2}{32 \pi^2 \epsilon_0} \int_{r=0}^R (\frac{3}{R^4}-\frac{r^2}{R^6}) dr \int_{\theta=0}^{\pi} d \theta \int_{\phi=0}^{2 \pi} d \phi = \frac{3 Z^2 e^2}{32 \epsilon_0} [\frac{3}{R^3}-\frac{1}{3R^3}]=\frac{Z^2 e^2}{4 \epsilon_0 R^3}$

and the field energy is
$\frac{1}{2} \epsilon_0 \int dV \frac{Z^2 e^2 r^2}{16 \pi^2 \epsilon_0^2 R^6}=\frac{Z^2 e^2}{32 \pi^2 \epsilon_0} \int_{r=0}^R \frac{r^2}{R^6} dr \int_{\theta=0}^{\pi} d \theta \int_{\phi=0}^{2 \pi} d \phi = \frac{Z^2 e^2}{16 \epsilon_0} [\frac{r^3}{3R^6}]_{r=0}^{R}=\frac{Z^2 e^2}{48 \epsilon_0 R^3}$

clearly i'm out by a factor of 12 but the fact that allt he constants etc are the way they should be hopefully means i'm on the right lines. can anybody help? cheers.

2. Feb 9, 2009

### gabbagabbahey

You seem to be using $$dV=dr d\theta d\phi$$; which doesn't even have the correct units for a volume element, let alone produce the correct volume when integrated over a sphere! You might want to reconsider that.

3. Feb 9, 2009

### latentcorpse

still not getting it.
electrostatic one gives

$\frac{3 Z^2 e^2}{64 \pi^2 \epsilon_0} \int_0^R (\frac{3r^2}{R^4}-\frac{r^4}{R^6}) dr \int_0^{\pi} sin{\theta} d \theta \int_0^{2 \pi} d \phi= \frac{3Z^2 e^2}{32 \pi \epsilon_0} [\frac{1}{R}-\frac{1}{5R}] [-(-1-1)]=\frac{3Z^2 e^2}{16 \pi \epsilon_0} [\frac{4}{5R}] = \frac{3 Z^2 e^2}{20 \pi \epsilon_0 R}$

and field gives

$\frac{Z^2 e^2}{32 \pi^2 \epsilon_0} \int_0^R \frac{r^4}{R^6} dr \int_0^{\pi} sin{\theta} d \theta \int_0^{2 \pi} d \phi=\frac{Z^2 e^2}{16 \pi \epsilon_0} [\frac{1}{5R}][2] = \frac{Z^2 e^2}{40 \pi \epsilon_0 R}$

which still don't agree. any further advice? cheers.

4. Feb 9, 2009

### gabbagabbahey

Doesn't the field outside the sphere also contribute to the energy stored in the field?

5. Feb 9, 2009

### latentcorpse

does it? i don't really understand what's going on here, could you explain where these two energies come from please?

6. Feb 9, 2009

### gabbagabbahey

The electrostatic energy is the electric potential energy of all the charges.

Since that energy is precisely what goes into creating the electric field, one expects that the energy stored in the field is equal to the energy of the charge configuration.

The first integral gives the energy of the charge configuration, while the second integral gives the energy stored in the field. Both integrals should be over all of space, but since $\rho=0$ outside the sphere, the first integral need only be evaluated from 0 to R. The electric field on the other hand is not zero outside the sphere, so you need to consider both the field energy inside the sphere as well as the field energy outside the sphere. Wherever there is a non-zero field, there will be some field energy present. When you add up all the field energy, you get the same amount of energy as the energy of the charge distribution.

This means that you need to know what the field is outside the sphere!

$$\frac{1}{2} \int_{\text{all space}} \rho \varphi dV=\frac{1}{2} \int_{\text{inside}} \rho \varphi_{\text{inside}} dV$$

But

$$\frac{\epsilon_0}{2} \int_{\text{all space}} E^2 dV=\frac{\epsilon_0}{2} \int_{\text{inside}} E^2_{\text{inside}} dV+\frac{\epsilon_0}{2} \int_{\text{outside}} E^2_{\text{outside}} dV$$

Last edited: Feb 9, 2009
7. Feb 9, 2009

### latentcorpse

so my tutor had helped work out the field outside the sphere as $\frac{Ze}{4 \pi \epsilon_0 r^2}$

however when i put this into the formula we get the following problem

$\frac{1}{2} \epsilon_0 \int dV \frac{Z^2 e^2}{16 \pi^2 \epsilon_0^2 r^4} = \frac{Z^2 e^2}{32 \pi^2 \epsilon_0} \int_0^R \frac{1}{r^2} dr \int_0^{\pi} sin{\theta} d \theta \int_0^{2 \pi} d \phi = \frac{z^2 e^2}{8 \pi \epsilon_0} [-\frac{1}{r}]_{r=0}^{r=R}$ and so we're going to get an infinity term are we not?

8. Feb 9, 2009

### latentcorpse

or perhaps this integral should be from R to $\infty$, yes?

9. Feb 9, 2009

### latentcorpse

that works. thanks a lot for your help mate!

10. Feb 9, 2009

### gabbagabbahey

Of course--- 0 to R is inside---R to infinity is outside