Possible Integrating Factors to Retrieve Exact ODEs
In the last tutorial, we talked about exact ODEs in the form of
\begin{equation}
M(x,y) dx + N(x,y) dy = 0 \tag{1}
\end{equation}
with the condition
\begin{equation}
\left\{\begin{aligned}
M &= \frac{\partial f}{\partial x} \\
N &= \frac{\partial f}{\partial y}
\end{aligned}\right. \tag{2}
\end{equation}
However, sometimes we will also encounter first-order ODEs that resemble (1), but fail to satisfy (2): hence they are non-exact (not exact), and it is not possible to directly apply the previous method.
One of the remedies is using a suitable integrating factor \( \mu \), thus the problem becomes how to decide its form. Assuming that upon multiplying \( \mu \) to (1), the equation is transformed into an exact one, such that we have
\begin{equation}
\mu M(x,y) dx + \mu N(x,y) dy = 0 \tag{3}
\end{equation}
with now the requirement (see (7) of the last tutorial)
\begin{equation}
\frac{\partial}{\partial y}(\mu M(x,y)) = \frac{\partial}{\partial x}(\mu N(x,y)) \tag{4}
\end{equation}
By the Product Rule in elementary Calculus, we have
\begin{align}
M\frac{\partial \mu}{\partial y} + \mu\frac{\partial M}{\partial y} &= N\frac{\partial \mu}{\partial x} + \mu\frac{\partial N}{\partial x} \\
M\frac{\partial \mu}{\partial y} -N\frac{\partial \mu}{\partial x} &= \mu(\frac{\partial N}{\partial x} -\frac{\partial M}{\partial y}) \\
\frac{1}{\mu}(M\frac{\partial \mu}{\partial y} -N\frac{\partial \mu}{\partial x}) &= \frac{\partial N}{\partial x} -\frac{\partial M}{\partial y} \tag{5}
\end{align}
Now further suppose that \( \mu(x) \) depends on \( x \) only, then (5) becomes
\begin{align}
-\frac{1}{\mu}(N\frac{d\mu}{dx}) &= \frac{\partial N}{\partial x} -\frac{\partial M}{\partial y} \\
\frac{1}{\mu}\frac{d\mu}{dx} &= \frac{\partial N/\partial x -\partial M/\partial y}{-N} \tag{6}
\end{align}
in particular the partial derivative \( \partial \mu/\partial x \) becomes an ordinary one \( d\mu/dx \). Since the L.H.S. is assumed to be in \( x \) only, the R.H.S. has to follow the same (we will have to check that for consistency), so we can let
\begin{equation}
\frac{\partial N/\partial x -\partial M/\partial y}{-N} = g(x) \tag{7}
\end{equation}
and (6) becomes a separable ODE in the form of
\begin{align}
\int \frac{d\mu}{\mu} &= \int \frac{\partial N/\partial x -\partial M/\partial y}{-N} dx = \int g(x) dx \\
\ln |\mu| &= \int g(x) dx \\
\mu &= \exp(\int g(x) dx) \tag{8}
\end{align}
(the absolute sign does not matter here) (8) is then a possible integrating factor that can be multiplied to the non-exact ODE to make it exact, if our premise that \( \mu(x) \), and hence (7) is a function of \( x \) only, is indeed true.
By a similar argument, if
\begin{align}
h(y) = \frac{N_x -M_y}{M} \tag{9}
\end{align}
is a function of \( y \) only, then \( \exp(\int h(y) dy) \) will be an integrating factor.
Example
Now we will go through solving
\begin{equation}
(y \ln y) dx + (x+y) dy = 0 \tag{10}
\end{equation}
This ODE is non-exact as the required partial derivatives are not equal:
\begin{align}
M_y &= \ln y + 1 \\
&\neq 1 = N_x
\end{align}
Since \( N_x -M_y = -\ln y \), we are tempeted to try (9)
\begin{align}
h(y) &= \frac{N_x -M_y}{M} \\
&= \frac{-\ln y}{y \ln y} \\
&= -\frac{1}{y} \tag{11}
\end{align}
which indeed depends on \( y \) only. So the integrating factor is
\begin{align}
\mu = \exp(-\int \frac{1}{y} dy) = \exp(-\ln |y|) = \exp(\ln (y^{-1})) = \frac{1}{y} \tag{12}
\end{align}
(again, the absolute value does not matter here) Multiplying by this form, the equation then becomes exact:
\begin{equation}
(\ln y) dx + (\frac{x}{y} + 1) dy = 0 \tag{13}
\end{equation}
\begin{align}
M_y = \frac{1}{y} = N_x \tag{14}
\end{align}
Now we integrate \(M\) and \(N\) w.r.t. \(x, y\), yielding
\begin{align}
\int M dx &= \int (\ln y) dx = x \ln y + p(y) \tag{15} \\
\int N dy &= \int (\frac{x}{y} + 1) dy = x \ln y + y + q(x) \tag{16}
\end{align}
where we now use \(p, q\) to denote the integration constants. The potential function, as well as the general solution, is subsequently
\begin{equation}
x \ln y + y = C \tag{17}
\end{equation}
Exercise
Find the general solution for
\begin{equation}
(1 -y^2 \tan x) dx + 2y dy = 0
\end{equation}
Answer
We leave it to the readers to check that this ODE is non-exact. Let’s try our luck on (7):
\begin{align}
\frac{\partial N/\partial x -\partial M/\partial y}{-N} &= \frac{0 -(-2y \tan x)}{-2y} \\
&= -\tan x
\end{align}
which is a function of \( x \) exactly. Then, the integrating factor is
\begin{align}
\exp(\int -\tan x dx) &= \exp(\int -\frac{\sin x}{\cos x} dx) \\
&= \exp(\int \frac{1}{\cos x} d(\cos x)) \\
&= \exp(\ln | \cos x |) = | \cos x |
\end{align}
Upon multiplying this integrating factor (can ignore the absolute value), the ODE becomes exact:
\begin{equation}
(\cos x -y^2 \sin x) dx + 2y \cos x dy = 0
\end{equation}
\begin{align}
M_y = -2y \sin x = N_x
\end{align}
Integration gives
\begin{align}
\int (\cos x -y^2 \sin x) dx &= \sin x + y^2 \cos x + g(y) \\
\int (2y \cos x) dy &= y^2 \cos x + h(x)
\end{align}
So our general solution will be
\begin{equation}
\sin x + y^2 \cos x = C
\end{equation}








Leave a Reply