# Ordinary Differential Equations/Exact equations

## Introduction

Suppose the function ${\displaystyle F(x,y)}$  represents some physical quantity, such as temperature, in a region of the ${\displaystyle xy}$ -plane. Then the level curves of F, where ${\displaystyle 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, ${\displaystyle \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:

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

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

${\displaystyle 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:

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

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

## Method formal steps

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

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

This is because if there was such an F, then ${\displaystyle {\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 ${\displaystyle {\frac {\partial }{\partial {}x}}}$  and ${\displaystyle {\frac {\partial }{\partial {}y}}}$  simply denote the partial derivatives with respect to the variables ${\displaystyle x}$  and ${\displaystyle y}$  respectively (where we hold the other variable constant while taking the derivative).

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

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

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

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

(3)Equate the above two formulas for ${\displaystyle F(x,y)}$ :${\displaystyle \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 ${\displaystyle F}$  it suffices to determine ${\displaystyle a}$  or ${\displaystyle b}$ , pick the integral that is easier to evaluate. Suppose that ${\displaystyle \int M(x,y)\mathrm {d} x}$  is easier to evaluate. To obtain ${\displaystyle a(y)}$  we differentiate both expression for ${\displaystyle F}$  in ${\displaystyle y}$  (for fixed ${\displaystyle x}$ ):${\displaystyle a'(y)=-\int \!{}M_{y}(x,y)\mathrm {d} x+N(x,y)}$ and then integrate in ${\displaystyle y}$ :${\displaystyle a(y)=\int \left[-\int M_{y}(x,y)dx+N(x,y)\right]\mathrm {d} y+c.}$

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

{\displaystyle {\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}}}