- #1
oddjobmj
- 306
- 0
Homework Statement
Consider a simple model for the interior of the Earth: there is a spherical iron core with constant mass density ρ0 and radius a; outside the core is "rock" with constant density ρ1. Use these values for the densities: ρ0= 8.70×103 kg/m3 and ρ1= 4.10×103 kg/m3. The radius of the Earth is R = 6.40×106 m.
Hand in a plot g(r) from 0 to 2R.
The value at r=R must be 9.81 m/s2.
Homework Equations
g(r)=[itex]\frac{G*M(r)}{r^2}[/itex]
a=4.291*106 m
Total Mass=[itex]\frac{4πρ0}{3}[/itex]a^3+[itex]\frac{4πρ}{3}[/itex](R3-a3)
The Attempt at a Solution
Since the mass is a function of r the function will be affected by the density at the current radius. Is there a way to write a single function that will cover this or do I have to do it with a piecewise function where I use ρ0 between 0 < r < a, then ρ between a < r < R, then constant past R?