 HodgeStar - Maple Help

Tensor[HodgeStar] - apply the Hodge star operator to a differential form

Calling Sequences

HodgeStar(g, omega)

Parameters

g      - a metric tensor

omega  - a differential form

option - (optional) the keyword argument detmetric Description

 • The Hodge star operator is customarily denoted by $\ast$ and maps $p$-forms on an $n$-dimensional manifold to $\left(n-p\right)$-forms. To define the Hodge star operator, let ${\mathrm{ω}}_{1},{\mathrm{ω}}_{2},...,{\mathrm{ω}}_{n}$ be an orthonormal basis of 1-forms with respect to the metric $g$. Pick integers ${i}_{1},{i}_{2},...,{i}_{r}$ with $1\le {i}_{1}<{i}_{2}...<{i}_{r}\le n$ and let $1\le {j}_{1}<{j}_{2}<...<{j}_{s}\le n$ be the complementary set of integers $\left(r=n-s\right)$.  Let . Then

,

where the sign$±$is chosen so that.

 • The command HodgeStar(g, omega) returns the Hodge star of the form omega with respect to the metric g.
 • The command HodgeStar(g, omega) calculates the Hodge star of the form omega as follows. [i] Convert omega to skew-symmetric, covariant rank r tensor T. [ii] Fully contract T with the contravariant permutation symbol and multiply by the weight 1 scalar density defined by the metric g. The result is a skew-symmetric contravariant rank n-r tensor S. [iii] Lower all the indices of S with the metric g and convert the resulting skew-symmetric, contravariant rank n-r tensor to a differential form.
 • By default, it is assumed that the metric g has positive determinant. To calculate the Hodge star operation 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 HodgeStar(...) only after executing the command with(DifferentialGeometry) and with(Tensor) in that order.  It can always be used in the long form DifferentialGeometry:-Tensor:-HodgeStar. Examples

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

Example 1.

First create a 5-dimensional manifold $M$ and define a metric tensor $g$ on the tangent space of $M$.

 E > $\mathrm{DGsetup}\left(\left[\mathrm{x1},\mathrm{x2},\mathrm{x3},\mathrm{x4},\mathrm{x5}\right],\mathrm{M1}\right):$
 M1 > $g≔\mathrm{evalDG}\left(\mathrm{dx1}&t\mathrm{dx1}+\mathrm{dx2}&t\mathrm{dx2}+\mathrm{dx3}&t\mathrm{dx3}+\mathrm{dx4}&t\mathrm{dx4}+\mathrm{dx5}&t\mathrm{dx5}\right)$
 ${g}{:=}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{\mathrm{dx2}}{}{\mathrm{dx2}}{+}{\mathrm{dx3}}{}{\mathrm{dx3}}{+}{\mathrm{dx4}}{}{\mathrm{dx4}}{+}{\mathrm{dx5}}{}{\mathrm{dx5}}$ (2.1)

The standard basis  is an orthonormal basis for $g$ and therefore the Hodge star is easily computed.

 M1 > $\mathrm{HodgeStar}\left(g,\mathrm{dx1}\right)$
 ${\mathrm{dx2}}{}{\bigwedge }{}{\mathrm{dx3}}{}{\bigwedge }{}{\mathrm{dx4}}{}{\bigwedge }{}{\mathrm{dx5}}$ (2.2)
 M1 > $\mathrm{HodgeStar}\left(g,\mathrm{dx2}\right)$
 ${-}{\mathrm{dx1}}{}{\bigwedge }{}{\mathrm{dx3}}{}{\bigwedge }{}{\mathrm{dx4}}{}{\bigwedge }{}{\mathrm{dx5}}$ (2.3)
 M1 > $\mathrm{HodgeStar}\left(g,\mathrm{dx2}&w\mathrm{dx3}\right)$
 ${\mathrm{dx1}}{}{\bigwedge }{}{\mathrm{dx4}}{}{\bigwedge }{}{\mathrm{dx5}}$ (2.4)
 M1 > $\mathrm{HodgeStar}\left(g,\mathrm{dx2}&w\mathrm{dx4}\right)$
 ${-}{\mathrm{dx1}}{}{\bigwedge }{}{\mathrm{dx3}}{}{\bigwedge }{}{\mathrm{dx5}}$ (2.5)
 M1 > $\mathrm{HodgeStar}\left(g,\left(\mathrm{dx2}&w\mathrm{dx3}\right)&w\mathrm{dx4}\right)$
 ${-}{\mathrm{dx1}}{}{\bigwedge }{}{\mathrm{dx5}}$ (2.6)

