For a given ODE, such as $$M(x,y) dx + N(x,y) dy = 0$$
if $\frac{\partial M}{\partial y} \not = \frac{\partial N}{\partial x}$, how can we determine whether the given ODE is exact or not ? Moreover, how can we find $F(x,y)$ ?
To be clear, (I guess) we can always integrate $M$ wrt $x$, and then take the derivative of the resulting function wrt $y$, and look for a possible $g(y)$, where $g(y)$ is the intagration "constant" coming from the integration of $M$ wrt $x$, but my question is that is there any other methods ? Moreover, to check whether there exists a $g(y)$ satisfying the above conditions leads an integration, which might not be possible or easy all the time, so in such cases, what can we do ?
Edit:
I'm not talking about non-exact ODEs, I'm basically asking what to do when either $M$ or $N$ is not belong to $C^1$, as I have explain in the comments of the answer of @dezdichado.
In general, there is no guaranteed method to solve an inexact differential equation. You need to understand that if the exactness condition is not met, then the finding $F(x,y)$ by using antiderivatives of $M$ and $N$ may not be possible - because if it were, then the equation is exact in the first place.
A way to remedy the inexactness is to introduce an integrating factor $\mu(x,y)$: Write the equation in the form $$(\mu M)dx+(\mu N) dy = 0\quad (\dagger)$$ and then find $\mu$ such that above equation is exact. Existence of such $\mu$ is not always guaranteed; even if it is, you would end up having to solve a PDE for $\mu.$
In short, when the equation is not exact there is a little hope that it would be solved easily and explicitly.