Divergence

In the context of vector fields in R3 with the usual metric, it is the well known operator giving a function from a vector field X by the expression

divX=i=13Xixi,

with its usual meaning. In physical terms, the divergence of a vector field is the extent to which the vector field flux behaves like a source at a given point. It is a local measure of its "outgoingness" – the extent to which there are more of the field vectors exiting an infinitesimal region of space than entering it. A point at which the flux is outgoing has positive divergence, and is often called a "source" of the field. A point at which the flux is directed inward has negative divergence, and is often called a "sink" of the field.

It can be generalized to a vector field X in any dimension and with any Riemannian metric (indeed we only need to highlight a volume form in this space) in the following way. If we perform the Lie derivative of the Riemannian volume form we obtain another volume form. The coefficient of proportionality is the divergence. That is, if the distinguished volume form is Ω then

LXΩ=divΩ(X)Ω

Equivalently, d(XΩ)=div(X)Ω (using Cartan formula and that Ω is closed). Moreover, also for Cartan formula we have that for any smooth function f

LX(fΩ)=d(XfΩ)=d(fXΩ)==LfX(Ω)

And therefore, by one of the formulas for Lie derivative, exterior derivatives, bracket, interior product (the number 2)

div(fX)=fdiv(X)+X(f)

since LfX(Ω)=fLXΩ+dfXΩ=fdiv(X)Ω+X(f)Ω=div(fX)Ω
(I don't know yet how to fill the gap dfXΩ=X(f)Ω...).

A function f such that div(fX)=0 is called a Jacobi last multiplier for X.

Change of the volume form

Suppose we have in M two volume forms, Ω and gΩ, with g any smooth function. By definition divgΩ(X) is the function which satisfies

LX(gΩ)=divgΩ(X)gΩ

But since LgX(Ω)=divΩ(gX)Ω and LgX(Ω)=LX(gΩ) we conclude

(1)divgΩ(X)=divΩ(gX)g

Change of variables

(Named as Jacobi's lemma in Muriel_2014)
Lemma. Suppose the coordinate change in Rn:

φ:(x1,,xn)(y1,,yn)

Suppose, also, that we have a vector field X=Xixi that gets transformed to Y=Yiyi=φ(X). Then

Xixi=Hyi(YiH)

where H is the Jacobian of the coordinate change.
Proof
Denote Ω=dx1dxn and Ω~=dy1dyn. We have that (φ1)(Ω)=1HΩ~.
Now, observe that

divΩ(X)=φ(div(φ1)(Ω)(Y))

(we are simply computing the same thing in other coordinates).
So therefore

(1)divΩ(X)=φ(div1HΩ~(Y))

and according to (1):

divΩ(X)=φ(HdivΩ~(YH))

which is the desired formula

In particular, if LXΩ=0 then LY1HΩ¯=0 (which is concluded from (1)).

Computation from a covariant derivative

See Schuller GR-connections. Given any covariant derivative operator in a smooth manifold M it turns out that the divergence of a vector field X can be defined by the formula

div(X):=(xiX)i.

But I think that this notion only coincides with the divergence above when we have a Riemannian metric inducing both the connection and the volume form.