A spherically symmetric planet of radius $a$ consists of a central core of radius $b(<a)$ of uniform density $\rho_1$ surrounded by an outer region of uniform density $\rho_2$. Obtain an expression for the gravitational potential and field at all points in space.
To find the potential and field inside, I used Gauss' theorem and applied that to a sphere of radius $b$ and a shell of radius $a$ and thickness $a-b$. I obtained the expressions $$F = -\frac{4G \pi \rho_1}{3b^3}r^4 \ \text{and} \ \phi = \frac{2G\pi r^3\rho_1(r^2-3b^2)}{3b} - 4\pi a G \rho_2(a-b).$$
I did a similar thing for the region outside of both spheres, obtaining $$F = -\frac{G}{r} \left( \frac{4}{3} \pi r^3 \rho_1 \right)-\frac{4G\pi a^2\rho_2(a-b)}{r^2} \ \text{and} \ \phi = - \frac{4\pi b^3 \rho_1 G}{3} - \frac{4\pi Ga^2\rho_2(a-b)}{r}.$$
Assuming this is correct, I am struggling to determine the field and potential for the region where $a < r < b$.