$\newcommand{\Label}[1]{\label{#1}}\newcommand{\eqRef}[1]{\eqref{#1}}$
The electrostatic energy associated with continuous charge distribution is shown to correspond to energy \(\frac{\epsilon_0}{2} |\vec E|^2\) per unit volume.
To compute the electrostatic energy of a charge distributed over a volume, we divide the volume into a large number of small parts \((\Delta V)_k\) at points \(\vec r_k\). These small volume elements are filled by bringing charge \(\Delta q_k=\rho(\vec r_k) (\Delta V)_k\) from infinity. The total work done will be
\begin{equation}
W = \frac{1}{2} \sum_k \rho(\vec r_k) (\Delta V)_k.
\end{equation}
In the limit of number of volume elements going to infinity and each volume element tending to zero, the above expression becomes a volume integral and we get\begin{eqnarray}
W&=&\frac{1}{2}\int_V\rho(\vec {r})\phi(\vec {r})d^3r \Label{eq11}.
\end{eqnarray}We assume that the charge distribution is localized {\it i.e.} and that volume \(V\) is finite. Since $\rho=0$ outside volume \(V\) and we can write\begin{eqnarray}
W&=&\frac{1}{2}\int_{V_R}\rho(\vec {r})\phi(\vec {r})d^3r \Label{eq12}
\end{eqnarray}where $V_R$ is the volume of a sphere of large radius \(R\). The answer does not
depend on \(R\) as long as \(V\) is a finite volume and completely inside the sphere.
Using \(\rho=\epsilon_0\nabla\cdot\vec {E}\)
the expression \(\eqRef{eq12}\) can be written as
\begin{eqnarray}
W &=& \frac{\epsilon_0}{2} \int_{V_R} (\nabla\cdot \vec E) \phi(\vec r) d^3r
\\
&=&\frac{\epsilon_0}{2}\int_{V_R}\left\{\nabla\cdot(\vec {E}\phi)-\vec {E}\cdot \nabla \phi\right\} d^3r \\
&=& \frac{\epsilon_0}{2}\int_{V_R}\left\{\nabla\cdot(\vec {E}\phi) + \frac{\epsilon_0}{2}\iiint_{V_R}\vec {E}\cdot\vec {E}d^3r\right\}
\Label{eq14}
\end{eqnarray}\begin{equation}\label{EQ50}
\int_{V_R} \nabla\cdot(\vec {E}\phi) d^3r
\end{equation}vanishes. This is seen by transforming it into surface integral over sphere \(S_R\).Using divergence theorem of vector calculus, the first term \begin{eqnarray}
\int_{V_R}\nabla\cdot(\vec {E}\phi)&=&\frac{\epsilon_0}{2}\iint_{S_R}(\vec {E}\phi)\cdot
\hat{n}dS \label{EQ51}
\end{eqnarray}The answer for \(W\) is independent of \(R\). Hence we take $R\rightarrow \infty$\\
For a localized charge distribution, $\vec {E} ~ 1/R^2$ and $|\vec {E}|^2 ~ 1/R^4$ for large \(R\). The surface area of the sphere \(S_R\) grows like \(R^2\). Thus the surface integral in \eqref{EQ51},for large \(R\), decreases as \(1/R^2\). Therefore, the right hand side of \eqref{EQ51} vanishes.\begin{eqnarray}
\lim_{R\to \infty}\frac{\epsilon_0}{2}\iint_{S_R}(\vec {E}\phi)\cdot
\hat{n}dS \to 0 \label{EQ52}
\end{eqnarray}Thus we arrive at the final expression for electrostatic energy\begin{eqnarray} W=\frac{\epsilon_0}{2}\int\vec {E}\cdot\vec {E} d^3r \Label{eq16}.
\end{eqnarray}
The expression for the electrostatic energy \(W\) shows that in a small volume $\Delta V$ the electric field $\vec {E}$ associates an energy, say \(U\) therefore
\begin{eqnarray}
U&=&\frac{\epsilon_0}{2}\Big(\vec {E}\cdot\vec {E} \Big)\Delta V \Label{eq17}.
\end{eqnarray}Therefore the energy per unit volume ($u=U/\Delta V$) is
\begin{eqnarray}
\boxed{u=\frac{\epsilon_0}{2}\vec {E}\cdot\vec {E}} \Label{eq18}.
\end{eqnarray}
Thus the electrostatic energy can be computed if we know the electric field without worrying about charge distribution and other variables.
Therefore, the electrostatic energy of a sphere can be computed in 2 ways
1. Assembling the charges slowly and computing the work done, or
2. Integrating \eqRef{eq18} above, over the entire volume.
Exclude node summary :
Exclude node links:
4727:Diamond Point