Checking if a vector field is conservative I have three different vector fields and I want to check if they are conservative:
$$1)\space \space\vec{f}(\vec{x}):=\frac{1}{||\vec{x}||}\vec{a}, \space \space D=\mathbb R^2 / (\vec{0}), \space \space \vec{a}=(a_1,a_2)$$
$$2) \space \space \vec{g}(x,y)=(\frac{x}{y^2-x^2},\frac{-y}{y^2-x^2}), \space \space D=[(x,y) \in \mathbb R^2|\space y>|x|]$$
$$3) \space \space \vec{h}(x,y,z):=(2xz+y \cos (xy),\space x \cos(xy), \space x^2), D=[(x,y,z)\in \mathbb R^3 | \space x^2+y^2+z^2 \le 1]$$
I just learned/looked up the following on khanacademy:


*

*A vector field $\space \vec{f} \space $ is conservative $\iff$ $\underbrace{\int_{\gamma_2}\vec{v}(x) d\vec{x}=\int_{\gamma_1}\vec{v}(x) d\vec{x}}_{\text{Path independent}} \iff \underbrace{\oint_{\gamma}\vec{v}(x) d\vec{x}=0}_{\text{conservation of energy}}$

*If my vector field $\vec{v}$ is the gradient of some scalar field $V$ i.e $\vec{v}=\vec{\nabla}V \implies \vec{v}$ is conservative.
I understand what all of these things mean and how they were derived but I am somehow unable to properly apply them. Can someone maybe show me in a simple example how you would show that a vector field is conservative (doesn't have to be one of the fields I mentioned).  
Thanks in advance
 A: To check your question 2 and 3, you can use the theorem:
If $f=P i +Q j$ is a vector field over a simply connected and open set $D$, it is a conservative field if the first partial derivatives of $P,Q$ are continuous in $D$ and $\frac{\partial P}{\partial y}=\frac{\partial Q}{\partial x}$.
This is 2D case. For 3D case, you should check $\nabla \times f=0$.
For your question 1, the set is not simply connected. But since $\nabla \times f \ne 0$, it can be easily checked that it is not conservative. 
If $\nabla \times f =0$, you can also try to find a closed curve and see if the integral is not zero. That can also tell you that it is not conservative. If all these fail, the only way to check is to try to find whether there exists an $F$ such that $f=\nabla F$. 
But your answer is not correct. There shouldn't be an $F$.
Assume $f=\nabla F$, so $\frac{\partial F}{\partial x}=\frac{a_1}{x^2+y^2}, \frac{\partial F}{\partial y}=\frac{a_2}{x^2+y^2}$. To find $F$, we integrate $\frac{\partial F}{\partial x}$ with respect to $x$:
$$F(x,y)=\int \frac{a_1}{x^2+y^2} dx$$
You can get
$$F=\frac{a_1}{y}\arctan{\frac{x}{y}}+f_1(y)$$
where $f_1(y)$ is a function of $y$ since your integral is with respect to $x$. Now taking derivative with respect to $y$ and equate it with $\frac{\partial F}{\partial y}$:
$$\frac{\partial F}{\partial y}=a_1\frac{-\frac{xy}{x^2+y^2}-\arctan{x/y}}{y^2}+f_1'(y)$$
This cannot be equal to the original $\frac{\partial F}{\partial y}$. So there is no $F$ such that $f=\nabla F$.
A: EDIT: Answers for 2 and 3.
2. $\vec{g}(x,y)=(\frac{x}{y^2-x^2},\frac{-y}{y^2-x^2})$
If I have a vector field $\space f=P \hat{i}+Q \hat{j} \space$ then the field is conservative if $\frac{\partial P}{dy}=\frac{\partial Q}{dx}$
$$\frac{\partial P}{dy}=\frac{-2xy}{(y^2-x^2)^2}$$
$$\frac{\partial Q}{dx}=\frac{-2xy}{(y^2-x^2)^2}$$
$\implies$ the vector field is conservative
3. $\vec{h}(x,y,z)=(2xz,y \cos(xy),x \cos(xy),x^2)$
The vector field is conservative if: $\space \nabla \times \vec{h}=0$
$$\nabla \times \vec{h}=\begin{vmatrix}\hat{i}& \hat{j} & \hat{k}\\\frac{\partial}{\partial x}&\frac{\partial}{\partial y}& \frac{\partial}{\partial z}\\ P&Q&R\end{vmatrix}=\hat{i}(0-0)-\hat{j}(2x-2x)+\hat{k}(\cos(xy)-xy\sin(xy)-\cos(xy)+xy \sin(xy))=0$$
$\implies$ vector field is conservative
A: If $\nabla \times \vec F=0$, then $\vec F=$ conservative if the domain is simply connected.  
The domain of the first example is not simply connected and thus if the curl of the vector is zero, one cannot conclude from that alone that the vector is conservative.
The domains of the latter 2 examples are simply connected.  Thus, if the curl is zero, then the vector is conservative.
