Green's Theorem, Integration by Parts Formula
Theorem
Let $U\subset \mathbb{R}^{n}$ be an open set. Suppose $u : \bar{U} \to \mathbb{R}$ and $u \in C^1(\bar{U})$. Let $\nu$ be the outward unit normal vector. Then, the following equation holds:
$$ \begin{equation} \int_{U} u_{x_{i}}dx=\int _{\partial U} u\nu^{i} dS\quad (i=1,\dots, n) \label{eq1} \end{equation} $$
Summing this over all $i$ gives the equation below. For each $u^{1} \in C^{1}(\bar{U})$, if we say $\mathbf{u} = (u^{1},\dots,u^{n}) : \bar{U} \to \mathbb{R}^{n}$, then:
$$ \int_{U} \nabla \cdot \mathbf{u} dx = \int_{\partial U} \mathbf{u} \cdot \nu dS $$
This result is known as the Green-Gauss theorem or the divergence theorem.
Corollary: Partial Integration Formula
Let $u, v \in C^1(\bar{U})$. Then, the following equation holds:
$$ \int_{U} u_{x_{i}}vdx = -\int_{U} uv_{x_{i}}dx + \int_{\partial U} uv\nu^{i} dS\quad (i=1,\dots , n) $$
Proof
This can be obtained by applying $uv$ instead of $u$ to $\eqref{eq1}$.
$$ \int_{U} (uv)_{x_{i}} dx = \int_{U} u_{x_{i}}v dx +\int_{U} uv_{x_{i}} dx =\int _{\partial U} u v\nu ^{i} dS $$
After rearranging, it is as follows:
$$ \int_{U} u_{x_{i}}v dx =-\int_{U} uv_{x_{i}} dx + \int _{\partial U} uv \nu ^{i} dS $$
■