Consider the first order ODE of the form $$ A(x,y)dx +B(x,y)dy = 0 \ . $$
It is considered exact if there exists a so-called potential function $f$, with $A := \frac{\partial f}{\partial x}$ and $B := \frac{\partial f}{\partial y}$.
I want to proof
$f$ exists if $\frac{\partial A }{\partial y} = \frac{\partial B }{\partial x}$.
I also want to see if the converse is true or not.
I guess that we should able to show that $f$ can be uniquely constructed (up to a constant factor) by noticing something about its differential? $$ f = \int df = \int A dx + \int B dy \ . $$
We have $\partial_x B= \partial_y A $, if we require the second partial derivates of $f$ to be continuous.
But, if we start out by using $0 = df = Adx+Bdy$, we already assume the existence of $f$; so this doesn't seem the right approach.
I'm looking for a hint.