Is $ f(x):= \frac{x}{ |x|^n }$ a gradient field?

Let's suppose that there exists some $V(x)$ such that $\frac{d}{dx}V(x)=f(x)$.

Therefore:

$$\int_a^y\frac{d}{dx}V(x)dx =\int_a^yf(x) dx$$

Applying the fundamental theorem of calculus gives:

$$V(y)=\int_a^y \frac{x}{|x|^n} dx$$ Now let's break into cases. Suppose we are only considering $x,a,y > 0$. Then, we are left with a really simple integral, namely: $$V(y)=\int_a^y \frac{x}{x^n} dx = \int_a^y \frac{1}{x^{n-1}} dx.$$

Now, let's assume we are only considering $x, a, y < 0$. This also simplifies very nicely:

$$V(y)=\int_a^y \frac{x}{(-x)^n} dx = (-1)^n\int_a^y \frac{1}{x^{n-1}} dx.$$

So it seems that we have a definition for $V$.

\begin{cases} V(x) = \frac{1}{2-n}x^{2-n} & x < 0 \\ V(x) = \frac{1}{2-n}(-1)^n x^{2-n} & x>0 \end{cases}