I have tried to understand how the change in potential energy is equal to the negative of the work done by gravity on a body in free fall.
If we were to consider a body of mass $m$ dropped from height $h_1$ to $h_2$ and try to use $E_g = -(U_f - U_i)$ where $W_g$ is the work done by gravity, $U_f$ is the final potential energy and $U_i$ is the initial potential energy, then:
$$W_g=mg(h_2-h_1)$$
$$U_f-U_i=mgh_2-mgh_1=mg(h_2-h_1)$$
In which Work done by gravity is clearly NOT EQUAL to the negative of the change in potential energy. Am I doing something wrong here?
However, if were to to consider the opposite motion of the body being lifed by us from height $h_2$ to $h_1$, $W_u$ is the work done by us, $U_f$ is the final potential energy and $U_i$ is the initial potential energy, then:
$$Wu=-(mg(h_1-h_2))$$ (We add negative sigh here since displacement is in the opposite direction of force applied by us.)
$$U_f-U_i=mgh_1-mgh_2=mg(h_1-h_2)$$
Here the statement 'Work done by gravity is the negative of the change in potential energy' holds true, but not in the first case. Please could you explain this.