Section 16.3: Fundamental Theorem of Line Integrals
MAT329, Fall, 2015
Andy Long

#35, p. 1107: so what’s the function whose gradient works (mostly -- but not at the origin)?

Clear[f,fx,fy,x,y]
VectorDensityPlot[{-y/(x^2+y^2),x/(x^2+y^2)},{x,-1,1},{y,-1,1}]

f[x_,y_]:=ArcTan[y/x]
Simplify[D[f[x,y],x]]
Simplify[D[f[x,y],y]]

fx[x_,y_]=Simplify[D[f[x,y],x]]
fy[x_,y_]=Simplify[D[f[x,y],y]]
VectorDensityPlot[{fx[x,y],fy[x,y]},{x,-1,1},{y,-1,1}]