$F= \langle ye^{xy}+x^2,xe^{xy}+2y \rangle$. Find the potential function of $F$.
My Try:
$\varphi_x=f(x,y)=ye^{xy}+x^2 $ and $\varphi_y=g(x,y)=xe^{xy}+2y$
Now integrated the first equation with respect to $x$
$$\int\varphi_xdx=\int ye^{xy}+x^2dx=\frac{x^3}{3}+e^{xy}+c(y)$$
To find $c(y)$, I differentiated with respect to $y$ $$\varphi_y=xe^{xy}+c^1(y)=xe^{xy}+2y$$ So, from above $c^1(y)=2y$
$$\int2ydy=y^2+k$$ where k is constant and let $k=0$
So, finally I got the potential function as $\frac{x^3}{3}+e^{xy}+y^2$
Is my above attempt correct?
Yes, it is correct, except that you do not need to force $k=0$, the solution is just
$$ \phi(x, y) = \frac{x^3}{3} + e^{xy} + y^2 + \color{blue}{k} $$