Let a variable force F acts on a body along the fixed direction x-axis. The magnitude of the force F depends on x. Let we have to calculate the work done when the body moves from the initial position (xi) to the final position (xf) under the force F.
The displacement can be divided into a large number of small equal displacements ∆x. During a small displacement ∆x, the force F can be assumed to be constant. Then the work done is
W =~ F.∆x = Area of rectangle abcd.
In the limit when ∆x→0, the number of rectangles tends to be infinite, but the above summation approaches to a definite integral whose value is equal to the area under the curve. Thus the total work done is
Hence, for a varying force the work done is equal to the definite integral of the force over the given displacement.