The gravitational force exerted by the planet Earth on a unit mass at a distance r from the center

The gravitational force exerted by the planet Earth on a unit mass at a distance r from the center of the planet is F( r )={ GMr/R3 if r<R, GM/r2 if r>=R