linalg(deprecated)/vecpotent - Help

Home : Support : Online Help : linalg(deprecated)/vecpotent

linalg(deprecated)

 vecpotent
 compute the vector potential

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

Parameters

 f - vector function of length three var - list of three variables V - name in which the vector 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 vecpotent determines whether a given vector function has a vector potential, and determines that vector potential if it exists.
 • The function returns true if the function f has a vector potential, and false if it does not.  The vector potential exists if and only if the divergence of f is zero.
 • If a vector potential for f exists, it will be assigned to the name given in the third argument V.  If vecpotent returns true, then V will be assigned a vector function such that curl V = f.
 • The command with(linalg,vecpotent) 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[{x}^{2}y,-\frac{1x{y}^{2}}{2},-xyz\right]$
 ${f}{≔}\left[{{x}}^{{2}}{}{y}{,}{-}\frac{{x}{}{{y}}^{{2}}}{{2}}{,}{-}{x}{}{y}{}{z}\right]$ (1)
 > $\mathrm{vecpotent}\left(f,\left[x,y,z\right],'V'\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{print}\left(V\right)$
 $\left[\begin{array}{ccc}{-}\frac{{x}{}{{y}}^{{2}}{}{z}}{{2}}& {-}{{x}}^{{2}}{}{y}{}{z}& {0}\end{array}\right]$ (3)
 > $g≔\left[{x}^{2},{y}^{2},{z}^{2}\right]$
 ${g}{≔}\left[{{x}}^{{2}}{,}{{y}}^{{2}}{,}{{z}}^{{2}}\right]$ (4)
 > $\mathrm{vecpotent}\left(g,\left[x,y,z\right],'G'\right)$
 ${\mathrm{false}}$ (5)