Finding the Gradient from these functions. Find all functions $f(x,y)$ with gradient F = $(2xy + x, x^2 + y) $
So what I did first was try to find the following equations that match the problem
$\frac{df}{dx}$ = $ (2y +1, 2x+y)$
$\frac{df}{dy}$ = $(2x+x,x^2+1)$
I did it this way because x and y are constants. From here I get lost to where to go after I take the derivatives any advice on how to proceed would be good.
 A: This problem is equivalent to finding functions $f(x,y)$ such that the differential form $\omega=(2xy+x)\mathrm dx+(x^2+y)\mathrm dy=\operatorname df$. First, we check to see if this is possible:$$
\frac \partial{\partial y}(2xy+x)=2x=\frac \partial{\partial x}(x^2+y)
$$
Thus, $\omega$ is closed and defined everywhere, so it is the differential of some function.
We can find such a function by integrating $\omega$ along the line segment from $(0,0)$ to $(x,y)$ and declaring that $f(0,0)=0$. Parametrizing this line segment as $\bar x=xt, \bar y=yt$ gives$$\begin{align}
f(x,y) &= \int_0^1[(2xyt^2+xt)x+(x^2t^2+yt)y]dt \\
&=\int_0^1[3x^2yt^2+(x^2+y^2)t]dt \\
&=x^2y+\frac12x^2+\frac12y^2.
\end{align}$$
Choosing a different point $P_a$ with $f(P_a)=0$ for the starting point of the line segment amounts to changing the constant of integration, so we have $$f(x,y)=x^2y+\frac12x^2+\frac12y^2+C.$$
A: Hint: You are doing it backwards.
You want to find any possible solutions $F$ to an equation system which goes like this $$\begin{align}\frac{\partial F}{\partial x} =& 2xy+x \\ \frac{\partial F}{\partial y}=& x^2+1\end{align}$$
A: Here is what you should do. We have the vector equation
$$\nabla f(x,y) = {\bf{F}}(x,y)$$
We want to find the scalar field $f(x,y)$ for the given vector field ${\bf{F}}(x,y)$. In your question 
$${\bf{F}}(x,y) = \left( {2xy + x} \right){\bf{i}} + \left( {{x^2} + y} \right){\bf{j}}$$
From these two equations it follows that
$$\left\{ \matrix{
  {{\partial f} \over {\partial x}} = 2xy + x \hfill \cr 
  {{\partial f} \over {\partial y}} = {x^2} + y \hfill \cr}  \right.$$
Integrating the first one with respect to $x$ gives
$$f(x,y) = {x^2}y + {1 \over 2}{x^2} + g(y)$$
Putting this into the second one we have
$${{\partial f} \over {\partial y}} = {x^2} + g'(y) = {x^2} + y$$
and consequently
$$g'(y) = y$$
and hence
$$g(y) = {1 \over 2}{y^2} + C$$
Finally we get
$$f(x,y) = {x^2}y + {1 \over 2}{x^2} + {1 \over 2}{y^2} + C$$
