Why does this formula for an integrating factor for first-order ODE work

integrating-factorordinary differential equations

The book Shaum's Outlines: Differential Equations, 3rd edition (page 33) provides the following condition (among others) for determining that a first-order ODE is amenable to solution via an integrating factor:

$$
M = yf(xy)
$$

and

$$
N = xg(xy)
$$

This is where the ODE is written as:

$$
M dx + N dy = 0
$$

In this case, the integrating factor is:

$$
I(x,y) = {1 \over xM – yN}
$$

I am trying to figure out why this is so, and if possible, derive an explicit expression for the function whose exact differential is ${1 \over xM – yN}(M dx + N dy)$. If this formula had a distinctive name, I could easily search the web for more information, but Shaum's only calls it Equation 5.10.

I found another answer which appears to be related somehow, but can't quite figure out the connection. Can anyone help?

Best Answer

Using $M = y f(x y)$, $N = x g(x y)$, and some clever algebra we can get \begin{multline} \frac{Mdx + N dy}{xM-Ny} = \frac{f(xy)ydx + g(xy)xdy}{xy[f(xy) - g(x y)]} \\= \frac{[f(xy) + g(xy)][ydx + x dy]}{2xy[f(xy)-g(xy)]} + \frac{[f(xy) - g(xy)][ydx - x dy]}{2xy[f(xy)-g(xy)]}\\ = \frac{1}{2}\left[\frac{d(xy)}{2xy}\frac{f(xy) + g(xy)}{f(xy)-g(xy)} + \frac{dx}{x}-\frac{dy}{y}\right] \end{multline} These are all exact differentials, so the resulting integral will be $$ \frac{1}{2}\ln\frac{x}{y} + \frac{1}{2}\int_a^{xy}\frac{f(t)+g(t)}{f(t)-g(t)}\frac{dt}{t} $$