potential takes two arguments : a vector field
V in Rn with respect to n real variables
and the vector of these variable names.
potential returns, if it is possible, a function U such that grad(U)=V. When it is possible, we say that V derives the potential U, and U is defined up to a constant.
potential is the reciprocal function of derive.
Note that in ℝ3 a vector V is a gradient if and only if its rotational is zero i.e. if curl(V)=0. In time-independent electro-magnetism, V=E is the electric field and U is the electric potential.