# Energy density in electrostatics - definition [closed]

Background:

It can be shown that the potential energy of charge distribution can be calculated by

$$U = \frac{1}{2}\int_V \rho(r')\Phi(r') d^3r'$$

by means of integration by parts and the poisson equation $$\Delta\Phi(r) = 4\pi \rho(r)$$ the integral can be rewritten

$$U = \frac{1}{2}\int_V \rho(r')\Phi(r') d^3r' = \frac{1}{8\pi}\int_V (\nabla \Phi(r')) (\nabla \Phi(r') )d^3r' = \int_V \frac{|E(r')|^2}{8\pi}d^3r'$$

The integrand of the integral can be interpreted as the energy density $$u$$:

$$u(r) = \frac{|E(r)|^2}{8\pi}$$

Considering an example of a homogeneously charged solid sphere with radius $$R$$:

$$\rho(r) = \rho_0 \Theta(r-R)$$

where $$\Theta(r)$$ is the heavyside-function.

With $$Q=\frac{4}{3}\pi \rho_0 R^3$$, this results in the following potential:

$$\Phi(r) = \frac{Q}{R} \left(\frac{3}{2}-\frac{r^2}{2R^2} \right)$$ for $$r

$$\Phi(r) = \frac{Q}{r}$$ for $$r>R$$

The radial electric field is:

$$E(r) = \frac{Qr}{R^3}$$ for $$r

$$E(r) = \frac{Q}{r^2}$$ for $$r>R$$

With this in mind we can calculate the energy density:

$$u(r) = \frac{Q^2r^2}{8\pi R^6}$$ for $$r

$$u(r) = \frac{Q^2}{8 \pi r^4}$$ for $$r>R$$

Integrating this will result in the total potential energy:

$$U = \int_0^{\infty} 4\pi r^2 u(r) dr = \frac{3Q^2}{5R}$$

Now to my question:

Starting from the first integral, why can't the energy density be defined as followed:

$$u(r) = \frac{1}{2} \rho(r')\Phi(r')$$

When considering the example above this would equate to:

$$u(r) = \rho_0 \frac{Q}{R} \left(\frac{3}{2}-\frac{r^2}{2R^2} \right) = \frac{3Q^2}{4\pi R^4} \left(\frac{3}{2}-\frac{r^2}{2R^2} \right)$$ for $$r

$$u(r) = 0$$ for $$r>R$$

Integrating over this we get the same energy (as expected)!

$$U = \int_0^{\infty} 4\pi r^2 u(r) dr = \frac{3Q^2}{5R}$$

How can there be two different ways of defining a energy density $$u(r)$$. Where have I made a mistake?

Help will be apprechiated!

## closed as unclear what you're asking by Jon Custer, ZeroTheHero, Rory Alsop, HDE 226868, glSMay 29 at 9:00

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm confused: don't both of your definitions for energy density give the same answer? – jacob1729 May 15 at 11:17
• Replaced $|E(r)|$ by $|E(r)|^2$ – jim May 15 at 13:50
• – Unique May 16 at 5:33

## 1 Answer

You just showed that $$\frac{1}{2}\rho(r')\Phi(r') = \frac{|E(r')|^2}{8\pi}$$. (EDIT: as @Fabian said in the comments, it is actually that $$\frac{1}{2}\int_V \rho(r')\Phi(r') d^3r' = \int_V \frac{|E(r')|^2}{8\pi}d^3r'$$)

So, it does not matter whether you define $$u(r) = \frac{1}{2} \rho(r')\Phi(r')$$ or $$u(r) = \frac{|E(r)|^2}{8\pi}$$. As both lie in the same volume integral, each can be interpreted as the mean the same thing.

• Not true: it was only shown that $\int \rho \Phi dV = \int |E|^2 dV/4\pi$. – Fabian May 15 at 18:12
• This is misleading. $\frac{1}{2}\int_V \rho(r')\Phi(r') d^3r' = \int_V \frac{|E(r')|^2}{8\pi}d^3r'$ is only true if $V$ extends to infinity. In the same vein, your remark "as both lie in the same volume integral, ..." is problematic because the former definition of energy density can work perfectly well with a finite volume (over which charge distribution is non-zero) of integration whereas the latter needs to be integrated over all of space. So, the two definitions of energy density emphatically refer to different volume integrals. – Feynmans Out for Grumpy Cat May 18 at 4:06