If there are no constraints on the motion of P, then 3 parameters are needed to completely describe P' s position at any time t. If there are k (k ≤ 3) constraint forces, then n = (3 − k) parameters are needed. Hence, we can define n generalized coordinates q i (t) (i = 1,..., n), and express r (t) and δ r = ε h (t) in terms of the generalized coordinates. That is, r ( t ) = r ( q 1 , q 2 , … … , q n ; t ) , h ( t ) = h ( q 1 , q 2 , … … , q n ; t ) . Then, the derivative of the variation δ r = ε h (t) is given by d d t δ δ r = d d t ϵ ϵ h = ∑ ∑ i = 1 n ∂ ∂ h ∂ ∂ q i ϵ ϵ q ˙ ˙ i , then we have δ δ W = ∫ ∫ t 0 t 1 ( ∑ ∑ i = 1 n F ⋅ ⋅ ∂ ∂ h ∂ ∂ q i ϵ ϵ q ˙ ˙ i ) d t = ∑ ∑ i = 1 n ( ∫ ∫ t 0 t 1 F ⋅ ⋅ ∂ ∂ h ∂ ∂ q i ϵ ϵ q ˙ ˙ i d t ) .