# Electric field outside a sphere with a cavity

I have a sphere of radius $2a$ centered at the origin and made of a nonconducting material that has a uniform volume charge density $\rho$. A spherical cavity of radius $a$ eccentric to the right side (touching) with its center aligned with the x-axis is now removed from the sphere. Find the electric field produced by this distribution along the x-axis for $x > 2a$.

I started by establishing expressions for $E$ in both the uniform section and the cavity:

$E_u = \rho 2a/(3\epsilon_0)$ and $E_c = -\rho a/(3\epsilon _0)$ and $E_t$ inside the cavity is $E_t = \rho a/(3\epsilon_0)$

Is it correct that the $E$ along the x-axis would have the same magnitude as $E_t$?
I'm thinking it's not, but I'm not sure about the other idea I had which is that it would be $E = \rho r/\epsilon_0$. $r$ now being the distance from the center of the solid/enclosing sphere. This is the result of exchanging the $-\rho$ that is required to make the net charge inside the cavity with $\rho$ and adding the $E$-s together again.

It's a little hard to understand what you're saying in the second half, but I think you have the right idea -- If you view the cavity as actually being a region that has charge density $\rho$ and $-\rho$ (so they add up to 0, which is what it actually is), now you can view it as two whole dielectric spheres, which can each easily be solved separately with Gauss's Law. Pretend they're completely separate charge distributions that don't know about each other, and add them up.
Also, I think your $E$'s might be missing something... if the scenario you're describing is what I think it is, you can see that at the center of the large sphere, the E field from it is 0 (no enclosed charge) and the E field from the cavity (the $-\rho$) is nonzero, while at $x = a$, the field from the large sphere is nonzero and the field from the cavity is 0 (no enclosed charge). So they can't be constant, like you appear to have.