Exact ODEs

When a variable in a multi variable function $f(x,y)$ has variables that rely on another e.g. $y = y(t), x = x(t)$ then the derivative of that function is known as the total derivative and is given as

$\displaystyle \frac{d}{dt}f(x,y) = \frac{\delta f}{\delta x} \frac{dx}{dt} + \frac{\delta f}{\delta y} \frac{dy}{dt}$

This can also occur for when one variable is the function of another e.g. $x = x, y = y(x)$, the total derivative of such is

$\displaystyle \frac{d}{dx}f(x,y) = \frac{\delta f}{\delta x} + \frac{\delta f}{\delta x} \frac{dy}{dx}$ (1)

Exact ODEs take the form

$\displaystyle M(x,y) + N(x,y)\frac{dy}{dx}=0$

Where M and N must be separated by a plus. As you can see, this is in the same form as a the derivative of the function from equation (1), thus we can assume that

$\displaystyle \frac{\delta f}{\delta x} = M \quad \frac{\delta f}{\delta x} = N$

In order to verify this assumption we can test an 'exactness condition'

$\displaystyle \frac{\delta^2f}{\delta x \delta y}$ $\displaystyle = \frac{\delta^2 f}{\delta y \delta x}$    
$\displaystyle \frac{\delta M}{\delta x}$ $\displaystyle = \frac{\delta N}{\delta y}$    

We must now find a function to satisfy these conditions, however this is best left to an example.

$\displaystyle x + y^2 + 2xy\frac{dy}{dx}$ $\displaystyle = 0$    
$\displaystyle M = x + y^2$ $\displaystyle \quad N = 2xy$    
$\displaystyle \frac{\delta M}{\delta y}$ $\displaystyle = 2y$    
$\displaystyle \frac{\delta N}{\delta x}$ $\displaystyle = 2y$    

This satisfies the 'exactness condition', and so we can begin to find the function that solves the ODE.

$\displaystyle M$ $\displaystyle = \frac{\delta f}{\delta x}$    
$\displaystyle \int M dx$ $\displaystyle = f = \frac{1}{2}x^2 + xy^2 + g(y)$    
$\displaystyle N$ $\displaystyle = \frac{\delta f}{\delta y}$    
$\displaystyle \int N dy$ $\displaystyle = f = xy^2 + h(x)$    

For $\int M dx = \int N dy$ to be true their constants must satisfy each other, thus $g(y) = 0, h(x) = \frac{1}{2}x^2$

$\displaystyle f(x,y) = \frac{1}{2}x^2 + xy^2 + c = 0$