Answer
$f(x,y)=ye^x+x\sin y+C$
Work Step by Step
When the vector field $F(x,y)=Pi+Qj$ is a conservative field, then throughout the domain $D$, we have
$\dfrac{\partial P}{\partial y}=\dfrac{\partial Q}{\partial x}$
$a$ and $b$ are the first-order partial derivatives on the domain $D$.
Here, we have $\dfrac{\partial P}{\partial y}=\dfrac{\partial Q}{\partial x}=e^x +\cos y$
This implies that the vector field $F$ is conservative.
Now, we have $f(x,y)=ye^x+x\sin y+g(y)$ [g(y) : A function of y]
$f_y(x,y)=e^x+x\cos y+g'(y)$
Here, $g(y)=C$; where $C$ is a constant.
Hence, we get $f(x,y)=ye^x+x\sin y+C$