linalg(deprecated)/laplacian - Help

linalg(deprecated)

 laplacian
 Laplacian of an expression

 Calling Sequence laplacian(f, v) laplacian(f, v, co)

Parameters

 f - scalar expression v - vector or list of variables co - (optional), is either of type = or a list of three elements. This option is used to compute the Laplacian in orthogonally curvilinear coordinate systems.

Description

 • Important: The linalg package has been deprecated. Use the superseding packages VectorCalculus[Laplacian], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • laplacian(f, v) computes the Laplacian of f with respect to v.
 • The Laplacian is defined to be the sum of the second derivatives $\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}f$ for x in v.
 • In the case of three dimensions, where f is a scalar expression of three variables and v is a list or a vector of three variables:
 If the optional third argument co is of the form coords = coords_name or coords = coords_name({[const]}), laplacian will operate on commonly used orthogonally curvilinear coordinate systems. See ?coords for the list of coordinate systems supported by Maple.

 For orthogonally curvilinear coordinates v[1], v[2], v[3] with unit vectors a[1], a[2], a[3], and scale factors h[1], h[2], h[3]. Let the rectangular coordinates x, y, z be defined in terms of the specified orthogonally curvilinear coordinates. We have: h[n]^2 = [diff(x,v[n])^2 + diff(y,v[n])^2 + diff(z,v[n])^2], n=1,2,3. The formula for the laplacian of f is: laplacian(f) = 1/(h[1]*h[2]*h[3])*sum(diff(h[1]*h[2]*h[3]/h[n]^2* diff(f,v[n]),v[n]),n=1..3)

 If the optional third argument co is a list of three elements which specify the scale factors, laplacian will operate on orthogonally curvilinear coordinate systems.
 • To compute the Laplacian in other orthogonally curvilinear coordinate systems, use the addcoords routine.
 • The two dimensional case is similar to the three dimensional one.
 • The command with(linalg,laplacian) allows the use of the abbreviated form of this command.

Examples

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

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $\mathrm{laplacian}\left({x}^{2}yz,\left[x,y,z\right]\right)$
 ${2}{}{y}{}{z}$ (1)
 > $f≔r\mathrm{sin}\left(\mathrm{\theta }\right){z}^{2}:$$v≔\left[r,\mathrm{\theta },z\right]:$
 > $\mathrm{laplacian}\left(f,v,\mathrm{coords}=\mathrm{cylindrical}\right)$
 ${2}{}{r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)$ (2)

define the scale factors in cylindrical coordinates

 > $h≔\left[1,r,1\right]:$
 > $\mathrm{laplacian}\left(f,v,h\right)$
 ${2}{}{r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)$ (3)
 > $g≔{r}^{2}\mathrm{sin}\left(\mathrm{\theta }\right)\mathrm{cos}\left(\mathrm{\phi }\right):$$v≔\left[r,\mathrm{\theta },\mathrm{\phi }\right]:$
 > $\mathrm{laplacian}\left(g,v,\mathrm{coords}=\mathrm{spherical}\right)$
 $\frac{{5}{}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{\mathrm{cos}}{}\left({\mathrm{\phi }}\right){+}{{r}}^{{2}}{}{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}^{{2}}{}{\mathrm{cos}}{}\left({\mathrm{\phi }}\right){-}{{r}}^{{2}}{}{\mathrm{cos}}{}\left({\mathrm{\phi }}\right)}{{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}$ (4)