wedge (version 1.0-3)

as.1form: Coerce vectors to 1-forms

Description

Given a vector, return the corresponding 1-form; the exterior derivative of a 0-form (that is, a scalar function)

Usage

as.1form(v)
grad(v)

Arguments

v

A vector with element \(i\) being \(\partial f/\partial x_i\)

Value

A one-form

Details

The exterior derivative of a \(k\)-form \(\phi\) is a \((k+1)\)-form \(\mathbf{d}\phi\) given by

$$ \mathbf{d}\phi \left( P_\mathbf{x}\left(\mathbf{v}_i,\ldots,\mathbf{v}_{k+1}\right) \right) = \lim_{h\longrightarrow 0}\frac{1}{h^{k+1}}\int_{\partial P_\mathbf{x}\left(h\mathbf{v}_1,\ldots,h\mathbf{v}_{k+1}\right)}\phi $$

We can use the facts that

$$ \mathbf{d}\left(f\,dx_{i_1}\wedge\cdots\wedge dx_{i_k}\right)= \mathbf{d}f\wedge dx_{i_1}\wedge\cdots\wedge dx_{i_k} $$

and $$ \mathbf{d}f=\sum_{j=1}^n\left(D_j f\right)\,dx_j $$

to calculate differentials of general \(k\)-forms. Specifically, if

$$ \phi=\sum_{1\leq i_i<\cdots<i_k\leq n} a_{i_1\ldots i_k}dx_{i_1}\wedge\cdots\wedge dx_{i_k} $$

then $$ \mathbf{d}\phi= \sum_{1\leq i_i<\cdots<i_k\leq n} [\sum_{j=1}^nD_ja_{i_1\ldots i_k}dx_j]\wedge dx_{i_1}\wedge\cdots\wedge dx_{i_k} $$

The entry in square brackets is given by grad(). See the examples for appropriate R idiom.

See Also

kform

Examples

Run this code
# NOT RUN {
as.1form(1:9)  # note ordering of terms


as.1form(rnorm(20))

grad(c(4,7)) %^% grad(1:4)




# }

Run the code above in your browser using DataLab