linalg::vectorPotential
-- vector potential of a three-dimensional vector fieldlinalg::vectorPotential
(j, x)
returns the
vector potential of the vector field j(x) with respect to
x. This is a vector field v with curl(v,x) =
f.
linalg::vectorPotential(j, [x1, x2, x3] <, Test>)
j |
- | a list of three arithmetical expressions, or a
3-dimensional vector (i.e., a 3 x 1 or 1 x 3
matrix of a domain of category Cat::Matrix ) |
x1,x2,x3 |
- | (indexed) identifiers |
Test |
- | linalg::vectorPotential only checks
whether the vector field j has a vector potential and
returns TRUE or FALSE , respectively. |
a vector with three components, i.e., an 3 x 1 or 1
x 3 matrix of a domain of category Cat::Matrix
, or a boolean value.
linalg::curl
, linalg::divergence
, linalg::grad
j
exists if
and only if the divergence of j
is zero. It is uniquely
determined.j
does not exist, then
linalg::vectorPotential
returns FALSE
.j
is a vector then the component ring of
j
must be a field (i.e., a domain of category Cat::Field
) for which definite
integration can be performed.j
is given as a list of three arithmetical
expressions, then linalg::vectorPotential
returns a vector
of the domain Dom::Matrix()
.We check if the vector function j(x,y,z)=[x^2*y,-1/2*y^2*x,-x*y*z] has a vector potential:
>> delete x, y, z: linalg::vectorPotential( [x^2*y, -1/2*y^2*x, -x*y*z], [x, y, z], Test )
TRUE
The answer is yes, so let us compute the vector potential of j:
>> linalg::vectorPotential( [x^2*y, -1/2*y^2*x, -x*y*z], [x, y, z] )
+- -+ | 2 | | x y z | | - ------ | | 2 | | | | 2 | | - x y z | | | | 0 | +- -+
We check the result:
>> linalg::curl(%, [x, y, z])
+- -+ | 2 | | x y | | | | 2 | | x y | | - ---- | | 2 | | | | -x y z | +- -+
The vector function j=[x^2,2*y,z] does not have a vector potential:
>> linalg::vectorPotential([x^2, 2*y, z], [x, y, z])
FALSE