DifferentialGeometry[algebraic operations] - Maple Help

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

DifferentialGeometry[algebraic operations]

addition, subtraction, scalar multiplication, wedge product, tensor product

 Calling Sequence A &plus B - add two vectors, differential forms or tensors A &minus B- subtract one vector, differential form or tensor from another A &mult B - multiply a Maple expression by a vector, differential form or tensor A &wedge B- form the wedge (or skew) product of a pair of differential forms or multi-vectors A &tensor B- form the tensor product of a pair of tensors A &algmult B - multiply two vectors in an algebra

Parameters

 A, B - Maple expressions, differential forms or tensors

Description

 • In the DifferentialGeometry package the wedge product of  1-forms is defined in terms of the tensor product by $\mathrm{\alpha }\wedge \mathrm{\beta }=\mathrm{\alpha }\otimes \mathrm{\beta }-\mathrm{\beta }\otimes \mathrm{\alpha }$.
 • When using these commands together within a single Maple expression, it is important to use parentheses to insure that the operations are executed in the correct order.
 • In an interactive Maple session, it is usually more convenient to use the commands evalDG and DGzip to perform these basic algebraic operations.
 • Here are the precise lists of admissible arguments for these commands.
 • A &plus B, A &minus B -- A and B: Maple expressions, vectors, differential forms of the same degree, differential biforms of the same bidegree, tensors with the same index type and density weights. A and B must be defined on the same frame.
 • A &mult B -- A: a Maple expression; B: a Maple expression, vector, differential form, differential biform, tensor. A and B must be defined on the same frame.
 • A &wedge B -- A and B: Maple expressions or differential forms, differential biforms.  If A and B are forms, then the sum of their degrees cannot exceed the dimension of  the frame on which they are defined. If A and B are bi-forms, then the sum of their horizontal degrees cannot exceed the dimension of the base manifold on which they are defined.  A and B must be defined on the same frame.
 • A &tensor B -- A and B: Maple expressions, vectors, differential 1-forms, tensors.  A and B must be defined on the same frame.
 • These commands are part of the DifferentialGeometry package, and so can be used in the forms given above only after executing the command with(DifferentialGeometry).

Examples

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

Use DGsetup to define a 3-dimensional manifold M with coordinates [x, y, z].

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M,\mathrm{verbose}\right)$
 ${\mathrm{The following coordinates have been protected:}}$
 $\left[{x}{,}{y}{,}{z}\right]$
 ${\mathrm{The following vector fields have been defined and protected:}}$
 $\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{\mathrm{D_z}}\right]$
 ${\mathrm{The following differential 1-forms have been defined and protected:}}$
 $\left[{\mathrm{dx}}{,}{\mathrm{dy}}{,}{\mathrm{dz}}\right]$
 ${\mathrm{frame name: M}}$ (1)

Example 1.

Create linear combinations of vector fields and differential 1-forms using &plus and &mult.

 > $\mathrm{X1}≔\mathrm{D_x}&plus\mathrm{D_z}$
 ${\mathrm{X1}}{≔}{\mathrm{D_x}}{+}{\mathrm{D_z}}$ (2)
 > $\mathrm{X2}≔\left(\left(3z\right)&mult\mathrm{D_x}\right)&plus\left(\left(-2y\right)&mult\mathrm{D_y}\right)$
 ${\mathrm{X2}}{≔}{3}{}{z}{}{\mathrm{D_x}}{-}\left({2}{}{y}{}{\mathrm{D_y}}\right)$ (3)
 > $\mathrm{X3}≔\mathrm{X2}&minus\left(\left(3z\right)&mult\mathrm{X1}\right)$
 ${\mathrm{X3}}{≔}{-}\left({2}{}{y}{}{\mathrm{D_y}}\right){-}\left({3}{}{z}{}{\mathrm{D_z}}\right)$ (4)
 > $\mathrm{α1}≔\left(\left(\mathrm{sin}\left(z\right)\right)&mult\mathrm{dx}\right)&minus\left(\left(\mathrm{cos}\left(y\right)\right)&mult\mathrm{dz}\right)$
 ${\mathrm{α1}}{≔}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{dx}}{-}\left({\mathrm{cos}}{}\left({y}\right){}{\mathrm{dz}}\right)$ (5)
 > $\mathrm{α2}≔\left(\left(\mathrm{cos}\left(x\right)\right)&mult\mathrm{dy}\right)&plus\left(\left(\mathrm{cos}\left(z\right)\right)&mult\mathrm{dz}\right)$
 ${\mathrm{α2}}{≔}{\mathrm{cos}}{}\left({x}\right){}{\mathrm{dy}}{+}{\mathrm{cos}}{}\left({z}\right){}{\mathrm{dz}}$ (6)