Example 2.

To show the dependence of the Hodge star upon the metric, we consider a general metric $g$ on a 2-dimensional manifold.

 M1 > $\mathrm{DGsetup}\left(\left[x,y\right],\mathrm{M2}\right):$
 M2 > $g≔\mathrm{evalDG}\left(a\mathrm{dx}&t\mathrm{dx}+b\left(\mathrm{dx}&t\mathrm{dy}+\mathrm{dy}&t\mathrm{dx}\right)+c\mathrm{dy}&t\mathrm{dy}\right)$
 ${g}{:=}{a}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}{b}{}{\mathrm{dx}}{}{\mathrm{dy}}{+}{b}{}{\mathrm{dy}}{}{\mathrm{dx}}{+}{c}{}{\mathrm{dy}}{}{\mathrm{dy}}$ (2.7)
 M2 > $\mathrm{HodgeStar}\left(g,\mathrm{dx}\right)$
 $\sqrt{\frac{{1}}{{a}{}{c}{-}{{b}}^{{2}}}}{}{b}{}{\mathrm{dx}}{+}\sqrt{\frac{{1}}{{a}{}{c}{-}{{b}}^{{2}}}}{}{c}{}{\mathrm{dy}}$ (2.8)
 M2 > $\mathrm{HodgeStar}\left(g,\mathrm{dy}\right)$
 ${-}\sqrt{\frac{{1}}{{a}{}{c}{-}{{b}}^{{2}}}}{}{a}{}{\mathrm{dx}}{-}\sqrt{\frac{{1}}{{a}{}{c}{-}{{b}}^{{2}}}}{}{b}{}{\mathrm{dy}}$ (2.9)
 M2 > $f≔\mathrm{HodgeStar}\left(g,\mathrm{dx}&w\mathrm{dy}\right)$
 ${f}{:=}\sqrt{\frac{{1}}{{a}{}{c}{-}{{b}}^{{2}}}}$ (2.10)
 M2 > $\mathrm{HodgeStar}\left(g,f\right)$
 ${\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}$ (2.11)

Example 3.

The Laplacian of a function with respect to a metric $g$ can be calculated using the exterior derivative operation and the Hodge star operator.

To illustrate this result, we use the Euclidean metric in polar coordinates $\left(r,\mathrm{ϑ}\right)$.

 M2 > $\mathrm{DGsetup}\left(\left[r,\mathrm{θ}\right],\mathrm{M3}\right):$
 M3 > $g≔\mathrm{evalDG}\left(\mathrm{dr}&t\mathrm{dr}+{r}^{2}\mathrm{dtheta}&t\mathrm{dtheta}\right)$
 ${g}{:=}{\mathrm{dr}}{}{\mathrm{dr}}{+}{{r}}^{{2}}{}{\mathrm{dtheta}}{}{\mathrm{dtheta}}$ (2.12)

To simplify the definition of the Laplacian, we define the Hodge operator with $g$ fixed.

 M3 > $\mathrm{Hodge}≔f→\mathrm{HodgeStar}\left(g,f\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}0
 ${\mathrm{Hodge}}{:=}{f}{→}{\mathrm{DifferentialGeometry:-Tensor}}{:-}{\mathrm{HodgeStar}}{}\left({g}{,}{f}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{assuming}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}{<}{r}$ (2.13)

