the body, and , the initial and final times. If the system is conservative, the work done by external forces may be derived from a scalar potential . In this case, This is called Hamilton's principle and it is invariant under coordinate transformations. Comparison with Maupertuis' principle Hamilton's principle and Maupertuis' principle are occasionally confused and both have been called (incorrectly) the principle of least action. They differ in three important ways: their definition of the action... Maupertuis' principle uses an integral over the generalized coordinates known as the abbreviated action or reduced action where p = (p1, p2, ..., pN) are the conjugate momenta defined above. By contrast, Hamilton's principle uses , the integral of the Lagrangian over time. the solution that they determine... Hamilton's principle determines the trajectory q(t) as a function of time, whereas Maupertuis' principle determines only the shape of the trajectory in the generalized coordinates. For example, Maupertuis' principle determines the shape of the ellipse on which a particle moves under the influence of an inverse-square central force such as gravity, but does not describe per se how the particle moves along that trajectory. (However, this time parameterization may be determined from the trajectory itself in subsequent calculations using the conservation of energy). By contrast, Hamilton's principle directly specifies the motion along the ellipse as a function of time. ...and the constraints on the variation. Maupertuis' principle requires that the two endpoint states q1 and q2 be given and that energy be conserved along every trajectory (same energy for each trajectory). This forces the endpoint times to be varied as well. By contrast, Hamilton's principle does not require the conservation of energy, but does require that the endpoint times t1 and t2 be specified as well as the endpoint states q1 and q2. Action principle for fields Classical field theory The action principle can be extended to obtain the equations of motion for fields, such as the electromagnetic field or gravity. The Einstein equation utilizes the Einstein–Hilbert action as constrained by a variational principle. The path of a body in a gravitational field (i.e. free fall in space time, a so-called geodesic) can be found using the action principle. Quantum mechanics and quantum field theory In quantum mechanics, the system does not follow a single path whose action is stationary, but the behavior of the system depends on all imaginable paths and the value of