Example 2.

Create differential 2-forms using &plus and &mult and &wedge.

 > $\mathrm{α3}≔\left(2&mult\left(\mathrm{dx}&wedge\mathrm{dy}\right)\right)&plus\left(5&mult\left(\mathrm{dy}&wedge\mathrm{dz}\right)\right)$
 ${\mathrm{α3}}{≔}\left({2}{}{\mathrm{dx}}\right){}{\bigwedge }{}{\mathrm{dy}}{+}\left({5}{}{\mathrm{dy}}\right){}{\bigwedge }{}{\mathrm{dz}}$ (7)
 > $\mathrm{α4}≔\mathrm{α1}&wedge\mathrm{α2}$
 ${\mathrm{α4}}{≔}\left({\mathrm{sin}}{}\left({z}\right){}{\mathrm{cos}}{}\left({x}\right){}{\mathrm{dx}}\right){}{\bigwedge }{}{\mathrm{dy}}{+}\left({\mathrm{sin}}{}\left({z}\right){}{\mathrm{cos}}{}\left({z}\right){}{\mathrm{dx}}\right){}{\bigwedge }{}{\mathrm{dz}}{+}\left({\mathrm{cos}}{}\left({y}\right){}{\mathrm{cos}}{}\left({x}\right){}{\mathrm{dy}}\right){}{\bigwedge }{}{\mathrm{dz}}$ (8)
 > $\mathrm{α5}≔\left(\mathrm{α1}&wedge\mathrm{α2}\right)&minus\mathrm{α3}$
 ${\mathrm{α5}}{≔}\left(\left({-}{2}{+}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{cos}}{}\left({x}\right)\right){}{\mathrm{dx}}\right){}{\bigwedge }{}{\mathrm{dy}}{+}\left({\mathrm{sin}}{}\left({z}\right){}{\mathrm{cos}}{}\left({z}\right){}{\mathrm{dx}}\right){}{\bigwedge }{}{\mathrm{dz}}{+}\left(\left({-}{5}{+}{\mathrm{cos}}{}\left({y}\right){}{\mathrm{cos}}{}\left({x}\right)\right){}{\mathrm{dy}}\right){}{\bigwedge }{}{\mathrm{dz}}$ (9)
 > $\mathrm{α6}≔\mathrm{α1}&wedge\mathrm{α3}$
 ${\mathrm{α6}}{≔}{-}\left(\left(\left(\left({2}{}{\mathrm{cos}}{}\left({y}\right){-}{5}{}{\mathrm{sin}}{}\left({z}\right)\right){}{\mathrm{dx}}\right){}{\bigwedge }{}{\mathrm{dy}}\right){}{\bigwedge }{}{\mathrm{dz}}\right)$ (10)

Example 3.

