# Showing that a function is the gradient of another function

How do I show that this function;

$f = \frac{\vec{r}-\vec{X}t}{|\vec{r}-\vec{X}t|^3}$

$\vec{X} = (x_1,x_2,x_3)$ and $\vec{r} = (x,y,z)$

is the gradient of another function?

like so: $f = \nabla F$

• Your $f$ cannot be a divergence, because the divergence is a scalar function, whilst yours is a vector one. – Alex M. Jun 7 '15 at 13:24
• The divergence acts on a vector field to give a scalar field. So that function can't be the divergence of any vector field. (It could, however, be the gradient of a scalar field.) – Semiclassical Jun 7 '15 at 13:26
• Oh.. sorry that's right.. it needs to be the gradient... -.- – Nillo Jun 7 '15 at 13:31

Your $f$ is: $$f(\vec r)=\dfrac{x-x_1t}{\left(\sqrt{(x-x_1t)^2+(y-y_1t)^2+(z-z_1t)^2}\right)^3}\vec i+$$ $$+\dfrac{y-y_1t}{\left(\sqrt{(x-x_1t)^2+(y-y_1t)^2+(z-z_1t)^2}\right)^3}\vec j+$$ $$+\dfrac{z-z_1t}{\left(\sqrt{(x-x_1t)^2+(y-y_1t)^2+(z-z_1t)^2}\right)^3}\vec k$$
Use: $$F(\vec r)=\dfrac{-1}{\sqrt{(x-x_1t)^2+(y-y_1t)^2+(z-z_1t)^2}}=\dfrac{-1}{|\vec r-\vec Xt|}$$ and find $\dfrac {\partial F}{\partial x}$,$\dfrac {\partial F}{\partial y}$ and $\dfrac {\partial F}{\partial z}$
• Did you find $F(\vec{r})$ by intergrating all three components with respect to their related component? So the $\vec{i}$ term with respect to $x$ and so on.? – Nillo Jun 7 '15 at 14:12
• That's the classical way to do. But in this case note that that $f$ is similar to a gravitational or electric field and these have a well known potential. – Emilio Novati Jun 7 '15 at 14:26
• Obviously also $F(\vec r)+C$ works: the scalar field (potential) is defined up to a constant. – Emilio Novati Jun 7 '15 at 14:31