### 13.7.7 Conservative flux field

A vector field F in ℝ3 is a conservative flux field, or a solenoidal field, if there is a vector field G such that curlG=F. Given a conservative flux vector field F, the general solution of curlG=F is the sum of a particular solution and the gradient of an arbitrary functions.

The vpotential command finds a particular vector field G such that curlG=F if F is a conservative flux field, and signals an error otherwise. Specifically, vpotential returns the solution G with zero as the first component.

- vpotential takes two arguments:
  - F, a vector field in ℝ3, given as a list of three expressions depending on three variables.
  - vars, a list of the variable names.
- vpotential(F vars) returns a solution of curlG=F whose first coordinate is zero if F is a conservative vector field, and signals an error otherwise.

vpotential is the reciprocal function of curl.

In ℝ3, a vector field F is a curl if and only if its divergence is zero. In time-independent electro-magnetism, F=B is the magnetic field and G=A is the potential vector.

#### Example

vpotential([2*x*y+3,x^2-4*z,-2*y*z],[x,y,z])

| ⎡ ⎢ ⎢ ⎣ | 0,−2 x y z,− |
x3
3
| +4 x z+3 y | ⎤ ⎥ ⎥ ⎦