# Ordinary Differential Equations/Exact equations

## Introduction

Suppose the function $F(x,y)$  represents some physical quantity, such as temperature, in a region of the $xy$ -plane. Then the level curves of F, where $F(x,y)={\text{constant}}$ , could be interpreted as isotherms on a weather map (i.e curves on a weather map representing constant temperatures). Along one of these curves, $\gamma (x)=(x,y(x))$ , of constant temperature we have, by Chain rule and the fact that the temperature, F, is constant on these curves:

$0={\frac {\mathrm {d} F(\gamma (x))}{\mathrm {d} x}}=F_{x}+F_{y}{\frac {\mathrm {d} y}{\mathrm {d} x}}.$

Multiplying through by $\mathrm {d} x$  we obtain

$0=F_{x}\mathrm {d} x+F_{y}\mathrm {d} y.$

Therefore, if we were not given the original function F but only an equation of the form:

$M(x,y)\mathrm {d} x+N(x,y)\mathrm {d} y=0,$

we could set $F_{x}:=M(x,y),F_{y}:=N(x,y)$  and then by integrating figure out the original $F$ .

## Method formal steps

(1) First ensure that there is such an $F$ , by checking the exactness-condition:

${\frac {\partial {}M}{\partial {}y}}={\frac {\partial {}N}{\partial {}x}}.$

This is because if there was such an F, then ${\frac {\partial {}M}{\partial {}y}}={\frac {\partial ^{2}F}{\partial {}y\partial {}x}}={\frac {\partial ^{2}F}{\partial {}x\partial {}y}}={\frac {\partial {}N}{\partial {}x}},$

where ${\frac {\partial }{\partial {}x}}$  and ${\frac {\partial }{\partial {}y}}$  simply denote the partial derivatives with respect to the variables $x$  and $y$  respectively (where we hold the other variable constant while taking the derivative).

(2)Second, integrate $M,N$  with respect to $x,y$  respectively:

$\int \!{}M(x,y)dx=\int \!{}F_{x}(x,y)dx=F(x,y)+a(y)$

$\int \!{}N(x,y)dy=\int \!{}F_{y}(x,y)dy=F(x,y)+b(x)$

for some unknown functions $a,b$  (these play the role of constant of integration when you integrate with respect to a single variable). So to obtain $F$  it remains to determine either $a$  or $b$ .

(3)Equate the above two formulas for $F(x,y)$ :$\int \!{}M(x,y)\mathrm {d} x+a(y)=F(x,y)=\int \!{}N(x,y)\mathrm {d} y+b(x).$

(4) Since to find $F$  it suffices to determine $a$  or $b$ , pick the integral that is easier to evaluate. Suppose that $\int M(x,y)\mathrm {d} x$  is easier to evaluate. To obtain $a(y)$  we differentiate both expression for $F$  in $y$  (for fixed $x$ ):$a'(y)=-\int \!{}M_{y}(x,y)\mathrm {d} x+N(x,y)$ and then integrate in $y$ :$a(y)=\int \left[-\int M_{y}(x,y)dx+N(x,y)\right]\mathrm {d} y+c.$

(5)Observe that $a$  is only a function of $y$  since if we differentiate the expression we found for $a$  and use step $1$  we find that

{\begin{aligned}{\frac {\partial {}a}{\partial {}x}}=&\int \!{}{\frac {\partial }{\partial {}x}}\left[-\int \!{}M_{y}(x,y)\mathrm {d} x+N(x,y)\right]\mathrm {d} y\\=&\int \!{}\left[-M_{y}(x,y)+N_{x}(x,y)\right]\mathrm {d} x\\=&\int \!{}0\mathrm {d} x\\=&0\end{aligned}}