Conserved quantity

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 apply a function to a conserved quantity, such as adding a number.
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 "H", a function "f" of the generalized coordinates "q" and generalized momenta "p" has time evolution
and hence is conserved if and only if formula_6. Here formula_7 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 formula_8), then the energy "E" defined by
is conserved.
Furthermore, if formula_10, 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.