# Why can't all vector functions not be gradient of a scalar function?

If we define $W=\int \vec{F}.\vec{dr}$, we obtain $\vec{F}=\vec{\triangledown}W$.

Now for any $\vec{F}$ we can define such an $W$; and therefore any $\vec{F}$ can be written as the gradient of a scalar function (W).

This is obviously not the case as there are indeed many vector functions which can't be written as the gradient of a scalar function. Therefore I am wrong somewhere. Can anybody point out where?

Edit: I understood the point. However my following calculation has something wrong. Please point it out.

By definition of work:

$$W=\int \vec{F}.\vec{dr}$$ for any $\vec{F}$ $$=\int F_x dx+\int F_y dy$$ (for any path C, the dot product can be splitted into its components)

Differentiating both sides wrt x: $$F_x=\dfrac{dW}{dx}$$ and differentiating both sides wrt y: $$F_y=\dfrac{dW}{dy}$$ and therefore for any $\vec{F}$ $$\vec{F}=\vec{\triangledown}W$$

• For a general vector field $\vec{F}$, $\int_C\vec{F}\cdot d\vec{r}$ depends on the choice of $C$. So what do you mean by $M = \int\vec{F}\cdot d\vec{r}$? – Jason DeVito May 11 '17 at 15:56

The notation $M = \int \vec F\cdot d\vec r$ elides an important detail: the path along which $F$ is to be integrated. The usual construction is to integrate along a path that starts at a fixed point $p$ and ends at a variable point $x$. But there are two trouble spots with this construction.

The first is not so bad. How do we know that there is a path from $p$ to each point $x$? So we have to add the assumption that the domain of $\vec F$ is connected, or technically path-connected. If the domain is connected, we at least have an $M(x)$ for each $x$.

The second is trickier. $M$ needs to be a function, and it should depend only on $x$, not on the specific path one takes from $p$ to $x$. Otherwise you and I could accidentally pick different paths and get different results, and we wouldn't know which one to call $M(x)$. So $\vec F$ needs the property that line integrals are independent of path. This is equivalent to the property that line integrals around closed loops are zero.

If line integrals around closed loops are zero, it follows from Stokes's theorem that $\nabla \times \vec F = \vec 0$. And the implication almost goes in the other way, too, except for the possibility that the path wraps around a “hole” in the domain. Try $$\vec F(x,y,z) = \left<- \frac{y}{x^2+y^2}, \frac{x}{x^2+y^2},0\right>$$ Then $\nabla \times \vec F = \vec 0$. However, the domain of $\vec F$ excludes the $z$-axis, where $x=y=0$. And in fact, if we integrate $\vec F$ around the unit circle in the $xy$-plane, we get $2\pi$, not $0$. So this $\vec F$ is not conservative, despite it having a curl of zero.

So we rule out that possibility and require that the domain of $\vec F$ be not just connected but simply connected: that any closed loop in the domain is contractible to a point. Picture a slipknot closing up. If the domain has no holes, a loop in the domain can contract to a point, but if there is a hole, a loop around that hole can't move “past” it.

So if $\vec F$ has a curl of zero, and the domain of $\vec F$ is connected and simply connected, your construction does result in a potential function and proves that $\vec F$ is conservative.

It's worth noting that the sufficient conditions are not just differential ($\nabla \times \vec F = \vec 0$), but topological (domain is connected and simply connected). To follow this point, if we have a domain and we want to know more about its shape, we might try to construct vector fields with zero curl but which aren't conservative. If we could find one, we would know the domain is not simply connected. This kind of study is called algebraic topology.

• A nice detailed answer sir, thanks a lot. – onurcanbektas Feb 24 '18 at 10:23

if $F = \nabla M$, then $F$ is "conservative"

$F(x,y) = -y,x$ is not conservative. Try to find an $M$ such that $\nabla M = F$

if $F$ is conservative then it has some special properties such as $\nabla \times F = \mathbf 0$ and $\oint F\cdot dr = 0$ for all close contours.

Suppose we wish to define a scalar "potential" $\phi(\mathbf r)$ for our vector field $\mathbf F(\mathbf r)$ by setting: $$\phi(\mathbf r) = \int_{\mathbf r_0}^{\mathbf r} \mathbf F. d\mathbf r,$$ where $\mathbf r_0$ is a fixed "reference point". So to get $\phi(\mathbf r)$, we want to integrate $\mathbf F$ along a path from $\mathbf r_0$ to $\mathbf r$.

There is a major problem: How do we know that the answer we get will be independent of our choice of path from $\mathbf r_0$ to $\mathbf r_0$?

In general, the answer will not be independent of the choice of path, and the expression we wrote down for $\phi(\mathbf r)$ is not well-defined.

However, all is not lost! If $\mathbf F(\mathbf r)$ satisfies an additional condition, then everything works. The additional condition is that $$\nabla \times \mathbf F = \mathbf 0.$$ If $\nabla \times \mathbf F = \mathbf 0$ at every point in the domain, then $\int_{\mathbf r_0}^{\mathbf r} \mathbf F. d\mathbf r$ is independent of the choice of path. To see this, suppose that $C_1$ and $C_2$ are two paths from $\mathbf r_0$ to $\mathbf r$, and suppose that $A$ is the region bounded by $C_1$ and $C_2$. Then by Stoke's theorem, we have $$\int_{C_2} \mathbf F . d \mathbf r - \int_{C_1} \mathbf F . d \mathbf r = \int_A (\nabla \times \mathbf F ). d \mathbf r = 0.$$

[Warning: This statement only works on spaces with "no holes", i.e. on simply connected spaces. You can't apply this argument on an annulus, for example.]

Once we have defined $\phi(\mathbf r)$ in this way, it is possible to check that $\mathbf F =\nabla \phi$ using an argument similar to the proof of the fundamental theorem of calculus.

Conversely, if $\mathbf F$ is a vector field for which there exists a scalar potential $\phi$ such that $\mathbf F =\nabla \phi$, one finds that $$\nabla \times \mathbf F = \nabla \times (\nabla \phi) = \mathbf 0,$$ since the curl of a gradient is always zero. So the condition $\nabla \times \mathbf F = \mathbf 0$ is both a necessary and a sufficient condition for the existence of a potential $\phi$.

Since you tagged this as "physics", I think it is worth mentioning that gravitational fields and electric fields (in stationary systems) both obey the property $\nabla \times \mathbf F = \mathbf 0$, which is why you can define potentials for them.

The integral $\int F\cdot dr$ need not exist. Consider any complex integral whose arc is not rectifiable. This would correspond to a counterexample in $\mathbb{R}^2$.

• I don't think this really has to do with the subject the OP actually wants to talk about, though I will concede that the OP is not written in a particularly clear manner. – Ian May 11 '17 at 16:27
• @Ian it was a short answer I could type out here at work. There will always be users who find the time to write erudite treatises (see below) but I wanted to make sure the question didn't fall through the cracks. – Mortified Through Math May 11 '17 at 16:35
• I understand that, but I don't think the OP had paths of unusual topology in mind. I think the OP just didn't understand the notion of independence of path. – Ian May 11 '17 at 16:41