Work done by a variable force: If either the magnitude or direction or both the magnitude and direction of the applied force change, then we can say the force is variable. To calculate the work done by the variable force we have to consider the work done for an infinitesimal displacement i.e. dw = . .
The total work done by the variable force to move the body from A to B is
W =  = . = FdScos.
Example: 1. A force F = ax acts on a particle along positive x axis where a is a constant and x is the displacement of the particle at any instant. Calculate the work done to move the particle by the force along positive x axis from x1 to x2.
At any instant the position of the particle is x, therefore force acting on the particle is F = ax.
The work done to displace the particle for dx is dw = . = Fdxcos00 = axdx.
Therefore, the total work done to displace the particle from x1 to x2 is W = Â = axdx = .
2. Force F = at3 is applied on a body of mass M where a is constant and t is time. Calculate the work done by the force for 1st 2 second.
As the force is variable then the acceleration of the particle at any instant of time t is a = .
Or, a =
Or, =
Or, dv = dt
Or, dv = dt
 v =  this is the velocity of the body at instant of time t.
The work done at any instant of time t for the displacement dx of the body is dw = Fdx = Fdt
Or, dw = Fvdt
Or, dw = dt
The total work done on the body for 2 second is w = = dt
Or, w =
Or, w =
 w = .
3. A uniform chain of mass M length L is held on a frictionless table with part of its length hanging from the edge of the table. Calculate the work done to pull the chain slowly on the table against gravity.
As the chain is uniform then mass per unit length of the chain is  = . The length of the hanging part of the chain is . We consider an elementary part of the chain of length dy at a distance y from the edge of the table.
Mass of that elementary part of chain dm = .
The work done to pull the dm part up to a height y is dw = dmgy = .
Therefore, the work done to pull the hanging part of chain on the table is
w = dWÂ = = = Â = .
We can solve the numerical in alternate method: The mass of the hanging part of the chain is . The length of the hanging part of the chain is .
As the mass is uniformly distributed, the centre of mass of the hanging part is at a distance of from the edge of the table.
Therefore, the work done required to pull the  length of the chain on the table is w = change in potential energy = ()g() = .