{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $U \\subseteq \\R^m$ be a nonempty set and $I \\subseteq \\R$ an interval.\nConsider an [[optimal control|T3V6ZNAMDN]] problem with [[control system|ZPDTVZQN5K]] $x' = f(t, x, u)$ and running cost $\\int L(t, x, u) \\, dt$, where $f \\colon I \\times \\R^n \\times U \\to \\R^n$ and $L \\colon I \\times \\R^n \\times U \\to \\R$.\nThe *Hamiltonian* of the problem is the function $H \\colon I \\times \\R^n \\times U \\times \\R^n \\times \\R \\to \\R$ given by\n$$H(t, x, u, p, \\lambda_0) = p \\cdot f(t, x, u) - \\lambda_0 L(t, x, u).$$\nThe vector $p \\in \\R^n$ is the costate, and the number $\\lambda_0 \\ge 0$ is the cost multiplier.\nIn the normal case $\\lambda_0 = 1$ one writes $H(t, x, u, p) = p \\cdot f(t, x, u) - L(t, x, u)$.\n\n## Remarks\n\nExample: for $x' = u$ in $\\R$ with running cost $\\int \\frac12 (x^2 + u^2) \\, dt$, the normal Hamiltonian is $H = p u - \\frac12 (x^2 + u^2)$.\nFor fixed $(x, p)$ it is a concave function of $u$ with maximum at $u = p$.\nThe state equation is recovered as $x' = \\partial H / \\partial p$.\nMany texts use the opposite sign convention $H = L + p \\cdot f$, under which optimal controls minimize $H$; this gives the minimum principle.\nThe two conventions differ by the change $p \\mapsto -p$ and an overall sign.\nA non-example is the Lagrangian $L(t, x, u)$ alone: it does not involve the costate, so it does not carry the dynamics.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "RACVWG5QTK",
    "kind": "definition",
    "msc": [
      "49K15",
      "93C15"
    ],
    "name": "Hamiltonian of an optimal control problem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Hamiltonian_(control_theory)"
      }
    ],
    "tag": "ENA9XD5B77",
    "uses": [
      "T3V6ZNAMDN",
      "ZPDTVZQN5K"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/ENA9XD5B77/",
  "links": [
    {
      "field": "defines",
      "target": "RACVWG5QTK"
    },
    {
      "field": "uses",
      "target": "T3V6ZNAMDN"
    },
    {
      "field": "uses",
      "target": "ZPDTVZQN5K"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/ENA9XD5B77.md",
  "msc": [
    "49K15",
    "93C15"
  ],
  "name": "Hamiltonian of an optimal control problem",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/ENA/ENA9XD5B77.md",
  "status": null,
  "tag": "ENA9XD5B77",
  "uri": "m2://ENA9XD5B77",
  "url": "https://tamnd.github.io/math2/wiki/hamiltonian-of-an-optimal-control-problem-definition/",
  "writing": {
    "tag": "ENA9XD5B77",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
