{\displaystyle g(r)=-{\frac {GM(r)}{r^{2}}}.}