linalg(deprecated)
potential
compute the potential of a vector field
Calling Sequence
Parameters
Description
Examples
potential(f, var, 'V')
f
-
vector field
var
list of variables
'V'
name in which the potential is returned
Important: The linalg package has been deprecated. Use the superseding command VectorCalculus[VectorPotential], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The function potential determines whether a given vector function is derivable from a scalar potential, and determines that potential if it exists.
The function returns true if the function f has a scalar potential, and false if it does not.
If a scalar potential for f exists, it will be assigned to the name given in the third argument V. If potential returns true, then V will be assigned a scalar function such that grad V = f.
The command with(linalg,potential) allows the use of the abbreviated form of this command.
with⁡linalg:
f≔2⁢x⁢y+y3,x2+3⁢x⁢y2
f≔y3+2⁢x⁢y,3⁢x⁢y2+x2
potential⁡f,x,y,F
true
F
y⁢x⁢y2+x2
g≔2⁢x,2⁢y,2⁢z
potential⁡g,x,y,z,G
G
x2+y2+z2
See Also
linalg(deprecated)[grad]
linalg(deprecated)[vecpotent]
LinearAlgebra
VectorCalculus[ScalarPotential]
Download Help Document