Why is a force that depends only on position a conservative force? In this website, it was written that

If a force acting on an object is a function of position only, it is said to be a conservative force.

Why is this so? According to wikipedia, a force is  conservative if it meets any of the following conditions:

*

*$\nabla \times \vec{F}=0$

*$\vec{F} = -\nabla V(\vec{r})$

*$W = \oint \vec{F} \cdot d\vec{s} = 0$
How can one derive that a force that only depends on position is conservative from these three conditions?
 A: That statement simply isn't true.  It's easy to construct an example of a non-conservative force which depends only on position, e.g.
$$\mathbf F(x,y) = \pmatrix{-y\\x}$$
In one dimension, any force which depends only on position is automatically conservative, but for higher dimensions this is not true.  One can see why by trying to construct a potential energy function explicitly.

Consider a 2D system subject to a force $$\mathbf F = \pmatrix{-x\\-y}$$
We're looking for some $U(x,y)$ such that $\mathbf F = -\nabla U$, i.e.
$$\pmatrix{-x\\-y} = \pmatrix{-\frac{\partial U}{\partial x} \\ -\frac{\partial U}{\partial y}}$$
From the first component, we have that $\frac{\partial U}{\partial x} = x$; taking the antiderivative, it follows that $U(x,y) = \frac{1}{2}x^2 + C(y)$ where $C$ is an arbitrary function which may depend on $y$ but not $x$.
From the next component, we have that $$\frac{\partial U}{\partial y} = C'(y) = y$$
which implies that $C(y) = \frac{1}{2}y^2 + C_0$ where $C_0$ is a constant.  Therefore, any potential energy function $U(x,y)= \frac{1}{2}x^2 + \frac{1}{2}y^2 + C$ produces the given force, and we can say that $\mathbf F$ is conservative. 

The reason that this doesn't always work is that, while we can always find an antiderivative for the first component, we may run into inconsistencies in the others.  The non-conservative force I wrote first is an example; if we try to apply the same procedure to that one, the first component will give us that $U(x,y) = xy + C(y)$, but the second will give us that $x + C'(y) = -x \implies C'(y)=-2x$.  But since $C(y)$ cannot depend on $x$, this is inconsistent.  There is no $U(x,y)$ such that $-\nabla U = \pmatrix{-y \\ x}$, and so the force is not conservative.
A: I'm sure that is because in that website they are only considering one dimensional forces, so that if $\vec{F}=F(x)\hat{x}$ then $\nabla\times\vec{F}=0$. In general that is not true, for example the magnetic field created by stationary currents only depends on position, but it is not conservative!
