Suppose we have a real-valued function $\varphi(x,y)$ such that $$ \frac{\partial \varphi}{\partial x}=f(x,y)\quad\text{and}\quad\frac{\partial\varphi}{\partial y}=g(x,y) $$ for some functions $f$ and $g$. How can we recover the function $\varphi$?
Using the chain rule, we have $$ d\varphi=\frac{\partial\varphi}{\partial x}dx+\frac{\partial\varphi}{\partial y}dy=f(x,y)dx+g(x,y)dy $$ So maybe $\varphi$ can be found by $$\varphi(x,y)=\int f(x,y)dx+g(x,y)dy$$ but I am not sure what this integral means. It seems like a line integral, but over what curve? What is an indefinite line integral?
Example: Let $\varphi :\Bbb R^2\to \Bbb R$ be such that for all $(x,y)\in \Bbb R^2$ the following equalities hold:
$$\frac{\partial \varphi}{\partial x}(x,y)=\underbrace{e^x\sin (y)}_{\displaystyle f(x,y)} \wedge \frac{\partial \varphi}{\partial y}(x,y)=\underbrace{e^x\cos (y)}_{\displaystyle g(x,y)}$$
Integrating $f$ with respect to $x$ we get $\displaystyle \varphi (x,y)=\int e^x\sin (y)dx=e^x\sin (y)+\psi (y)$, for some differentiable function $\psi\colon \Bbb R\to \Bbb R$.
Differentiating with respect to $y$ it follows that $e^x\cos (y)+\psi'(y)=g(x,y)=e^x\cos (y)$.
Therefore $\psi'$ is always $0$ and it follows that there exists $C\in \Bbb R$ such that for all $u \in \Bbb R$ we have $\psi (u)=C$, that is, $\psi$ is constant.
This gives you $\varphi (x,y)=e^x\sin (y)+C\in \Bbb R$, for some $C\in \Bbb R$.
Taking $C\in \Bbb R$ arbitrarily will give you a possible $\varphi$.