# Electric field inside a cavity

## Homework Statement

If I have a solid sphere of radius R and charge density $+\rho \, C/m^3$ and I then remove a smaller sphere of radius $b$ and is a distance $a$ from the center of the larger sphere, what is the electric field inside the cavity?
I get an answer which I think is right. I've look at the math over and over and can't quite figure out what the teacher did.

## Homework Equations

Gauss' Law:
$$\oint \vec{E} \cdot d\vec{S} = \frac{q_{encl}}{\epsilon_0}$$

## The Attempt at a Solution

I know this is a classic problem using the superposition principle.
First I apply GL to the large sphere at a distance $r<R$ from the center and get an electric field
$$\vec{E} = \frac{ \rho }{3 \epsilon_0} \vec{r}$$

Then I do the same except with a charge density of $-\rho \, C/m^3$ so
$$\vec{E'} = - \frac{\rho }{3 \epsilon_0} \vec{r'} = -\frac{\rho}{3 \epsilon_0} (\vec{r} - \vec{a})$$

Now I just sum the two fields
\begin{align} \vec{E} + \vec{E'} & = \frac{ \rho }{3 \epsilon_0} \vec{r} -\frac{\rho}{3 \epsilon_0} (\vec{r} - \vec{a}) \\ &= \frac{ \rho }{3 \epsilon_0} \vec{r} -\frac{\rho}{3 \epsilon_0} \vec{r} +\frac{\rho}{3 \epsilon_0} \vec{a} \\ &=\frac{\rho}{3 \epsilon_0} \vec{a} \end{align}

This is my solution which is supposedly wrong.

Related Introductory Physics Homework Help News on Phys.org
ehild
Homework Helper

## Homework Statement

If I have a solid sphere of radius R and charge density $+\rho \, C/m^3$ and I then remove a smaller sphere of radius $b$ and is a distance $a$ from the center of the larger sphere, what is the electric field inside the cavity?
I get an answer which I think is right. I've look at the math over and over and can't quite figure out what the teacher did.

## Homework Equations

Gauss' Law:
$$\oint \vec{E} \cdot d\vec{S} = \frac{q_{encl}}{\epsilon_0}$$

## The Attempt at a Solution

I know this is a classic problem using the superposition principle.
First I apply GL to the large sphere at a distance $r<R$ from the center and get an electric field
$$\vec{E} = \frac{ \rho }{3 \epsilon_0} \vec{r}$$

Then I do the same except with a charge density of $-\rho \, C/m^3$ so
$$\vec{E'} = - \frac{\rho }{3 \epsilon_0} \vec{r'} = -\frac{\rho}{3 \epsilon_0} (\vec{r} - \vec{a})$$

Now I just sum the two fields
\begin{align} \vec{E} + \vec{E'} & = \frac{ \rho }{3 \epsilon_0} \vec{r} -\frac{\rho}{3 \epsilon_0} (\vec{r} - \vec{a}) \\ &= \frac{ \rho }{3 \epsilon_0} \vec{r} -\frac{\rho}{3 \epsilon_0} \vec{r} +\frac{\rho}{3 \epsilon_0} \vec{a} \\ &=\frac{\rho}{3 \epsilon_0} \vec{a} \end{align}

This is my solution which is supposedly wrong.
Your solution is correct. See, for example http://jkwiens.com/2007/10/24/answe...nonconducting-sphere-with-a-spherical-cavity/