Imagine to lift an object with mass $m$ from height $h_1$ to height $h_2$ and neglect the friction with air. How much work have you done on the object?
My answers (big doubt in the second one!):
Answer 1. Let's assign $0$ to the gravital potential energy of the object at height $h_1$. Since it is still by hypothesis, its mechanical energy $E_1$ is purely potential hence in this situation is $0$:
$$E_1 = 0$$
At the end the object is still hence its mechanical energy $E_2$ is purely potential, that means it is equal to:
$$E_2 = mg(h_2-h_1)$$
Hence, the work done on the body is:
$$W = E_2 - E_1 = mg(h_2-h_1)$$
Note: I'd say this quantity is not equal to the work performed by the lifter, as he should replace the quantity $m$ with the total mass of the object plus the part of the body that the lifter is moving together with the object to perform the lift.
Answer 2. Let's evaluate the work through its definition and not through the energy-work theorem:
$$W = \int_{h_1}^{h_2} \vec F \cdot d \vec s$$
First doubt: At this point, to get the same result of the Answer 1, I have to assume that $\vec F$ and $d \vec s$ are parallel. That means that, since by hypothesis you are lifting the object with a vertical path, the force must be vertical. Why does Answer 1 ignore such an assumption?
Let's continue the evaluation with such an assumption:
$$W = \int_{h_1}^{h_2} F ds$$
Now, I should stop. I get the same amount of work of answer 1 if I make the substitution $F = mg$. But that's not correct. In fact, if the object is moving from $h_1$ to $h_2$, that's because the force $F$ is higher than the object weigth force. And then, such a force reduces to the object weight as the object is kept still at height $h_2$. In other words, I'd say that the force $F$ is not constant along the movement ($F = F(s)$):
$$W = \int_{h_1}^{h_2} F(s) ds$$
At the beginning it is higher than $mg$, at the end it is equal to $mg$.
Second doubt: how can the area of F (integral) in the path beingh equal to the work done by $mg$ if F is higher at the beginning and equal to $mg$ at the end? There should be a moment when $F(s)$ becomes lower than $mg$. I imagine that this could happen before the end, like a sort of attempt to decelerate the object. If we were to accelerate the object with $F > mg$ and then applying a force $F = mg$, it would continue moving because of the Newton first law. So, I'd say that $F$ must grow, decrease, and stop at $mg$, with the property of having the same area of $mg$.
I think it may be a correct analysis. But I'm not sure, as I cannot perceive this "ondulating" behaviour of my force $F$ when I lift an object :(