Electrostatics
Electrostatic energy

A test particle 's potential energy, U E single {\displaystyle U_{\mathrm {E} }^{\text{single}}}, can be calculated from a line integral of the work, q n E ⋅ d ℓ {\displaystyle q_{n}\mathbf {E} \cdot \mathrm {d} \mathbf {\ell } }. We integrate from a point at infinity, and assume a collection of N {\displaystyle N} particles of charge Q n {\displaystyle Q_{n}}, are already situated at the points r i {\displaystyle \mathbf {r} _{i}}. This potential energy (in Joules) is:

where R i = r − r i {\displaystyle \mathbf {\mathcal {R_{i}}} =\mathbf {r} -\mathbf {r} _{i}} is the distance of each charge Q i {\displaystyle Q_{i}} from the test charge q {\displaystyle q}, which situated at the point r {\displaystyle \mathbf {r} }, and ϕ (r) {\displaystyle \phi (\mathbf {r})} is the electric potential that would be at r {\displaystyle \mathbf {r} } if the test charge were not present. If only two charges are present, the potential energy is Q 1 Q 2 / (4 π ε 0 r) {\displaystyle Q_{1}Q_{2}/(4\pi \varepsilon _{0}r)}. The total electric potential energy due a collection of N charges is calculating by assembling these particles one at a time:

where the following sum from, j = 1 to N, excludes i = j:

This electric potential, ϕ i {\displaystyle \phi _{i}} is what would be measured at r i {\displaystyle \mathbf {r} _{i}} if the charge Q i {\displaystyle Q_{i}} were missing. This formula obviously excludes the (infinite) energy that would be required to assemble each point charge from a disperse cloud of charge. The sum over charges can be converted into an integral over charge density using the prescription ∑ (⋯) → ∫ (⋯) ρ d 3 r {\textstyle \sum (\cdots)\rightarrow \int (\cdots)\rho \,\mathrm {d} ^{3}r}:

This second expression for electrostatic energy uses the fact that the electric field is the negative gradient of the electric potential, as well as vector calculus identities in a way that resembles integration by parts. These two integrals for electric field energy seem to indicate two mutually exclusive formulas for electrostatic energy density, namely 1 2 ρ ϕ {\textstyle {\frac {1}{2}}\rho \phi } and 1 2 ε 0 E 2 {\textstyle {\frac {1}{2}}\varepsilon _{0}E^{2}}; they yield equal values for the total electrostatic energy only if both are integrated over all space.
detectable_format:json_format, change_case:capital_word_frequency[6], startend:end_checker