On this page
Take a solid sphere with uniform charge density ρ and scoop out a smaller spherical cavity whose centre is not at the sphere's centre. Gauss's law alone gets stuck here, because the symmetry is gone. The way out is superposition, and the answer is neat: the field in the cavity is the same at every point.
What is the field inside a uniformly charged solid sphere?
Inside a uniformly charged sphere, the field grows linearly with distance from the centre: E = ρr/3ε₀, as derived with Gauss's law in OpenStax University Physics Volume 2. The reason, as OpenStax explains, is that the enclosed charge grows as r³ while the field of each bit falls off as 1/r².
Written as a vector, with r measured from the centre, this is E = (ρ/3ε₀) r. Keep the vector form; it makes the cavity problem easy.
How do you find the electric field inside a spherical cavity?
Think of the cavity as two things on top of each other: the full sphere with density +ρ, and a small sphere of density −ρ that exactly fills the hole. Where they overlap, +ρ and −ρ add to zero, which is exactly an empty cavity. This is the method used for the matching overlapping-spheres problem in a University of Texas at Austin PHY-352K solution set.
Let O be the centre of the big sphere, C the centre of the cavity, and a the vector from O to C. Pick any point P in the cavity, with position r from O. Then:
Field of the full +ρ sphere at P: (ρ/3ε₀) r.
Field of the −ρ sphere at P, measured from C: −(ρ/3ε₀)(r − a).
Add them: (ρ/3ε₀) r − (ρ/3ε₀) r + (ρ/3ε₀) a.
The r terms cancel, leaving E = (ρ/3ε₀) a.
The UT Austin solution makes the same point: because the position of P drops out, the field in the overlap is uniform, pointing from the centre of the positive ball towards the centre of the negative one (PHY-352K solutions).
Which way does the field point in the cavity?
For positive ρ, the field points along a: from the centre of the sphere O towards the centre of the cavity C. Every field line in the cavity is a straight, parallel line in that direction, like the field between capacitor plates. If ρ is negative, the field reverses and points from C towards O.
Three things the answer does not depend on are worth noticing, because exam options use them as traps:
the radius of the big sphere R
the radius of the cavity, as long as the cavity sits fully inside the sphere
where you are inside the cavity
EMWorks, which makes electromagnetic simulation software, checked this numerically: a sphere of radius 1 m and ρ = 10⁻⁶ C/m³, with a 0.25 m cavity offset by 0.5 m, gave a constant cavity field of about 18.8 kV/m, close to the theoretical ρd/3ε₀ (EMWorks application note).
A worked example with numbers
A non-conducting sphere of radius 10 cm has uniform ρ = 1.0 μC/m³. A cavity of radius 4 cm is cut with its centre 5 cm from the sphere's centre. Find the force on an electron anywhere in the cavity.
Field: E = ρa/3ε₀ = (1.0 × 10⁻⁶ × 0.05)/(3 × 8.85 × 10⁻¹²) ≈ 1.9 × 10³ N/C.
Direction: along a, from O towards C.
Force on the electron: F = eE = 1.6 × 10⁻¹⁹ × 1.9 × 10³ ≈ 3.0 × 10⁻¹⁶ N.
Direction of force: opposite to E, so from C back towards O, and the same everywhere in the cavity.
Because the force is constant, an electron released from rest in the cavity moves in a straight line with constant acceleration until it hits the wall.
How to practise this so it sticks
The same trick (fill the hole, then subtract it) solves gravity inside a hollowed planet, which we cover in gravity inside a hollow shell and a sphere with a cavity. If choosing the Gaussian surface still feels shaky, start with Gauss's law problems: choosing the Gaussian surface, then try the potential at the centre of a uniformly charged solid sphere.
A short practice plan:
Derive E = (ρ/3ε₀) r yourself, without notes.
Redo the superposition with a written in vector form.
Change one thing at a time: negative ρ, a cavity touching the surface, a point outside the sphere.
If a step goes wrong, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. For the underlying idea, the Fermi Concept Library gives each physics concept its own lesson and its place in the map.



