The formula for gravitational potential energy, -GMm/r, is derived using integral calculus to calculate the work needed to move an object from an infinite distance to a point r. The gravitational force is expressed as F_grav = -GMm/r², and the potential energy is found by integrating this force from infinity to r. Newton's law of gravitation is empirical and cannot be derived from other fundamental laws. The derivation highlights the relationship between gravitational force and potential energy. Understanding this derivation is essential for grasping the principles of gravitational interactions.