While calculating work done when lifting an object, we take acceleration = gravity. Why is that? Initially, the object is at rest. When we balance out the gravitational force for the object by applying an upward force, shouldn't the object still remain at rest because it takes no force to maintain the state of motion or rest. The way I interpret it, we should have to apply a force > weight of an object to lift it but then we can reduce it to become equal to the weight of the object so that we can maintain the upward velocity.
Why is work done when lifting an object with a constant velocity = weight times height
newtonian-gravitynewtonian-mechanicswork
Related Solutions
In introductory problems about work you're normally taught that it's force times distance:
$$ W = F \times x $$
and you treat the force as constant. If you look at the problem this way then you're quite correct that if the force is $F = mg$ then the box can't accelerate so it can't move. However a more complete way to define the work is:
$$ W = \int^{x_f}_{x_i} F(x) dx $$
The force $F(x)$ can be a function of $x$, and to get the work we integrate this force from the starting point $x_i$ to the final point $x_f$. Because $F(x)$ can vary we can make $F > mg$ at the beginning to accelerate the box then make $F < mg$ towards the end so the box slows to a halt again.
DavePhD comments that work is not a state function, and in general this is true. However in this case the work done is equal to the change in potential energy so as long as the box starts at $x_i$ at rest and ends at $x_f$ at rest we'll get the same work done regardless of the exact form of $F(x)$.
If you're really determined to have $F$ constant then start with $F > mg$ at the beginning and $F < mg$ at the end, then gradually reduce the initial value of $F$ and increase the final value to make the force more constant. This will cause the time taken to move the box from $x_i$ to $x_f$ to increase. The limit of this process is a completely constant value for $F$, in which case it takes an infinite time to move the box.
The object could be lifted from $h_1$ to $h_2$ slowly, without creating much kinetic energy (blue line), here the force matches the weight. The answers 1) and 2) would be the same.
If a higher force than necessary was used at the start (red line), then the object would gain lots of kinetic energy at first, so that the force could then be reduced, if the object is to finish at $h_2$ with no kinetic energy.
Or the yellow line might be a realistic case, some kinetic energy is created, but not much.
If the area under the lines is the same, then the object will finish at $h_2$ with no kinetic energy in each case.
The area under the lines represents the work done on the object.
So the work done in the 'red lift', for the first half of the lift, is greater than in the blue lift. As the object reaches the same height at the halfway point in both cases, kinetic energy was created in the red case during the first half of the lift.
Best Answer
You are correct.
$W=mgh$ is also correct, but it brushes something under the rug. It ignores the force required to accelerate an object from rest, and it ignores the opposite force that slows the object to a stop. In between speeding up and slowing down the velocity is constant which, as you point out, implies the net force is zero. The lifting force magnitude is the same as that of gravity, and it is clear that $W=mgh$ during that interval. So what about starting and stopping? The extra vertical work needed to accelerate the object is balanced by the reduced vertical work needed to bring it to a stop. So in the end, $W=mgh$.