linalg(deprecated)/potential - Help

linalg(deprecated)

 potential
 compute the potential of a vector field

 Calling Sequence potential(f, var, 'V')

Parameters

 f - vector field var - list of variables 'V' - name in which the potential is returned

Description

 • 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.

Examples

Important: The linalg package has been deprecated. Use the superseding command VectorCalculus[VectorPotential], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $f≔\left[2xy+{y}^{3},{x}^{2}+3x{y}^{2}\right]$
 ${f}{≔}\left[{{y}}^{{3}}{+}{2}{}{x}{}{y}{,}{3}{}{x}{}{{y}}^{{2}}{+}{{x}}^{{2}}\right]$ (1)
 > $\mathrm{potential}\left(f,\left[x,y\right],'F'\right)$
 ${\mathrm{true}}$ (2)
 > $F$
 ${{y}}^{{3}}{}{x}{+}{{x}}^{{2}}{}{y}$ (3)
 > $g≔\left[2x,2y,2z\right]$
 ${g}{≔}\left[{2}{}{x}{,}{2}{}{y}{,}{2}{}{z}\right]$ (4)
 > $\mathrm{potential}\left(g,\left[x,y,z\right],'G'\right)$
 ${\mathrm{true}}$ (5)
 > $G$
 ${{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}$ (6)