To display the Laplacian of $\mathrm{φ}$ in compact form we invoke the PDEtools[declare] command.

 M3 > ${\mathrm{PDEtools}}_{\mathrm{declare}}\left(\mathrm{φ}\left(r,\mathrm{θ}\right)\right)$
 ${\mathrm{φ}}{}\left({r}{,}{\mathrm{θ}}\right){}{\mathrm{will now be displayed as}}{}{\mathrm{φ}}$ (2.14)

Here is the formula for the Laplacian in terms of HodgeStar and ExteriorDerivative.  Recall that @ is the composition of functions.

 M3 > $\mathrm{Δ}≔\left(\left(\mathrm{Hodge}@\mathrm{ExteriorDerivative}\right)@\mathrm{Hodge}\right)@\mathrm{ExteriorDerivative}\left(\mathrm{φ}\left(r,\mathrm{θ}\right)\right)$
 ${\mathrm{Δ}}{:=}\frac{{r}{}{{\mathrm{φ}}}_{{r}}{+}{{r}}^{{2}}{}{{\mathrm{φ}}}_{{r}{,}{r}}{+}{{\mathrm{φ}}}_{{\mathrm{θ}}{,}{\mathrm{θ}}}}{{{r}}^{{2}}}$ (2.15)

Example 4.

The HodgeStar program also works in the more general context of a vector bundle $E\to M$.

 M3 > $\mathrm{DGsetup}\left(\left[x,y\right],\left[u,v,w\right],E\right)$
 ${\mathrm{frame name: E}}$ (2.16)
 E > $g≔\mathrm{evalDG}\left(\mathrm{du}&t\mathrm{du}+\mathrm{dv}&t\mathrm{dv}+\mathrm{dw}&t\mathrm{dw}\right)$
 ${g}{:=}{\mathrm{du}}{}{\mathrm{du}}{+}{\mathrm{dv}}{}{\mathrm{dv}}{+}{\mathrm{dw}}{}{\mathrm{dw}}$ (2.17)
 E > $\mathrm{HodgeStar}\left(g,\mathrm{du}&w\mathrm{dv}-3\mathrm{du}&w\mathrm{dw}+2\mathrm{dv}&w\mathrm{dw}\right)$
 ${2}{}{\mathrm{du}}{+}{3}{}{\mathrm{dv}}{+}{\mathrm{dw}}$ (2.18)

Example 5.

The HodgeStar operation can also be performed using an indefinite metric. The keyword argument detmetric = -1 must be used when the metric has negative determinant.

 E > $\mathrm{DGsetup}\left(\left[\mathrm{x1},\mathrm{x2},\mathrm{x3},\mathrm{x4}\right],\mathrm{M5}\right):$
 M1 > $g≔\mathrm{evalDG}\left(\mathrm{dx1}&t\mathrm{dx1}+\mathrm{dx2}&t\mathrm{dx2}+\mathrm{dx3}&t\mathrm{dx3}-\mathrm{dx4}&t\mathrm{dx4}\right)$
 ${g}{:=}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{\mathrm{dx2}}{}{\mathrm{dx2}}{+}{\mathrm{dx3}}{}{\mathrm{dx3}}{-}{\mathrm{dx4}}{}{\mathrm{dx4}}$ (2.19)

 M1 > $\mathrm{HodgeStar}\left(g,\mathrm{dx1},\mathrm{detmetric}=-1\right)$
 ${\mathrm{dx2}}{}{\bigwedge }{}{\mathrm{dx3}}{}{\bigwedge }{}{\mathrm{dx4}}$ (2.20)
 M5 > $\mathrm{HodgeStar}\left(g,\mathrm{dx3}&w\mathrm{dx4},\mathrm{detmetric}=-1\right)$
 ${-}{\mathrm{dx1}}{}{\bigwedge }{}{\mathrm{dx2}}$ (2.21)