 Inspired by, but distinct from, the Hamiltonian of classical mechanics, the Hamiltonian of optimal control theory was developed by Lev Pontryagin as part of his maximum principle.Pontryagin proved that a necessary condition for solving the optimal control problem is that the control should be chosen so as to optimize the Hamiltonian.Consider a dynamical system of formula_1 first-order differential equations
where formula_3 denotes a vector of state variables, and formula_4 a vector of control variables.