# Electric field of a nonconducting sphere with a spherical cavity

Question: A sphere of radius a is made of a nonconducting material that has a uniform volume charge density . A spherical cavity of radius b is removed from sphere which is a distance z from the center of the sphere. Assume that a > z + b. What is the electric field in the cavity?

Answer: The electric field inside the cavity is going to be the superposition of the field due to the uncut sphere plus the field due to a sphere the size of the cavity with a uniform charge density of . The key to solve this problem is to calculate the electric field of each sphere in a different coordinate systems.

First, lets deal with the electric field of the large sphere of charge density . To simplify Gauss’s Law, I am going to use a spherical coordinate system with the origin at the center of the sphere. The coordinate system is going to defined as:

We can now use Gauss’s Law to calculate the electric field of the sphere.

Since the electric field is radial:

Now that we have calculated the electric field for the big sphere, we can calculate the field of the small sphere of charge density . We will, again, use a spherical coordinate system with the origin at the center of the sphere. The coordinate system is going to defined as:

When we apply Gauss’s Law to the small sphere, we will get

Next we need to take the superposition of both the electric fields. In order to do so, we will need to relate the follow coordinate systems.

Using simple vector addition, we find that . Also because , we can reduce this formula to:

Summing the electric field of the two spheres we will get: