# Can all first order ODEs be made exact?

Elementary differential equations classes usually cover exact differential equations. These are equations of the form: $$M(x,y)+N(x,y)y'=0 \qquad \mathrm{such\;that} \qquad \frac{\partial M}{\partial y} = \frac{\partial N}{\partial y}$$

We know that in many cases if one cooks up the right integrating factor $I(x,y)$, we can multiply through the equation and get a new equation $I(x,y)M(x,y)+I(x,y)N(x,y)y'=0$ which is exact (i.e. $\frac{\partial (IM)}{\partial y} = \frac{\partial (IN)}{\partial y}$) and has the same solutions.

Also, we know that finding $I$ (in general) is quite hopeless since this boils down to solving the first order partial differential equation: $\frac{\partial (IM)}{\partial y} = \frac{\partial (IN)}{\partial y}$ for $I$.

To find $I$ one usually makes some simplifying assumption (like $I(x,y)$ is a monomial or $I$ does not depend on $x$ or $y$). In such cases finding $I$ reduces to algebra or solving an easier first order ODE.

Of course, $I=0$, always makes the equation exact (but this introduces solutions which are not solutions to the original equation). Also, it's not too hard to come up with examples which have no integrating factors which are monomials or functions of $x$ or $y$ alone (the special assumptions don't always pan out).

My question: Is it true (under some assumptions -- like $M$ and $N$ are analytic or something) that there always exists some $I$ such that $IM+INy'=0$ is exact (and has the same set of solutions)?

If so, could you provide a reference or two? Preferably something better than "look at DeRham cohomology...blah blah...foliations." A fairly elementary reference accessible to someone without extensive differential topology background would be nice (if it exists).

If this is not true, are there reasonable assumptions one can make so that it is true?

I'm no DEs expert (I've taught a few introductory courses but this is outside my realm of expertise). By brother brought up this question a few weeks ago and it's been bothering me. He says he's seen the answer "Yes" claimed in some text (but that text was written for engineers so who knows whether the author meant "integrating factors always exist" or "integrating factors exist for the equations we care about").

Edit: Thanks for Julian for his answer. Here's a more detailed version of what he posted...

Given a differential equation, $M(x,y)+N(x,y)y'=0$. Let's assume $M$ and $N$ have continuous first partials. In addition assume $M(x,y)$ and $N(x,y) \not=0$ [If $N(x,y)=0$, this is not a DE. If $M(x,y)=0$ we just have trivial constant solutions].

Then the equation is equivalent to $y'=-M(x,y)/N(x,y)$. Call on the fundamental existence/uniqueness theorem and get a solution $F(x,y,C)=0$. If $F_y=0$, then $y$ does not appear in $F$ (which is absurd) so $F_y \not=0$.

Fix a constant $C$, by the chain rule, since $F(x,y,C)=0$ we have $F_x(x,y,C)+F_y(x,y,C)y'=0$. Therefore, $y' = -F_x/F_y$ (recall $F_y \not=0$). But $y'=-M/N$. Therefore, $-F_x/F_y=-M/N$ and so $F_x/M = F_y/N$ (recall $M$ and $N$ are non-zero). Let $I(x,y) = F_x(x,y)/M(x,y) = F_y(x,y)/N(x,y)$ (this is our integrating factor).

Then $I(x,y)M(x,y) + I(x,y)N(x,y)y' = 0$ which is $\frac{F_x}{M}M+\frac{F_y}{N}Ny'=0$ and so $F_x(x,y)+F_y(x,y)y'=0$ (which is an exact equation).

Therefore, we can (in theory) always find (except in a trivial case) an integrating factor to make a first order ODE into an exact equation.

Also, note: I have not been precise about where things are non-zero, but we don't really need these functions and partials to be non-zero everywhere just in the regions we care about.

-
I suppose you could try scavenging through existence theorems for PDEs. – anon Jan 23 '12 at 15:47
I certainly thought this question was interesting :) – James S. Cook Aug 19 '12 at 0:23

If the solution of the equation is in the form $F(x,y,C)=0$, solve for $C$ to obtain $G(x,y)=C$. Taking derivatives with respect to $x$ we get $$\frac{\partial G}{\partial x}(x,y)+\frac{\partial G}{\partial y}(x,y)\,y'=0\ ,$$ which is equivalent to the exact form $$M(x,y)\,dx+N(x,y)\,dy=0$$ with $$M=\frac{\partial G}{\partial x},\qquad N(x,y)=\frac{\partial G}{\partial y}\ .$$
This isn't what I am asking. I want to know whether there is an integrating factor $I$ which will turn the ODE into an exact equation. Given $M+Ny'=0$, multiply by $I$ and get $IM+INy'=0$. Can we guarantee that $IM=G_x$ and $IN=G_y$ for some $G$? So that $I=G_x/M=G_y/N$? Equivalently, can $G$ be found so that $G_x/M=G_y/N$? – Bill Cook Jan 23 '12 at 18:29
As I said, the answer is yes. Given the equation $M+N\,y'=0$, from the general solution you can find $G(x,y)$ such that $G_xdx+G_ydy=0$, or equivalently $y'=-G_x/G_y$. From the equation it folows that $-M/N=-G_x/G_y$. that is, $G_x/M=G_y/N$. – Julián Aguirre Jan 23 '12 at 23:05
Thanks for the forceful rebuttal - I was being too dense. Now I see. By the way, I don't believe you need to "solve for $C$". Dealing with $F$ directly should work. Fix a choice for $C$, then $F(x,y,C)=0$ implies $F_x+F_y y' =0$ (chain rule). So $I=F_y/N=F_x/M$ works as the integrating factor. I guess this uses assumptions: $F_y \not=0$, $M \not=0$, and $N \not=0$ (which isn't too surprising). THANKS!!! – Bill Cook Jan 24 '12 at 2:43