# Separable equations vs exact equations [confusion]

In separable differential equations of the form:

$$M(x,y) dx + N(x,y) dy =0$$

We can separate variables and then integrate both sides to get the solution $$y = f(x)$$ to the differential equation.

In such an equation, when integrating, we cannot consider $$y$$ constant because what we're looking for is a solution curve in which $$y$$ is dependent on $$x$$ which has slope $$\frac {dy}{dx}$$.

On the other hand, if we have an exact ( lets just assume all the conditions are met for it to be exact) equation of the same form,

$$M(x,y) dx + N(x,y) dy =0$$

What we do is try to find a function $$\psi(x,y) = c$$ that satisfies the exact differential equation, but the difference here ( and that's where I'm confused ) is that when we integrate for example,

$$M(x,y) = \left(\frac{\partial \psi}{\partial x}\right)$$

When we integrate that last expression, we hold $$y$$ constant! Why are we doing that? Is it because we're solving for an implicit function in $$x$$ and $$y$$ [ $$\psi = c]$$? But if we're solving for an implicit function then what's the meaning of $$\frac{dy}{dx}$$ then? I hope my question was clear, thanks.

We hold $$y$$ constant because we are solving for differential equation $$M(x,y)=\psi_x(x,y) = \frac{\partial\psi}{\partial x}$$ where $$\psi_x$$ is the partial derivative of $$\psi$$ in respect to $$x$$. If integrating in respect one variable (in this case, $$x$$), we treat all other variables as constants, a lesson learned in multivariable calculus.
I also want to stress that the form $$M(x,y)dx + N(x,y)dy = 0$$ does not give the best picture of what is going on. Another way to think about exact equations is in the form $$\psi_x(x,y) + \psi_y(x,y)\frac{dy}{dx} = 0$$ We can work backwards from the form $$\psi(x,y) = 0$$ to get to here. We begin by treating $$y$$ as some function of $$x$$, which we will call $$y(x)$$. Then using the chain rule from multivariable calculus we can derive the following: \begin{align*} \frac{d}{dx}\psi(x,y(x)) &= \frac{d}{dx}C \\ \psi_x(x,y)+\frac{d\psi}{dy}\frac{dy}{dx} &= 0 \\ \psi_x(x,y) + \psi_y(x,y)\frac{dy}{dx} &= 0 \end{align*}