How to prove if a vector field is conservative