How to find a $f$ such that $F=grad \ f$?

2.5k Views Asked by At

I need help with this problem:

For the conservative field $F$ find a function $f$ such that $F=$ grad$f$. $$F(x,y,z)=\left(\frac{x}{r},\frac{y}{r},\frac{z}{r}\right)$$, where $r=\sqrt{x^2+y^2+x^2}$.

I tried to find $f$ by integrating the partial derivatives, but since $1/r$ is multiplying the whole vector, I just took it out, I'm not sure if I can do that. Like this: $$\frac{\partial f}{\partial x}(x,y,z)=x$$ $$\frac{\partial f}{\partial y}(x,y,z)=y$$ $$\frac{\partial f}{\partial z}(x,y,z)=z$$ thus $$f(x,y,z)=\frac{x^2}{2}+g(y,z)$$ $$f(x,y,z)=\frac{y^2}{2}+h(x,z)$$ $$f(x,y,z)=\frac{z^2}{2}+k(x,y)$$ for some functions $g$, $h$, and $k$, so if $g=\frac{y^2}{2}+\frac{z^2}{2}$, $h=\frac{x^2}{2}+\frac{z^2}{2}$ and $k=\frac{x^2}{2}+\frac{y^2}{2}$, the function $f$ is: $$f(x,y,z)=\frac{1}{r}(\frac{x^2}{2}+\frac{y^2}{2}+\frac{z^2}{2})=\frac{1}{2r}\cdot r^2=\frac {r}{2}$$

Am I correct? If not, how can I solve this correctly, should I integrate $x/r$, $y/r$ and $z/r$ instead?

1

There are 1 best solutions below

3
On BEST ANSWER

You can easily check that $$ F(x,y,z) = \frac{1}{\sqrt{x^2+y^2+z^2}}(x,y,z)$$ is conservative. In order to find a potential $f(x,y,z)$, I would typically "guess" the result.

However, one can of course also "derive" it by integration. We choose the value $f(0,0,0)= f_0$ as the integration constant. For obtaining the value $f(x,y,z)$, we choose the curve $$ \gamma\colon t\in[0,1]\mapsto (x t,y t,z t)= (x,y,z) t\in \mathbb{R}^3\,.$$ We evaluate the line integral $$ f(x,y,z) = \int_\gamma F(x,y,z)\cdot dr +f_0= \int_0^1 \frac{x^2+y^2+z^2}{\sqrt{x^2+y^2+z^2}} dt + f_0 = \sqrt{x^2+y^2+z^2} + f_0$$