# Electric field of a sphere whit a cavity inside

1. Sep 28, 2012

### Casco

Hi, I calculated the electric field of a sphere of radius $r$ with a volumen density charge $\rho$ and also it has inside of it a spherical cavity and its center is situated in $r/2$ with radius $r/2$, so I calculated the electric field of the sphere with the cavity inside and I get

$E=\frac{\rho r}{6\epsilon_0 }$

So I'd like if someone has done this exercise please correct or confirm my result. Thanks.

2. Sep 28, 2012

### nasu

For what point have you done the calculation?
The field has no spherical symmetry and the field will depend on all three coordinates (in Cartesian coordinates) or on the angles (in spherical coordinates).
Your answer may be valid for points along some specific direction. Usually the problem requires to calculate the field for points along the axis that passes through the centers of the two spheres.
The easiest way to treat this problem is superposition.
Gauss' law is not very useful I think, due to lack of symmetry.

3. Sep 28, 2012

### andrien

4. Sep 28, 2012

### vanhees71

I've just deleted my answer from before. I was solving the wrong question, because I've not realized that the hole is not in the center of the bigger sphere but displaced. Indeed, here the superposition principle is the better way to solve the problem. Sorry, if I caused any confusion.

5. Sep 28, 2012

### Casco

Thank you, I did it wrong because I didn't choose a good reference frame, but the good thing is that I had the idea.