relation between net work and gravitational potential energy
The net work done on a body is equal to change in the gravitational potential energy of a body
so,
dW = dU
Wnet = Ufinal - Uinitial