What is the work done by gravitational force when you lift an object? So, my question is the work done by gravitational force suppose when you lift an object, I think it would be $0$ as it is not causing any displacement in the object even if it is applying a force, so what would the answer be, would it have some non-zero value or be zero?
Edit: I understood the question and  another question jumped to my mind  which is would the work done by gravitational force on a slope be -mgh as well ? I think it would be -mgh as it exerts a force equal to mg and the height gained would be h but since it is in the opposite direction it would be -mgh is this answer right ?
 A: It would be zero if there is no displacement, even if there are forces being applied
The equation for work done is as follows:
W = F x s
F represents force and s is displacement(distance moved in a direction). So the work done  by gravity would be: (weight of the object) x displacement. As you can see from this equation, if s is 0, W will also be 0. Note that displacement against the direction of gravity would result in a negative value for displacement, and so the work done by gravity would also give a negative value if the object is being lifted upwards, but a positive value otherwise.
A: Good question.
The energy of lifting an object
The energy takes to lift the object depends entirely on 'how' you got it lifted. Consider balancing the forces in the vertical direction on the body being lifted:
$$ ma = Q- mg$$
Where $Q$ is the upward push you give and $m$ is the mass of the body.
Let's say the object began at the palm of your hand in rest, then you'd have to give a force greater than that of gravity to break its inertia and set it into motion. Let's say $Q = mg + \epsilon$ where $\epsilon$ is some nice function with the property that $\epsilon>0$:
$$ ma = \epsilon$$
And, then let's say after some time $t'$, your object has reached a velocity $v'$ and a height $h'$. Now you got the object moving up, you can stop putting excess force into lifting it up and drop the force you give such that it only balances the gravitational force(**). The work done till this time is given as:
$$ W = \int_0^{h'} \epsilon \cdot dh$$
For visualization, the work done curve would look something around these lines:

There is no work after the point where you stop giving more force than gravity to lift it up because of the fact that at that point your force is balanced but the object will keep moving due to acceleration it had received in the past.
However, do note that however you do it the gravitational force takes out the same amount of energy from the energy you put in which is precisely $mgh$.

Extended edition ( A few graphs to bring out explicit details of the motion):
Let's take the simplest possible acceleration which is $ \epsilon = \epsilon_o$ i.e: constant, I think the graphs are self explanatory:

Left to right: acceleration-time ,  velocity - time, position time graph

*: If you dropped the force too much, it'd start accelerating downwards again
**: For a more explicit statement of the behaviour the force, I'll define the it as a piecewise function:
$$ Q = \begin{cases} mg + \epsilon, t'>t>0 \\ mg , t>t' \end{cases}$$
Note: The work done calculated is for the extra energy you got to put in to raise it, you can find out the total amount of energy you put in by removing out the potential energy from that quantity.
A: You seem confused about the concept of work: In Classical Mechanics, by definition, the work $W$ made by a force $\vec{F}$ is:
$$W=\vec{F} \cdot \vec{s}$$
where $\cdot$ represent the scalar product. But what is $\vec{s}$? Well: it is the displacement (a.k.a. the variation of position) of the object on which $\vec{F}$ acts; the cause of the displacement does not matter! If the object moves for any reason then you have a $\vec{s}$ and if $\vec{F}$ and $\vec{s}$ are not orthogonal then you also have a non zero work done by $\vec{F}$. This is the definition of work, $\vec{s}$ has this meaning by definition!
A: I dont think so. As you said work is done in lifting an object. so here vertical displacement or distance component will be considered.
As W=mgh
W=9.8(mxh)
W=9.8 mxh  ( if we put h=a then mxh becomes F )
W=9.8 (times F)  Joules
