{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe write $M_y = \\partial M / \\partial y$ and $N_x = \\partial N / \\partial x$.\n\n1. Necessity. Assume the equation is [[exact|0EC7AGJ0PX]] on $R$. So there is a differentiable $\\psi : R \\to \\R$ with $\\partial \\psi / \\partial x = M$ and $\\partial \\psi / \\partial y = N$ on $R$.\n2. Fix $(x, y) \\in R$. Since $R$ is open, there is $h_0 \u003e 0$ with $[x, x + h] \\times [y, y + h] \\subseteq R$ for each $h \\in (0, h_0]$. Fix such an $h$.\n3. Let $\\Delta = \\psi(x + h, y + h) - \\psi(x + h, y) - \\psi(x, y + h) + \\psi(x, y)$.\n4. Let $g(s) = \\psi(s, y + h) - \\psi(s, y)$ for $s \\in [x, x + h]$. Then $g$ is differentiable with $g'(s) = M(s, y + h) - M(s, y)$, since $\\partial \\psi / \\partial x = M$.\n5. By the [[mean value theorem|0BARQY52N5]], $\\Delta = g(x + h) - g(x) = h\\, g'(\\xi)$ for some $\\xi \\in (x, x + h)$.\n6. The function $t \\mapsto M(\\xi, t)$ is differentiable with derivative $M_y(\\xi, t)$. The mean value theorem gives $\\eta \\in (y, y + h)$ with $M(\\xi, y + h) - M(\\xi, y) = h\\, M_y(\\xi, \\eta)$. So $\\Delta = h^2 M_y(\\xi, \\eta)$.\n7. In the same way, let $k(t) = \\psi(x + h, t) - \\psi(x, t)$ for $t \\in [y, y + h]$. Then $k'(t) = N(x + h, t) - N(x, t)$, since $\\partial \\psi / \\partial y = N$.\n8. Two uses of the mean value theorem, first for $k$ and then for $s \\mapsto N(s, \\eta')$, give points $\\xi' \\in (x, x + h)$ and $\\eta' \\in (y, y + h)$ with $\\Delta = h^2 N_x(\\xi', \\eta')$.\n9. By steps 6 and 8, $M_y(\\xi, \\eta) = N_x(\\xi', \\eta')$. Both points lie in the square $[x, x + h] \\times [y, y + h]$.\n10. Let $h \\to 0$ along $h = h_0 / j$. Both points tend to $(x, y)$. Since $M_y$ and $N_x$ are continuous, $M_y(x, y) = N_x(x, y)$.\n11. Sufficiency. Assume $M_y = N_x$ on $R$. Fix $(x_0, y_0) \\in R$, and for $(x, y) \\in R$ let $\\psi(x, y) = \\int_{x_0}^{x} M(s, y_0)\\, ds + \\int_{y_0}^{y} N(x, t)\\, dt$.\n12. Since $R$ is a rectangle, the segments from $(x_0, y_0)$ to $(x, y_0)$ and from $(x, y_0)$ to $(x, y)$ lie in $R$. The integrands are continuous, so $\\psi$ is well defined.\n13. The first term of $\\psi$ does not depend on $y$. The function $t \\mapsto N(x, t)$ is continuous on $(\\gamma, \\delta)$. By [[the antiderivative theorem|0NC2A3HWGT]], $\\partial \\psi / \\partial y (x, y) = N(x, y)$.\n14. Fix $(x_1, y_1) \\in R$. The first term $A(x) = \\int_{x_0}^{x} M(s, y_0)\\, ds$ has $A'(x_1) = M(x_1, y_0)$, by the antiderivative theorem.\n15. Let $B(x) = \\int_{y_0}^{y_1} N(x, t)\\, dt$. If $y_1 = y_0$, then $B = 0$ and $B'(x_1) = 0$.\n16. Otherwise let $c = \\min(y_0, y_1)$ and $d = \\max(y_0, y_1)$, and choose $h \u003e 0$ with $[x_1 - h, x_1 + h] \\subseteq (\\alpha, \\beta)$. Then $N$ and $N_x$ are continuous on $[x_1 - h, x_1 + h] \\times [c, d] \\subseteq R$.\n17. By [[differentiation under the integral sign|0AR06W1E1B]], $B'(x_1) = \\int_{y_0}^{y_1} N_x(x_1, t)\\, dt$. Here $B$ is $\\pm \\int_c^d N(x, t)\\, dt$, so the rule applies to it.\n18. By hypothesis $N_x(x_1, t) = M_y(x_1, t)$. The function $t \\mapsto M(x_1, t)$ is continuous on $[c, d]$ with derivative $M_y(x_1, t)$.\n19. The [[fundamental theorem of calculus|0NHGY0N0JB]] gives $\\int_c^d M_y(x_1, t)\\, dt = M(x_1, d) - M(x_1, c)$. So $B'(x_1) = M(x_1, y_1) - M(x_1, y_0)$ in both orders of $y_0, y_1$.\n20. This also holds when $y_1 = y_0$. Adding steps 14 and 19 gives $\\partial \\psi / \\partial x (x_1, y_1) = M(x_1, y_1)$.\n21. So the partial derivatives of $\\psi$ are $M$ and $N$, which are continuous on the open set $R$. By [[continuous partial derivatives imply differentiability|0KXSK8TEEB]], $\\psi$ is differentiable on $R$.\n22. Hence $\\psi$ is a potential function, and the equation is exact on $R$.\n\n## Idea\n\nFor necessity, the double difference $\\Delta$ of $\\psi$ over a small square can be computed as $h^2 M_y$ or as $h^2 N_x$, at nearby points. Shrinking the square and using continuity gives $M_y = N_x$. For sufficiency, we integrate $M$ along a horizontal segment and $N$ along a vertical one. The condition $M_y = N_x$ makes the $x$-derivative of the second integral cancel the error of the first.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "34A05"
    ],
    "name": "Proof of the test for exactness",
    "proves": "0MSCQNFTM8",
    "sources": [
      {
        "locator": "Identifying first-order exact differential equations",
        "url": "https://en.wikipedia.org/wiki/Exact_differential_equation"
      }
    ],
    "tag": "2X5V81FS0J",
    "uses": [
      "0EC7AGJ0PX",
      "0BARQY52N5",
      "0NC2A3HWGT",
      "0AR06W1E1B",
      "0NHGY0N0JB",
      "0KXSK8TEEB"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/2X5V81FS0J/",
  "links": [
    {
      "field": "proves",
      "target": "0MSCQNFTM8"
    },
    {
      "field": "uses",
      "target": "0EC7AGJ0PX"
    },
    {
      "field": "uses",
      "target": "0BARQY52N5"
    },
    {
      "field": "uses",
      "target": "0NC2A3HWGT"
    },
    {
      "field": "uses",
      "target": "0AR06W1E1B"
    },
    {
      "field": "uses",
      "target": "0NHGY0N0JB"
    },
    {
      "field": "uses",
      "target": "0KXSK8TEEB"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/2X5V81FS0J.md",
  "msc": [
    "34A05"
  ],
  "name": "Proof of the test for exactness",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/2X5/2X5V81FS0J.md",
  "status": null,
  "tag": "2X5V81FS0J",
  "uri": "m2://2X5V81FS0J",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-test-for-exactness/",
  "writing": {
    "tag": "2X5V81FS0J",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
