{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $S$ be a set and let $X$ be a [[normed vector space|03J5RAKB30]] of [[functions|0EPAT51DXQ]] on $S$.\nLet $A \\subseteq X$ be a nonempty subset, the approximating class.\nLet $f \\in X$ and $\\varepsilon \u003e 0$.\nAn *approximation of $f$ from $A$ within $\\varepsilon$* is a function $g \\in A$ with $\\norm{f - g} \\le \\varepsilon$.\nThe function $f$ *can be approximated arbitrarily well from $A$* if such a $g$ exists for every $\\varepsilon \u003e 0$.\nEquivalently, $f$ lies in the closure of $A$.\n\n## Remarks\n\nExample: take $X = C[0, 1]$ with the supremum norm, $A$ the polynomials of degree at most $2$, and $f(x) = e^x$.\nThe function $g(x) = 1 + x + x^2/2$ is an approximation within $0.22$.\nIndeed $e^x - g(x)$ is increasing on $[0, 1]$, since its derivative $e^x - 1 - x$ is nonnegative, so its maximum is $e - 2.5 \u003c 0.22$.\n\nNon-example: on $[-1, 1]$ with the supremum norm, the sign function cannot be approximated within any $\\varepsilon \u003c 1$ by continuous functions.\nLet $g$ be continuous with $g(0) = c$.\nNear $0$ the gaps $\\abs{1 - g(x)}$ for $x \u003e 0$ and $\\abs{-1 - g(x)}$ for $x \u003c 0$ come close to $\\abs{1 - c}$ and $\\abs{1 + c}$.\nOne of these two numbers is at least $1$.\n\nThe choice of norm matters: the sign function can be approximated arbitrarily well by continuous functions in the $L^2$ norm.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "VNWH2KADN7",
    "kind": "definition",
    "msc": [
      "41A65",
      "41A30"
    ],
    "name": "Function approximation",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Function_approximation"
      }
    ],
    "tag": "MP8X04H1ZD",
    "uses": [
      "03J5RAKB30",
      "0EPAT51DXQ"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/MP8X04H1ZD/",
  "links": [
    {
      "field": "defines",
      "target": "VNWH2KADN7"
    },
    {
      "field": "uses",
      "target": "03J5RAKB30"
    },
    {
      "field": "uses",
      "target": "0EPAT51DXQ"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/MP8X04H1ZD.md",
  "msc": [
    "41A65",
    "41A30"
  ],
  "name": "Function approximation",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/MP8/MP8X04H1ZD.md",
  "status": null,
  "tag": "MP8X04H1ZD",
  "uri": "m2://MP8X04H1ZD",
  "url": "https://tamnd.github.io/math2/wiki/function-approximation-definition/",
  "writing": {
    "tag": "MP8X04H1ZD",
    "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
      }
    ]
  }
}