Create various tensors using &plus, &mult and &tensor.

 > $\mathrm{T1}≔\mathrm{X1}&tensor\mathrm{X1}$
 ${\mathrm{T1}}{≔}{\mathrm{D_x}}{}{\mathrm{D_x}}{+}{\mathrm{D_x}}{}{\mathrm{D_z}}{+}{\mathrm{D_z}}{}{\mathrm{D_x}}{+}{\mathrm{D_z}}{}{\mathrm{D_z}}$ (11)
 > $\mathrm{T2}≔\mathrm{X1}&tensor\mathrm{α1}$
 ${\mathrm{T2}}{≔}\left({\mathrm{sin}}{}\left({z}\right){}{\mathrm{D_x}}\right){}{\mathrm{dx}}{-}\left(\left({\mathrm{cos}}{}\left({y}\right){}{\mathrm{D_x}}\right){}{\mathrm{dz}}\right){+}\left({\mathrm{sin}}{}\left({z}\right){}{\mathrm{D_z}}\right){}{\mathrm{dx}}{-}\left(\left({\mathrm{cos}}{}\left({y}\right){}{\mathrm{D_z}}\right){}{\mathrm{dz}}\right)$ (12)
 > $\mathrm{T3}≔1&tensor\left(\mathrm{dx}&wedge\mathrm{dy}\right)$
 ${\mathrm{T3}}{≔}{\mathrm{dx}}{}{\mathrm{dy}}{-}\left({\mathrm{dy}}{}{\mathrm{dx}}\right)$ (13)
 > $\mathrm{T4}≔\left(\left(\left(\mathrm{dx}&tensor\mathrm{dx}\right)&tensor\mathrm{D_y}\right)&tensor\mathrm{D_z}\right)&tensor\mathrm{dz}$
 ${\mathrm{T4}}{≔}\left(\left(\left({\mathrm{dx}}{}{\mathrm{dx}}\right){}{\mathrm{D_y}}\right){}{\mathrm{D_z}}\right){}{\mathrm{dz}}$ (14)
 > $\mathrm{T5}≔\left(\frac{1}{{y}^{2}}\right)&mult\left(\mathrm{dx}&t\mathrm{dx}+\mathrm{dy}&t\mathrm{dy}\right)$
 ${\mathrm{T5}}{≔}\frac{{\mathrm{dx}}}{{{y}}^{{2}}}{}{\mathrm{dx}}{+}\frac{{\mathrm{dy}}}{{{y}}^{{2}}}{}{\mathrm{dy}}$ (15)

Example 4.

Create a multi-vector using &plus, &mult and &tensor.

 > $\mathrm{V1}≔\left(2&mult\left(\mathrm{D_x}&wedge\mathrm{D_y}\right)\right)&plus\left(3&mult\left(\mathrm{D_y}&wedge\mathrm{D_z}\right)\right)$
 ${\mathrm{V1}}{≔}\left({2}{}{\mathrm{D_x}}\right){}{\bigwedge }{}{\mathrm{D_y}}{+}\left({3}{}{\mathrm{D_y}}\right){}{\bigwedge }{}{\mathrm{D_z}}$ (16)

Example 5.

Use the command AlgebraLibraryData to retrieve the structure equations for the quaternions.

 > $\mathrm{LA}≔\mathrm{AlgebraLibraryData}\left("Quaternions",Q\right)$
 ${\mathrm{LA}}{≔}\left[{{\mathrm{e1}}}^{{2}}{=}{\mathrm{e1}}{,}{\mathrm{e1}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e2}}{=}{\mathrm{e2}}{,}{\mathrm{e1}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e3}}{=}{\mathrm{e3}}{,}{\mathrm{e1}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e4}}{=}{\mathrm{e4}}{,}{\mathrm{e2}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e1}}{=}{\mathrm{e2}}{,}{{\mathrm{e2}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e2}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e3}}{=}{\mathrm{e4}}{,}{\mathrm{e2}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e4}}{=}{-}{\mathrm{e3}}{,}{\mathrm{e3}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e1}}{=}{\mathrm{e3}}{,}{\mathrm{e3}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e2}}{=}{-}{\mathrm{e4}}{,}{{\mathrm{e3}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e3}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e4}}{=}{\mathrm{e2}}{,}{\mathrm{e4}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e1}}{=}{\mathrm{e4}}{,}{\mathrm{e4}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e2}}{=}{\mathrm{e3}}{,}{\mathrm{e4}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{.}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{e3}}{=}{-}{\mathrm{e2}}{,}{{\mathrm{e4}}}^{{2}}{=}{-}{\mathrm{e1}}\right]$ (17)

Initialize.

 > $\mathrm{DGsetup}\left(\mathrm{LA},\left[e,i,j,k\right],\left[\mathrm{θ}\right]\right)$
 ${\mathrm{algebra name: Q}}$ (18)

Calculate some simple sums and products of quaternions.

 > $\mathrm{Q1}≔i&algmultj$
 ${\mathrm{Q1}}{≔}{k}$ (19)
 > $\mathrm{Q2}≔\left(\left(\left(e&plusi\right)&plusj\right)&plusk\right)&algmult\left(e&minus\left(\left(i&plusj\right)&plusk\right)\right)$
 ${\mathrm{Q2}}{≔}{4}{}{e}$ (20)
 Q >