Now change variables, from the set (q, ζ, dq / dt, dζ / dt) to (q, ζ, p, dζ / dt), simply switching the velocity dq / dt to the momentum p. This change of variables in the differentials is the Legendre transformation. The differential of the new function to replace L will be a sum of differentials in dq, dζ, dp, d (dζ / dt), and dt. Using the definition of generalized momentum and Lagrange's equation for the coordinate q :