The vector field $F(x, y) = \left(\displaystyle\frac{x}{r^3}, \frac{y}{r^3}\right)$ appears in electrostatics, where $r = \sqrt{x^2 + y^2}$ is the distance to the charge. Find a function $f(x, y)$ such that $F = ∇f$.
I took the integral of the first term with respect to $x$ and got $-(x^2 + y^2)^{-1/2} + c(y)$. Then I got $c'(y)$ as $0$. So is the answer$-(x^2 + y^2)^{-1/2}$?
If $c'(y) = 0$ then $c(y)$ is a constant that does not depend on $x$ or $y$. Therefore $$f(x,y) = -(x^2+y^2)^{-1/2} +k$$ where $k \in \Bbb R$.