{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe first find a point $d$ where $f$ is largest, then apply this to $-f$.\n\n1. Let $S = f([a, b]) = \\set{f(x) : a \\le x \\le b}$. It is nonempty, since $a \\in [a, b]$.\n2. By the [[boundedness theorem|0ATVXC3NCC]], $S$ is bounded above. By the [[completeness axiom|0AXWET80YW]], $S$ has a [[supremum|0BTMQ04556]] $M$.\n3. Let $n \\in \\N$. The number $M - \\frac{1}{n+1}$ is less than $M$, so it is not an upper bound of $S$. Choose $d_n \\in [a, b]$ with $f(d_n) \u003e M - \\frac{1}{n+1}$.\n4. The sequence $(d_n)$ satisfies $a \\le d_n \\le b$, so it is bounded. By the [[Bolzano–Weierstrass theorem|0KDJD249DT]], it has a [[subsequence|0R8J3ZQMJS]] $(d_{n_k})$ converging to some real $d$.\n5. Apply [[limits preserve non-strict inequalities|0N32V0E3XJ]] to $a \\le d_{n_k}$ and $d_{n_k} \\le b$, with constant sequences $a$ and $b$. This gives $a \\le d \\le b$.\n6. The function $f$ is [[continuous|0P27W9RW0G]] on $[a, b]$. By [[continuity is equivalent to sequential continuity|0PAQM3H57X]], $f(d_{n_k}) \\to f(d)$.\n7. Since $n_0 \u003c n_1 \u003c \\cdots$ are natural numbers, induction gives $n_k \\ge k$. So $M - \\frac{1}{k+1} \\le M - \\frac{1}{n_k+1} \u003c f(d_{n_k}) \\le M$ for all $k$.\n8. Let $\\varepsilon \u003e 0$. By [[this lemma|0WH916TJNY]], there is $N \\ge 1$ with $\\frac{1}{N} \u003c \\varepsilon$. For $k \\ge N$ we get $0 \u003c \\frac{1}{k+1} \u003c \\varepsilon$. So $\\frac{1}{k+1} \\to 0$ and $-\\frac{1}{k+1} \\to 0$ by the [[epsilon-N form of limits|09G6KHS6GY]].\n9. By the [[limit of a sum of sequences|0RAM4E07NR]], $M - \\frac{1}{k+1} \\to M$. By step 7 and the [[squeeze theorem|0XMF00T4XQ]], $f(d_{n_k}) \\to M$.\n10. By [[uniqueness of limits|0ZXJ2455NJ]], steps 6 and 9 give $f(d) = M$. Since $M$ is an upper bound of $S$, $f(x) \\le f(d)$ for all $x \\in [a, b]$.\n11. Now let $g = -f$ on $[a, b]$. For all $x, y$ we have $\\abs{g(x) - g(y)} = \\abs{f(x) - f(y)}$. So the [[epsilon-delta form of continuity|0W8YHHGCJG]] shows that $g$ is continuous.\n12. Steps 1 to 10 applied to $g$ give $c \\in [a, b]$ with $-f(x) \\le -f(c)$ for all $x \\in [a, b]$. That is, $f(c) \\le f(x)$.\n13. Together, $f(c) \\le f(x) \\le f(d)$ for all $x \\in [a, b]$, with $c, d \\in [a, b]$.\n\n## Idea\n\nPick points where $f$ comes within $\\frac{1}{n+1}$ of its supremum. The Bolzano–Weierstrass theorem gives a convergent subsequence of these points, and its limit stays in the closed interval. Continuity carries the values to the limit point, so the supremum is attained there.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "26A15"
    ],
    "name": "Proof of the extreme value theorem by the Bolzano–Weierstrass theorem",
    "proves": "0WS1A8E2P9",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Extreme_value_theorem"
      }
    ],
    "tag": "A528RBFDDT",
    "uses": [
      "0ATVXC3NCC",
      "0AXWET80YW",
      "0BTMQ04556",
      "0KDJD249DT",
      "0R8J3ZQMJS",
      "0N32V0E3XJ",
      "0PAQM3H57X",
      "0XMF00T4XQ",
      "0RAM4E07NR",
      "0WH916TJNY",
      "09G6KHS6GY",
      "0ZXJ2455NJ",
      "0W8YHHGCJG",
      "0P27W9RW0G"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/A528RBFDDT/",
  "links": [
    {
      "field": "proves",
      "target": "0WS1A8E2P9"
    },
    {
      "field": "uses",
      "target": "0ATVXC3NCC"
    },
    {
      "field": "uses",
      "target": "0AXWET80YW"
    },
    {
      "field": "uses",
      "target": "0BTMQ04556"
    },
    {
      "field": "uses",
      "target": "0KDJD249DT"
    },
    {
      "field": "uses",
      "target": "0R8J3ZQMJS"
    },
    {
      "field": "uses",
      "target": "0N32V0E3XJ"
    },
    {
      "field": "uses",
      "target": "0PAQM3H57X"
    },
    {
      "field": "uses",
      "target": "0XMF00T4XQ"
    },
    {
      "field": "uses",
      "target": "0RAM4E07NR"
    },
    {
      "field": "uses",
      "target": "0WH916TJNY"
    },
    {
      "field": "uses",
      "target": "09G6KHS6GY"
    },
    {
      "field": "uses",
      "target": "0ZXJ2455NJ"
    },
    {
      "field": "uses",
      "target": "0W8YHHGCJG"
    },
    {
      "field": "uses",
      "target": "0P27W9RW0G"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/A528RBFDDT.md",
  "msc": [
    "26A15"
  ],
  "name": "Proof of the extreme value theorem by the Bolzano–Weierstrass theorem",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/A52/A528RBFDDT.md",
  "status": null,
  "tag": "A528RBFDDT",
  "uri": "m2://A528RBFDDT",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-extreme-value-theorem-by-the-bolzano-weierstrass-theorem/",
  "writing": {
    "tag": "A528RBFDDT",
    "kind": "proof",
    "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
      }
    ]
  }
}
