Definition of Exact ODEs
Exact ODEs are first-order ODEs that can be written in the form of
\begin{equation}
M(x,y) dx + N(x,y) dy = 0 \tag{1}
\end{equation}
where \( M(x,y), N(x,y) \) are some functions of \( x \) and \( y \), such that
\begin{equation}
\left\{\begin{aligned}
M &= \frac{\partial f}{\partial x} \\
N &= \frac{\partial f}{\partial y}
\end{aligned}\right. \tag{2}
\end{equation}
are partial derivatives for another function \( f(x,y) \). An example is
\begin{equation}
y \cos x dx + \sin x dy = 0
\end{equation}
with \( f(x,y) = y \sin x\). By the Chain Rule for multiple variables, the ODE can be rewritten as
\begin{align}
\frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy &= 0 \tag{3} \\
df &= 0 \tag{4}
\end{align}
where \( df \) is called the exact/total differential and \( f \) is known as the potential function. Integration then yields a family of solution curves:
\begin{equation}
f(x,y) = c \tag{5}
\end{equation}
generated by changing the values of the integration constant \( c \). Below is a schematic illustrating how the level curves, in addition to the potential, behave:

The overall change in potential is \( \Delta f = (\partial f/\partial x) \Delta x + (\partial f/\partial y) \Delta y = 0 \). Along a level curve, as the displacement becomes infinitesimally small, it becomes \( df = (\partial f/\partial x) dx + (\partial f/\partial y) dy = 0 \) which is zero as required by (3)/(4). This means that the potential conserves along any solution curve of exact ODEs.
Exactness Condition
We emphasize that for an ODE like (1) to be exact, we need (2), i.e. \( M = \partial f/\partial x, N =\partial f/\partial y \), to hold. Due to Clairaut’s Theorem in elementary Calculus, the order of partial derivatives can be interchanged under mild conditions, such that
\begin{align}
\frac{\partial}{\partial y}(\frac{\partial f}{\partial x}) &= \frac{\partial}{\partial x}(\frac{\partial f}{\partial y}) \tag{6} \\
\frac{\partial M}{\partial y}&= \frac{\partial N}{\partial x} \tag{7}
\end{align}
(7) is hence the desired exactness condition.
Example
The example this time is to solve
\begin{equation}
3ydx + (3x+2y)dy = 0 \tag{8}
\end{equation}
We first check exactness as follows:
\begin{align}
\frac{\partial M}{\partial y} &= \frac{\partial (3y)}{\partial y} \\
&= 3 = \frac{\partial (3x+2y)}{\partial x} = \frac{\partial N}{\partial x}
\end{align}
Then we can integrate \( M = 3y \) w.r.t (with respect to) \( x \) and \( N = 3x+2y \) w.r.t \( y \) to retrieve \( f \). Note that by (2), we have, again using elementary Calculus
\begin{align}
M &= \frac{\partial f}{\partial x} \\
\int M dx &= \int \frac{\partial f}{\partial x} dx = f(x,y) + g(y) \tag{9} \\
N &= \frac{\partial f}{\partial y} \\
\int N dy &= \int \frac{\partial f}{\partial y} dy = f(x,y) + h(x) \tag{10}
\end{align}
where integrating w.r.t \( x \) will produce an integration “constant” \( g(y) \) that depends on \( y \), and similarly in the case of \( y \) and \( h(x) \). Subsequently,
\begin{align}
\int M dx &= \int 3y dx = 3xy + g(y) \tag{11} \\
\int N dy &= \int (3x+2y) dy = 3xy + y^2 + h(x) \tag{12}
\end{align}
By comparing these two expressions, we conclude that the potential function is
\begin{equation}
f(x,y) = 3xy + y^2 \tag{13}
\end{equation}
and the general solution is
\begin{equation}
3xy + y^2 = C \tag{14}
\end{equation}
For example, if I.C. is \( y(1) = 1 \), then we have \( C = 4 \).
Exercise
Find the general solution for
\begin{equation}
y(e^{xy} + y)dx + x(e^{xy} + 2y)dy = 0
\end{equation}
Answer
Checking exactness:
\begin{align}
\frac{\partial M}{\partial y} &= \frac{\partial (y(e^{xy} + y))}{\partial y} \\
&= e^{xy} +xye^{xy} + 2y = \frac{\partial (x(e^{xy} + 2y))}{\partial x} = \frac{\partial N}{\partial x}
\end{align}
Integration yields
\begin{align}
\int M dx &= \int (ye^{xy} + y^2) dx = e^{xy} + xy^2 + g(y) \\
\int N dy &= \int (xe^{xy} + 2xy) dy = e^{xy} + xy^2 + h(x)
\end{align}
So we can choose the potential function and obtain the general solution as
\begin{equation}
e^{xy} + xy^2 = C
\end{equation}








Leave a Reply