Skip to main content
Added a clarification.
Source Link

Properly, your formula should read

$g(r) = \frac{4\pi G}{3\color{blue}{(r+r_c)^{2}}}[ \int_{0}^{r}{\rho}(r)r^{2}.dr +F ]$$g(r) = \frac{4\pi G}{(r+r_c)^2}[ \int_{0}^{r}{\rho}(r)r^{2}.dr +F ]$

where your radial distance (which is the argument in the inverse square law) is measured from the center of the shells and thus includes the core radius $r_c$. Also you do not use the $3$. The mass of each shell is the surface area times the density times the shell thickness, and the surface area does not have the factor of $1/3$. Of course when you add the core mass, that is computed over a volume and thus does include the $1/3$ factor if you are calling the core a homogemeous ball of radius $r_c$ and density $\rho_c$. Thus $F=\rho_cr_c^3/3$.

Otherwise your approach seems correct.

Properly, your formula should read

$g(r) = \frac{4\pi G}{3\color{blue}{(r+r_c)^{2}}}[ \int_{0}^{r}{\rho}(r)r^{2}.dr +F ]$

where your radial distance (which is the argument in the inverse square law) is measured from the center of the shells and thus includes the core radius $r_c$.

Otherwise your approach seems correct.

Properly, your formula should read

$g(r) = \frac{4\pi G}{(r+r_c)^2}[ \int_{0}^{r}{\rho}(r)r^{2}.dr +F ]$

where your radial distance (which is the argument in the inverse square law) is measured from the center of the shells and thus includes the core radius $r_c$. Also you do not use the $3$. The mass of each shell is the surface area times the density times the shell thickness, and the surface area does not have the factor of $1/3$. Of course when you add the core mass, that is computed over a volume and thus does include the $1/3$ factor if you are calling the core a homogemeous ball of radius $r_c$ and density $\rho_c$. Thus $F=\rho_cr_c^3/3$.

Otherwise your approach seems correct.

Source Link

Properly, your formula should read

$g(r) = \frac{4\pi G}{3\color{blue}{(r+r_c)^{2}}}[ \int_{0}^{r}{\rho}(r)r^{2}.dr +F ]$

where your radial distance (which is the argument in the inverse square law) is measured from the center of the shells and thus includes the core radius $r_c$.

Otherwise your approach seems correct.