## Divergence on manifold

Divergence on manifold Suppose ${(M,g)}$ is a Riemannian manifold. ${X}$ is smooth vector field on it. ${\{e_i\}}$ is a frame at ${p}$. Suppose ${X=X^ie_i}$, then define

$\displaystyle \text{div} X=\sum_iX^i_{,i}$

Under a local coordinates near ${p}$, choose ${\{\frac{\partial}{\partial u^i}\}}$ as the basis of tangent space, then

$\displaystyle \text{div} X=\frac{1}{\sqrt{G}}\sum_i\frac{\partial(\sqrt{G}X^i)}{\partial u^i}$

where ${G=\det(g_{ij})}$. One way to prove is straightforward verification. Let us see a more intuitive way, from the divergence theorem

$\displaystyle \int_{M}\text{div } XdV=\int_{\partial M}X\cdot \vec{n}\,dS$

Choose ${h\in C_c^\infty(U(p))}$, where ${U(p)}$ is a neighborhood of ${p}$, apply the divergence theorem to ${hX}$

$\displaystyle \int_{U}\text{div } (hX)dV=0$

which means

$\displaystyle \int_U h\text{div}\,XdV=-\int_U X\cdot \nabla h \,dV=-\int_U X^i\frac{\partial h}{\partial u^i}\sqrt{G}du^1\wedge\cdots\wedge du^n$

Denote ${\phi:U\rightarrow\mathbb{R}^n}$ is the diffeomorphism and ${\tilde{X}=X\circ\phi^{-1}}$, ${\tilde{h}=h\circ \phi^{-1}}$. From Green’s formula

$\displaystyle \int_U X^i\frac{\partial h}{\partial u^i}\sqrt{G}du^1\wedge\cdots\wedge du^n=\int_{\phi(U)}\tilde{X}^i\frac{\partial \tilde{h}}{\partial u^i}\sqrt{G}du^1\cdots du^n$

$\displaystyle =-\int_{\phi(U)}\tilde{h}\frac{\partial (\tilde{X}^i\sqrt{G})}{\partial u^i}du^1\cdots du^n=-\int_{U}\frac{1}{\sqrt{G}}\sum_i\frac{\partial(\sqrt{G}X^i)}{\partial u^i}hdV$

Combining the two equalities, we get that

$\displaystyle \text{div} X=\frac{1}{\sqrt{G}}\sum_i\frac{\partial(\sqrt{G}X^i)}{\partial u^i}$

When you are on a hypersurface, suppose ${F:U\rightarrow \mathbb{R}^{n+1}}$ is the embedding. Metric is ${g_{ij}=\partial_iF\cdot\partial_j F}$

Denote ${e_i=\partial_iF}$, ${X}$ is any smooth vector field, not necessaritly tangent to ${M}$, then

$\displaystyle \langle\nabla^M_{e_i}X,e_l\rangle=\langle\bar{\nabla}_{e_i}X,e_l\rangle=\partial_{i}X\cdot e_l$

So ${\nabla^M_{e_i}X=g^{jl}(\partial_iX\cdot e_l)e_j}$

$\displaystyle \text{div}_M\,X=X^i_{,i}=g^{il}\partial_iX\cdot e_l$