# Can every separable differential equation be rewritten to potentially be exact (or NOT exact)?

Let's say an ordinary linear DE is separable. Then $$\frac{dy}{dx} = P(y)Q(x) \Leftrightarrow \frac{1}{P(y)}dy = Q(x)dx \Leftrightarrow Q(x)dx + R(y)dy = 0$$ is in exact form where $R(y)=-\frac{1}{P(y)}.$ This means that $M(x,y) = Q(x)$ and $N(x,y) = R(y)$ if we're using standard text book notation.

To test for exactness, note that $$\frac{\partial M}{\partial y} = 0 = \frac{\partial N}{\partial x},$$ meaning that any separable equation could be made to be exact.

As a concrete example, consider $$\frac{dy}{dx} = x\ln (y) + x$$ which is separable as $$\frac{1}{\ln(y)+1}dy = xdx$$ and everything I wrote above follows (demonstrating that our equation is indeed exact). HOWEVER, if we instead write it as $$dy= (x\ln (y) + x)dx \Leftrightarrow -(x \ln (y) + x)dx + dy = 0$$ then we have that $M(x,y) = -(x\ln(y) + x)$ and $N(x,y) = 1$ and our test for exactness yields $$\frac{\partial M}{\partial y} = -\frac{x}{y} \neq 0 = \frac{\partial N}{\partial x}$$ showing that the SAME differential equation is NOT exact!

What am I missing here?

Exactness is really a property of differential forms rather than differential equations. Even though $$M(x,y) \, dx + N(x,y) \, dy = 0$$ represents the same differential equation as $$f(x,y) \, M(x,y) \, dx + f(x,y) \, N(x,y) \, dy = 0$$ (if $f(x,y) \neq 0$), it is not true that if one of the differential forms $$M \, dx + N \, dy$$ and $$(fM) \, dx + (fN) \, dy$$ is exact, then the other one must be exact too. (This is demonstrated by your example!)
So exactness of a differential equation actually depends on how the equation is written, and this is the whole point of the method of integrating factors: given a non-exact form $M \, dx + N \, dy$, can we find a suitable integrating factor $f$ which will make the form $(fM) \, dx + (fN) \, dy$ exact, so that we can integrate the corresponding differential equation?