Solution to Exact Differential Equation

Theorem
The first order ordinary differential equation‎:
 * $F = \map M {x, y} + \map N {x, y} \dfrac {\d y} {\d x} = 0$

is an exact differential equation‎ :
 * $\dfrac {\partial M} {\partial y} = \dfrac {\partial N} {\partial x}$

The general solution of such an equation‎ is:
 * $\map f {x, y} = C$

where:
 * $\dfrac {\partial f} {\partial x} = M$
 * $\dfrac {\partial f} {\partial y} = N$

Necessary Condition
Let $F$ be exact.

Then by definition there exists a function whose second partial derivatives of $f$ exist and are continuous:
 * $\map f {x, y}$

where:
 * $\dfrac {\partial f} {\partial x} = M$
 * $\dfrac {\partial f} {\partial y} = N$

Differentiating $M$ and $N$ partially $y$ and $x$ respectively:


 * $\dfrac {\partial M} {\partial y} = \dfrac {\partial^2 f} {\partial x \partial y}$
 * $\dfrac {\partial N} {\partial x} = \dfrac {\partial^2 f} {\partial y \partial x}$

From Mixed Second Partial Derivatives are Equal:
 * $\dfrac {\partial M} {\partial y} = \dfrac {\partial N} {\partial x}$

Sufficient Condition
Let $F$ be such that:
 * $\dfrac {\partial M} {\partial y} = \dfrac {\partial N} {\partial x}$

Take the equation:
 * $\dfrac {\partial f} {\partial x} = M$

and integrate it $x$:
 * $(1): \quad f = \displaystyle \int M \rd x + \map g y$

Note that the arbitrary constant here is an arbitrary function of $y$, since when differentiating partially $x$ it disappears.

So, now we need to find such a $\map g y$ so as to make $f$ as defined in $(1)$ satisfy $\dfrac {\partial f} {\partial y} = N$.

Differentiating $(1)$ $y$ and equating it to $N$:
 * $\displaystyle \dfrac {\partial} {\partial y} \int M \rd x + \map {g'} y = N$

So:
 * $\displaystyle \map {g'} y = N - \dfrac {\partial} {\partial y} \int M \rd x$

which can be integrated $y$ thus:
 * $\displaystyle \map g y = \int \paren {N - \frac {\partial} {\partial y} \int M \rd x} \rd y$

which works as long as the integrand is a function of $y$ only.

This will happen if its derivative $x$ is equal to zero.

We need to make sure of that, so we try it out:

This is our initial condition.

The Solution
Then $F$ can be written in the form:
 * $\dfrac {\partial f} {\partial x} \rd x + \dfrac {\partial f} {\partial y} \rd y = 0$

and the solution follows.