In electrostatics, Gauss's law is , or locally , where is charge density and is vacuum permittivity. Spherical symmetry makes the electric field radial, and Gauss's law gives
Choose the additive constant of the electrostatic potential by . Using and continuity of potential across each charged shell gives
The field jumps at the shell surfaces, so the displayed formulas are for the requested open regions. The potential difference of the spherical capacitor is . Thus its capacitance and electrostatic energy are
The energy follows either by charging work , or directly from .