Why are line integrals not always path independent?

Consider the vector field $\mathbf{F}=(y,-x)$. Is it the gradient field of some potential function? Note that if $C$ is a circle centered at the origin of radius $R>0$ counterclockwise oriented, then $$\int_{C}{\mathbf{F}\cdot\textrm{ d}\mathbf{r}}=\int_0^{2\pi} R^2(\sin^2(t)+\cos^2(t))\,dt=2\pi R^2\not=0.$$ So $\mathbf{F}$ is not a conservative field.


If you stop and think about what these integrals mean, this is obviously false (no need to come up with some clever explicit example!). For instance, consider two paths $C_1$ and $C_2$ with the same endpoints but which stay away from each other outside the endpoints (say, $C_1$ might be the top half of a circle and $C_2$ the bottom half). Suppose we have a vector field $\mathbf{F}$ for which it happens to be true that $$\int_{C_1}{\mathbf{F}\cdot\textrm{ d}\mathbf{r}}=\int_{C_2}{\mathbf{F}\cdot\textrm{ d}\mathbf{r}}.$$ Now take $\mathbf{F}$ and modify it on a small open ball in the middle of $C_1$ but leave it alone everywhere else (if you want $\mathbf{F}$ to remain smooth you can do this with a bump function). This will change the integral on the left (unless by some big coincidence the modification you made ended up cancelling out in the integral) but won't change the integral on the right, so the modified version of $\mathbf{F}$ will have different integrals along $C_1$ and $C_2$.