[Math] Constructing a potential energy function from a conservative force field

calculusderivativesvector analysisVector Fields

Given:

$F(x,y,z)=(x-y,-x-y+z,y+z)$

Find a potential energy that corresponds to this force field. Check your answer by taking its gradient.

I've already shown that this force field is conservative by

$$\nabla \times F =0$$

Now, I used $\nabla U=-F$ to find the potential function. I did so by

$$U=-\int F \cdot \vec{dr}$$
$$=-\left [\int (x-y)dx + \int(-x-y+z)dy + \int (y+z)dz \right ]$$
$$=\frac{1}{2}(-x^2+y^2-z^2)+2xy-2yz$$

Now I need to check it by taking its gradient, but its not resulting in the original force field.

$$\nabla U=-F$$
$$F=-\nabla U$$
$$=- \left [\frac{\partial U}{\partial x}+\frac{\partial U}{\partial x}+\frac{\partial U}{\partial x} \right ]$$
$$=- \left [ (-x+2y)+(y+2x-2z)+(-z-2y)\right ]$$
$$=(x-2y)+(-2x-y+2z)+(2y+z)$$

What did I miss?

Best Answer

You started out OK by setting up $U=-\int\mathbf F\cdot d\mathbf r$, but then you appear to have confused this line integral with an indefinite integral. Perhaps you made this mistake because of leaving out an important detail: the path along which the line integral is to be taken (the integral’s bounds, as it were). I.e., it’s properly something like $U=-\int_\Gamma\mathbf F\cdot d\mathbf r$, which is like a definite integral from elementary calculus—it produces a number, not a function. This error is akin to saying that if $f={dF\over dx}$, then $F(x)=\int_a^b f(t)\,dt$.

You can in fact use a line integral to find a function $U:\mathbb R^n\to\mathbb R$ such that $\nabla U=-\mathbf F$, but you have to proceed a little differently. Recall from elementary calculus that $F(x)=\int_0^x f(t)\,dt$ is an antiderivative of $f$, that is, that ${dF\over dx}=f$. Note the difference between this integral and the one in the previous paragraph: the upper bound is variable. We can do a similar thing for a conservative vector field: Let $U(0)=0$ and set $U(\mathbf r)=-\int_{\Gamma_{\mathbf r}}\mathbf F\cdot d\mathbf r$, where $\Gamma_{\mathbf r}$ is a differentiable path from the origin to $\mathbf r$. Since $\mathbf F$ is conservative, the value of this integral depends only on its endpoints, not on the specific path taken, so this function is well-defined (as long as the integral exists, of course). A convenient choice for $\Gamma$ is the line segment joining the point $\mathbf r$ to the origin, which we can parameterize in the obvious way as $\gamma: t\mapsto t\,\mathbf r$ for $t\in[0,1]$. We then get $$U(\mathbf r)=-\int_0^1F(\gamma(t))\cdot\gamma'(t)\,dt=-\int_0^1\mathbf F(t\,\mathbf r)\cdot\mathbf r\,dt.\tag{*}$$ Applying this to your example, $$\begin{align} U(x,y,z) &= -\int_0^1\mathbf F(tx,ty,tz)\cdot(x,y,z)\,dt \\ &= -\int_0^1x(tx-ty)+y(-tx-tz+tz)+z(ty+tz)\,dt \\ &=-\int_0^1(x^2-2xy-y^2+2yz+z^2)\,t\,dt \\ &= -\frac12(x^2-2xy-y^2+2yz+z^2).\end{align}$$ You can verify for yourself that $\nabla U=-\mathbf F$. If we take $U(0)$ to be some value other than $0$, this amounts to changing the constant of integration, i.e., (*) becomes $$U(\mathbf r)=U(0)-\int_0^1\mathbf F(t\,\mathbf r)\cdot\mathbf r\,dt.$$

Related Question