In mathematics, a conserved quantity of a dynamical system is a function of the dependent variables, the value of which remains constant along each trajectory of the system. Not all systems have conserved quantities, and conserved quantities are not unique, since one can always produce another such quantity by applying a suitable function, such as adding a constant, to a conserved quantity. Since many laws of physics express some kind of conservation, conserved quantities commonly exist in mathematical models of physical systems. For example, any classical mechanics model will have mechanical energy as a conserved quantity as long as the forces involved are conservative. Differential equations For a first order system of differential equations where bold indicates vector quantities, a scalar-valued function H(r) is a conserved quantity of the system if, for all time and initial conditions in some specific domain, Note that by using the multivariate chain rule, so that the definition may be written as which contains information specific to the system and can be helpful in finding conserved quantities, or establishing whether or not a conserved quantity exists. Hamiltonian mechanics For a system defined by the Hamiltonian , a function f of the generalized coordinates q and generalized momenta p has time evolution and hence is conserved if and only if . Here denotes the Poisson bracket. Lagrangian mechanics Suppose a system is defined by the Lagrangian L with generalized coordinates q. If L has no explicit time dependence (so ), then the energy E defined by is conserved. Furthermore, if , then q is said to be a cyclic coordinate and the generalized momentum p defined by is conserved. This may be derived by using the Euler–Lagrange equations. See also Conservative system Lyapunov function Hamiltonian system Conservation law Noether's theorem Charge (physics) Invariant (physics) References Differential equations Dynamical systems