Hamiltonian mechanics
where "f" and "g" are given functions. Here, "x" and "v" may be either scalars or vectors. The equations of motion in Hamiltonian mechanics take this form if the Hamiltonian is of the form