If
[tex]\nabla f=(ye^x+\sin y)\,\vec\imath+(e^x+x\cos y)\,\vec\jmath[/tex]
then
[tex]\dfrac{\partial f}{\partial x}=ye^x+\sin y\implies f(x,y)=ye^x+x\sin y+g(y)[/tex]
Differentiating with respec to [tex]y[/tex] gives
[tex]\dfrac{\partial f}{\partial y}=e^x+x\cos y=e^x+x\cos y+g'(y)[/tex]
[tex]\implies g'(y)=0\implies g(y)=C[/tex]
So [tex]F[/tex] is indeed conservative, and
[tex]f(x,y)=ye^x+x\sin y+C[/tex]