The physics
The field g at a point is the pull on 1 kg there. Outside a planet it falls as 1/r². Here r is the distance from the centre.
g = G M / r² = g₀ (R / r)² up a tower: W = W₀ (R / (R + h))²
For a small height, g falls by about 2h/R of itself. A pendulum's swing time grows as 1/√g. So up a tower, it grows in step with R + h.
Down a mine, only the ball of rock below you pulls. The rock above pulls equally all round. So g falls in a straight line to zero at the centre.
g = g₀ (1 − d / R) same g: d ≈ 2h
The potential V is negative. It keeps falling all the way in, and it is lowest at the centre.
outside: V = −GM / r inside: V = −GM (3R² − r²) / 2R³
If the density changes with r, find the mass inside r first. A spinning planet lightens the equator: a scale there reads m(g − ω²R).