From: Bastian Erdnuess on
Andrew Magyar wrote:

> From vector calculus, in 3-dimensions it is a known fact that a given
> vector field is the gradient field of scalar function from R^3 -> R if
> the curl of that vector field is equal to 0.
>
> Correct me if I am wrong, but this condition really boils down to the
> fact that the order in which second order partial derivatives is taken
> is irrelevant (ie d^2f/dxdy = d^2f/dydx).

No. That fact explains why the curl of a gradient field is zero. But
it doesn't tell why it is sufficient to check that the curl of a vector
field is zero to be sure that it is a gradient field.

> In general d-dimensions, given a vector field the question of
> interests for me is whether this given vector field corresponds to the
> gradient field of a scalar function from R^d -> R.
>
> Is the condition for which this is true similar to that in R^3, namely
> that the order in which you take second order partial derivative be
> irrelevant?

Indeed, it is sufficient to check from a vector field f whether
d/dx_i f_j = d/dx_j f_i or not to know whether it is a gradient field or
not. That condition is obviously true for gradient fields, but it is
not so obvious that this condition is a sufficient condition for a
vector field to be a gradient field.

Cheers,
Bastian