{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe treat a local maximum first, using one-sided sequences of difference quotients.\n\n1. Suppose $f$ has a [[local maximum|00999TYPXB]] at $a$. Then there is $\\delta \u003e 0$ with $f(x) \\le f(a)$ for all $x \\in I$ with $\\abs{x - a} \u003c \\delta$.\n2. Since $I$ is an open interval containing $a$, we may shrink $\\delta$ so that $(a - \\delta, a + \\delta) \\subseteq I$.\n3. For $h \\ne 0$ with $a + h \\in I$, write $q(h) = \\frac{f(a + h) - f(a)}{h}$. By the definition of the [[derivative|0F1WR9C83K]], $q(h) \\to f'(a)$ as $h \\to 0$.\n4. For $0 \u003c h \u003c \\delta$, the numerator of $q(h)$ is $\\le 0$ and $h \u003e 0$. So $q(h) \\le 0$.\n5. For $-\\delta \u003c h \u003c 0$, the numerator is $\\le 0$ and $h \u003c 0$. So $q(h) \\ge 0$.\n6. Put $h_n = \\frac{\\delta}{n + 2}$ for $n \\in \\N$. Then $0 \u003c h_n \u003c \\delta$. Also $h_n \\to 0$, by [[this lemma|0WH916TJNY]] and the [[epsilon-N form|09G6KHS6GY]].\n7. By the [[sequential characterization of limits|000MXHEY22]], $q(h_n) \\to f'(a)$. By step 4 and [[limits preserve non-strict inequalities|0N32V0E3XJ]], compared with the constant sequence $0$, $f'(a) \\le 0$.\n8. The sequence $-h_n$ also tends to $0$, with $-\\delta \u003c -h_n \u003c 0$. In the same way, step 5 gives $f'(a) \\ge 0$.\n9. So $f'(a) = 0$ at a local maximum.\n10. Now suppose $f$ has a [[local minimum|0NS8BP96QX]] at $a$. Then $-f$ has a local maximum at $a$, since $f(x) \\ge f(a)$ means $-f(x) \\le -f(a)$.\n11. By the [[constant multiple rule|0Z9JB71BS0]] with $c = -1$, $-f$ is differentiable at $a$ with derivative $-f'(a)$.\n12. Steps 1 to 9 for $-f$ give $-f'(a) = 0$. So $f'(a) = 0$.\n\n## Idea\n\nAt a local maximum, moving right does not increase $f$, so the difference quotients on the right are at most $0$. Moving left also does not increase $f$, but now we divide by a negative $h$, so those quotients are at least $0$. The derivative is the limit from both sides, so it is $0$.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "26A24"
    ],
    "name": "Proof of Fermat's theorem on stationary points",
    "proves": "0PCVBRV9VJ",
    "sources": [
      {
        "locator": "Proof",
        "url": "https://en.wikipedia.org/wiki/Interior_extremum_theorem"
      }
    ],
    "tag": "M4KHG0P6EB",
    "uses": [
      "00999TYPXB",
      "0NS8BP96QX",
      "0F1WR9C83K",
      "000MXHEY22",
      "0N32V0E3XJ",
      "0WH916TJNY",
      "09G6KHS6GY",
      "0Z9JB71BS0"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/M4KHG0P6EB/",
  "links": [
    {
      "field": "proves",
      "target": "0PCVBRV9VJ"
    },
    {
      "field": "uses",
      "target": "00999TYPXB"
    },
    {
      "field": "uses",
      "target": "0NS8BP96QX"
    },
    {
      "field": "uses",
      "target": "0F1WR9C83K"
    },
    {
      "field": "uses",
      "target": "000MXHEY22"
    },
    {
      "field": "uses",
      "target": "0N32V0E3XJ"
    },
    {
      "field": "uses",
      "target": "0WH916TJNY"
    },
    {
      "field": "uses",
      "target": "09G6KHS6GY"
    },
    {
      "field": "uses",
      "target": "0Z9JB71BS0"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/M4KHG0P6EB.md",
  "msc": [
    "26A24"
  ],
  "name": "Proof of Fermat's theorem on stationary points",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/M4K/M4KHG0P6EB.md",
  "status": null,
  "tag": "M4KHG0P6EB",
  "uri": "m2://M4KHG0P6EB",
  "url": "https://math2.tamnd.com/wiki/proof-of-fermats-theorem-on-stationary-points/",
  "writing": {
    "tag": "M4KHG0P6EB",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
