Fix the electric potential to vanish at infinity and assume a localized, nonsingular charge density of finite electrostatic energy. Assemble the charge by scaling from to . Linearity gives , so the work is
The factor prevents double counting of pair interactions. Using Gauss law, , and integration by parts,
The boundary integral at infinity vanishes for a localized distribution since and . Singular point-charge self-energies require a separate regularization and are not finite instances of this identity.
For the uniform solid sphere, spherical symmetry and Gauss law give
Integrating inward from infinity and matching the continuous electric potential at gives
The value of the electric field at the centre is the zero vector.
Writing , the electrostatic energy of a uniformly charged solid sphere follows either from the charge-potential integral or from the field integral including the exterior:
For the nuclear scaling, while constant volume per proton gives . Therefore the electric contribution scales as in this uniform-density model.
Assemble the spherically symmetric charge distribution by adding thin concentric shells, with the final charge density kept uniform. When the assembled radius is , the enclosed electric charge and the next increment are
The electric potential of the already assembled material at that shell is . Consequently its assembly work is , and the electrostatic energy of a uniformly charged solid sphere is
There is no extra factor of one half in this assembly integral: each pair of charge elements has already been counted exactly once, when the later element was brought in. A solid uniformly charged insulator has this value; a conducting sphere has its electric charge on the surface and instead has electrostatic energy .