If a force acts on a particle as it moves from point A to point B , then, for each possible trajectory that the particle may take, it is possible to compute the total work done by the force along the path. The principle of virtual work, which is the form of the principle of least action applied to these systems, states that the path actually followed by the particle is the one for which the difference between the work along this path and other nearby paths is zero (to the first order). The formal procedure for computing the difference of functions evaluated on nearby paths is a generalization of the derivative known from differential calculus, and is termed the calculus of variations.