DifferentialGeometry - Maple Programming Help

Home : Support : Online Help : Mathematics : DifferentialGeometry : DifferentialGeometry/evalDG

DifferentialGeometry

 evalDG
 evaluate a DifferentialGeometry expression

 Calling Sequence evalDG(T)

Parameters

 T - a linear combination of vectors, differential forms or tensors defining using +, -, * for scalar multiplication, &w for wedge product, &t for tensor product, and &s for the symmetric tensor product

Description

 • The command evalDG provides a simple and efficient way for creating vector files, differential forms and tensors for subsequent calculations with the DifferentialGeometry package.
 • Note that Maple may perform simplifications before passing the arguments to evalDG, and these simplifications may result in an incorrect parsing of the input to evalDG.  In particular, if, for example, X is a vector field, then evalDG(0*X) will return the scalar 0 and not the zero vector.  To define a zero object, use 0 &mult evalDG(X) or the Tools command DGzero.
 • This command is part of the DifferentialGeometry package, and so can be used in the form evalDG(...) only after executing the command with(DifferentialGeometry).  It can always be used in the long form DifferentialGeometry:-evalDG.

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$

Define a 4 dimensional manifold M with coordinates [x, y, z, t].

 > $\mathrm{DGsetup}\left(\left[x,y,z,w\right],M\right):$

Example 1.

Create some vectors.

 > $\mathrm{evalDG}\left(2\mathrm{D_x}-y\mathrm{D_z}+{x}^{2}\mathrm{D_w}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{2}\right]{,}\left[\left[{3}\right]{,}{-}{y}\right]{,}\left[\left[{4}\right]{,}{{x}}^{{2}}\right]\right]\right]\right)$ (1)
 > $\mathrm{evalDG}\left(\frac{1}{2}\mathrm{D_x}-\frac{1}{y}\mathrm{D_z}+\frac{1}{{x}^{2}}\mathrm{D_w}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{1}}{{y}}\right]{,}\left[\left[{4}\right]{,}\frac{{1}}{{{x}}^{{2}}}\right]\right]\right]\right)$ (2)

Example 2.

Create a differential form.

 > $\mathrm{evalDG}\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\left({x}^{2}+{y}^{2}\right)\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&w\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{4}\right]{,}{{x}}^{{2}}{+}{{y}}^{{2}}\right]\right]\right]\right)$ (3)

Example 3.

Create some tensors.

 > $\mathrm{evalDG}\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\left({x}^{2}+{y}^{2}\right)\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{4}\right]{,}{{x}}^{{2}}{+}{{y}}^{{2}}\right]\right]\right]\right)$ (4)
 > $\mathrm{evalDG}\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&s\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dw}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{2}{,}{1}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{3}{,}{4}\right]{,}{1}\right]\right]\right]\right)$ (5)

Example 4.

Note the difference between the following two calls to evalDG.

 > $\mathrm{evalDG}\left(0\mathrm{D_x}\right)$
 ${0}$ (6)
 > $\mathrm{eval}\left(\mathrm{evalDG}\left(a\mathrm{D_x}\right),a=0\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{0}\right]\right]\right]\right)$ (7)
 > $\mathrm{Tools}:-\mathrm{DGzero}\left("vector"\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{0}\right]\right]\right]\right)$ (8)
 M >