Existence of antiderivative of a function in two variables

34 Views Asked by At

Given two real-valued functions $g$ and $h$ in two variables, when does a function $f$ exist such that $$ \nabla f(x,y)=(g(x,y),h(x,y))? $$ This is a discussion I had with my friend, so I am wondering what the conditions are to ensure existence. If $g$ and $h$ are continuous in $x$ and $y$, respectively, one finds by integrating that $f(x,y)=\int g(x,y)\,\mathrm{d}x+C_y$ and $f(x,y)=\int h(x,y)\,\mathrm{d}y+C_x$, where $C_*$ is a constant depending on $*$. Here, I need both antiderivatives to be equal, to ensure the existence of $f$, but I do not know how.