The general way to calculate the work done by a constant force is
where Fs is the force component along the displacement direction, and s is the displacement. If F is not a constant, then you must find the sum of elements like the one above. This is best done with calculus and is beyond the scope of this course. In special cases, however, we will give the result without proof. This way we will be able to work with the results without having to be calculus experts.
An immediate consequence of the expression above for work is that there is no work done by a force that is acting perpendicular to the displacement, and if the force is along the displacement, it is just the product of the force and the displacement.
If the motion is in one dimension (x), then the above formula reduces to
where