Show that the separable differential equation M(x) + N(y)y' = 0 is exact. Show that the separable equation 
$M(x) + N(y)\frac{dy}{dx} = 0$
is exact.
The homework sheet that the teacher gave us said it should be a one-liner. I'm not sure how to prove it that easy (as to put it in one line).
I have done this so far:
$M(x) dx + N(y) dy = 0$
I know that the derivative of M(x) with respect to y should equal the derivative of N(y) with respect to x. ($M_x = N_y$)
But if they don't than it's not exact, right? 
Even if I bring the M(x)dx to the other side it would be 
$N(y) dy = - M(x) dx$
Then I still have the issue that M_x might be different than N_y
Edit with @Evgeny comment in mind
Ok so, then I need to look at it as the derivative of $\frac {d M}{dy} = \frac {dN}{dx}$?
Couldn't they still be different?

$$M(x) + N(y)\frac{dy}{dx} = 0 \tag 1$$ is exact because an integral of $(1)$ is $$\int M(x) \, dx+\int N(y) \, dy = \text{ constant }  $$ and is a solution of $(1).$
