MetricDensity - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Tensor[MetricDensity] - use a metric tensor to create a scalar density of a given weight

Calling Sequences

MetricDensity(g, r)

Parameters

g       - a metric tensor

r       - a rational number

option  - (optional) the keyword argument detmetric

Description

 • If $g$ is a metric with components ${g}_{\mathrm{ij}}$, then $\mathrm{ρ}=\mathrm{det}{\left({g}_{\mathrm{ij}}\right)}^{\frac{r}{2}}$ defines a scalar density of weight $r.$
 • The program MetricDensity(g, r) returns the scalar density $\mathrm{ρ}$.
 • By default, it is assumed that the metric $g$ has positive determinant. To calculate the proper metric density with respect to a metric with negative determinant, include the keyword argument detmetric = -1.
 • This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form MetricDensity(...) only after executing the commands with(DifferentialGeometry) and with(Tensor) in that order.  It can always be used in the long form DifferentialGeometry:-Tensor:-MetricDensity.

Examples

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

Example 1.

First create a manifold $M$ and define a metric tensor $\mathrm{g1}$.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 M > $\mathrm{g1}≔\mathrm{evalDG}\left(x\mathrm{dx}&t\mathrm{dx}+y\mathrm{dy}&t\mathrm{dy}+\mathrm{dz}&t\mathrm{dz}\right)$
 ${\mathrm{g1}}{:=}{x}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{y}{}{\mathrm{dy}}{}{\mathrm{dy}}{+}{\mathrm{dz}}{}{\mathrm{dz}}$ (2.1)

Use $g$ to make a tensor density of weight 1.

 M > $\mathrm{ρ1}≔\mathrm{MetricDensity}\left(\mathrm{g1},1\right)$
 ${\mathrm{ρ1}}{:=}\sqrt{{x}{}{y}}$ (2.2)

Display the density type of rho1.

 M > $\mathrm{Tools}:-\mathrm{DGinfo}\left(\mathrm{ρ1},"TensorDensityType"\right)$
 $\left[\left[{"bas"}{,}{1}\right]\right]$ (2.3)

Example 2.

For indefinite metrics, the optional argument detmetric = -1 can be used to ensure that the metric density is real.

 > $\mathrm{g2}≔\mathrm{evalDG}\left(\mathrm{dx}&t\mathrm{dx}+\mathrm{dy}&t\mathrm{dy}-\mathrm{dz}&t\mathrm{dz}\right)$
 ${\mathrm{g2}}{:=}{\mathrm{dx}}{}{\mathrm{dx}}{+}{\mathrm{dy}}{}{\mathrm{dy}}{-}{\mathrm{dz}}{}{\mathrm{dz}}$ (2.4)
 M > $\mathrm{rho2a}≔\mathrm{MetricDensity}\left(\mathrm{g2},1\right)$
 ${\mathrm{rho2a}}{:=}{I}$ (2.5)
 M > $\mathrm{rho2b}≔\mathrm{MetricDensity}\left(\mathrm{g2},1,\mathrm{detmetric}=-1\right)$
 ${\mathrm{rho2b}}{:=}{1}$ (2.6)

Example 3.

First create a rank 3 vector bundle $E$ over a two-dimensional manifold $M$ and define a metric tensor $\mathrm{g3}$ on the fibers of $E$.

 M > $\mathrm{DGsetup}\left(\left[x,y\right],\left[u,v,w\right],E\right)$
 ${\mathrm{frame name: E}}$ (2.7)
 E > $\mathrm{g3}≔\mathrm{evalDG}\left(x\mathrm{du}&t\mathrm{du}+y\mathrm{dv}&t\mathrm{dv}+xy\mathrm{dw}&t\mathrm{dw}\right)$
 ${\mathrm{g3}}{:=}{x}{}{\mathrm{du}}{}{\mathrm{du}}{+}{y}{}{\mathrm{dv}}{}{\mathrm{dv}}{+}{x}{}{y}{}{\mathrm{dw}}{}{\mathrm{dw}}$ (2.8)

Use $\mathrm{g3}$ to make a tensor density of weight -1.

 E > $\mathrm{ρ3}≔\mathrm{MetricDensity}\left(\mathrm{g3},-1\right)$
 ${\mathrm{ρ3}}{:=}\frac{{1}}{\sqrt{{{x}}^{{2}}{}{{y}}^{{2}}}}$ (2.9)

Display the density type of rho3.

 E > $\mathrm{Tools}:-\mathrm{DGinfo}\left(\mathrm{ρ3},"TensorDensityType"\right)$
 $\left[\left[{"vrt"}{,}{-}{1}\right]\right]$ (2.10)

 See Also