## `detools::hasPotential` -- check for gradient vector field

#### Introduction

`detools::hasPotential``(vf,x)` checks whether the vector field `vf` in the coordinates `x` is the gradient of some potential.

#### Call(s)

`detools::hasPotential(vf, x)`

#### Parameters

`vf` | - | the vector field: a list of expressions; its length must be the same as that of the list `x`.
`x` | - | the coordinates: a list of (indexed) identifiers.

#### Returns

a list of expressions; each component represents an integrability condition which must be satisfied for the vector field `vf` to possess a potential. If the list is empty, `vf` is unconditionally a gradient.

#### Related Functions

`detools::hasHamiltonian`

#### Details

- A vector field v is a gradient field, if there exists a function V(x) depending on a vector x such that the components of v are given by diff(V,x). `detools::hasPotential` computes necessary and sufficient conditions for the existence of such a potential V; it does not try to determine V.

#### Example 1

With the following input one can determine the condition on the components of a two-dimensional vector field so that the field is a gradient.

    >> detools::hasPotential([F(x, y), G(x, y)], [x, y])

                       [diff(F(x, y), y) - diff(G(x, y), x)]

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000