This is follow up question of my previous question.
I want to solve the ode $$\frac{dy}{dx} = f(x,y) \tag 1$$ using method of separation of variables. In practice, we often do as follows
\begin{align} dy &= f(x,y)dx \\ \implies \int dy &= \int f(x,y)dx + c \\& \cdots \end{align}
That is, we are basically integrating the $1$-form $dy - f(x,y) dx$ with the condition that the integral vanishes along the solution curve.
So my question
Why is solving an ode $\frac{dy}{dx} = f(x,y)$ equivalent to integrating the $1$-form $dy - f(x,y)dx$?
My approach
By the chain rule or by the property of a differential of the $0$-form $y(x)$
$$dy(x) = y'(x) dx \ \text{ i.e } \ dy = \frac{dy}{dx}dx \tag 2$$
Substituting $(1)$ into $(2)$, we obtain
$$dy=f(x,y)dx \implies dy-f(x,y)dx=0$$
That is, the $1$-form $dy-f(x,y)dx$ vanishes when we have $\frac{dy}{dx}=f(x,y)$. Now integrating the $1$-form $dy-f(x,y)dx$ will give the integral curve.
Is this the proof?
Edit: I think there should be a clarification. Since we can solve the given ode by the method of separation of variables, $f(x,y)$ must be of the form $g(x)h(y)$, for some smooth functions $g,h$. So the question should be to show that the solving the given ode $\frac{dy}{dx} = f(x,y)$ by method of separation of variables is equivalent to integrate the $1$-form $\frac{1}{h(y)}dy-g(x)dx$. So $h(y)$ must be non-zero.