# Solution to Exact Differential Equation

## Contents

## Theorem

The first order ordinary differential equation:

- $F = M \left({x, y}\right) + N \left({x, y}\right) \dfrac {\d y} {\d x} = 0$

is an exact differential equation if and only if:

- $\dfrac {\partial M} {\partial y} = \dfrac {\partial N} {\partial x}$

The general solution of such an equation is:

- $f \left({x, y}\right) = C$

where:

- $\dfrac {\partial f} {\partial x} = M, \dfrac {\partial f} {\partial y} = N$

## Proof

### Necessary Condition

Let $F$ be exact.

Then by definition there exists a function whose second partial derivatives of $f$ exist and are continuous:

- $f \left({x, y}\right)$

where:

- $\dfrac {\partial f} {\partial x} = M, \dfrac {\partial f} {\partial y} = N$

Differentiating $M$ and $N$ partially with respect to $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}$

$\Box$

### 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 with respect to $x$:

- $\displaystyle (1): \quad f = \int M \rd x + g \left({y}\right)$

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

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

Differentiating $(1)$ with respect to $y$ and equating it to $N$:

- $\displaystyle \frac {\partial} {\partial y} \int M \rd x + g' \left({y}\right) = N$

So:

- $\displaystyle g' \left({y}\right) = N - \frac {\partial} {\partial y} \int M \rd x$

which can be integrated with respect to $y$ thus:

- $\displaystyle g \left({y}\right) = \int \left({N - \frac {\partial} {\partial y} \int M \rd x}\right) \rd y$

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

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

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

\(\displaystyle \frac {\partial} {\partial x} \left({N - \frac {\partial} {\partial y} \int M \rd x}\right)\) | \(=\) | \(\displaystyle \frac {\partial N} {\partial x} - \frac {\partial^2} {\partial x \partial y} \int M \rd x\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \frac {\partial N} {\partial x} - \frac {\partial^2} {\partial y \partial x} \int M \rd x\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle \frac {\partial N} {\partial x} - \frac {\partial M} {\partial y}\) |

This is our initial condition.

$\Box$

## 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.

$\blacksquare$

## Also see

- Results about
**examples of exact differential equations**can be found here.

## Sources

- 1968: Murray R. Spiegel:
*Mathematical Handbook of Formulas and Tables*... (previous) ... (next): $18.4$: Basic Differential Equations and Solutions - 1972: George F. Simmons:
*Differential Equations*... (previous) ... (next): $\S 2.8$: Exact Equations