# Electric field of a sphere whit a cavity inside

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.

nasu
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.

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.