Condition for a force to be conservative I get that a force dependent on path is non-conservative or a force which does non-zero work in completing a cycle. But how do you prove that mathematically. 

Let's assume I have a force F= 2yi + x^2j. Now how do I conclude that it's work done is path dependent?

My attempt
Work done=F.dr
(2yi + x^2j).(dxi + dyj)=
2y.dx + x^2dy
Now what do I integrate it to?
Let's assume they take 2 paths to reach (10,10) 1.(0,10) to (10,10) 2. (10,0) to (10,10). Now if i get different work done, they are non-conservative.
But again, how do I integrate it?
Is there a way to tell it's non-conservative without all this?
 A: You need to use Stoke's theorem.
$$\oint_{C} \mathbf{F} \cdot d\mathbf{r} = \int_S (\nabla \times \mathbf{F}) \cdot \mathbf{\hat{n}} dS$$
Where $\nabla \times \mathbf{F}$ is equal to
$$ ({\partial F_z \over \partial y} - {\partial F_y \over \partial z}) \mathbf{\hat{x}} +
({\partial F_x \over \partial z} - {\partial F_z \over \partial x}) \mathbf{\hat{y}}
+ ({\partial F_y \over \partial x} - {\partial F_x \over \partial y}) \mathbf{\hat{z}}$$
For the line integral of the force to vanish on every closed path, its curl ($\nabla \times \mathbf{F}$) must be zero everywhere, too.
Calculate the curl for the force given. If it is zero everywhere, your force is a conservative one.
A: If the force is generated by a potential, $F=-\nabla\Phi$, then its curl has to vanish, since $\nabla\times(\nabla\Phi)=0$. You can check the curl of your force field. Remember that the curl of a vector field at a point, according to its definition, is proportional to the line integral of the field along an infinitesimal loop around such point.
