In Mathematics, integration by parts is often used to transform the indefinite integral of a product of functions into an indefinite integral for which a solution can be obtained more easily. For example, we have two functions \(u(x)\) and \(v(x)\) defined on the domain \(\Omega = [a, b]\), and we would like to calculate

\[\begin{align} \int_a^b u(x) v'(x) \, \mathrm{d} x &= \Big[u(x) v(x)\Big]_a^b - \int_a^b u'(x) v(x) \, \mathrm{d} x\\ &= u(b) v(b) - u(a) v(a) - \int_a^b u'(x) v(x) \, \mathrm{d} x \end{align}\]After this transformation, often times the integrand \(u'(x) v(x)\) becomes easier to work with than the original integrand.

The formula for integration by parts can be extended to functions of several variables. Sometimes, it is referred as formula of integration by parts for higher dimensions. Suppose \(u(x_1,x_2,x_3)\) and \(v(x_1,x_2,x_3)\) are two smooth functions defined on a 3D domain \(\Omega\) with boundary \(\Gamma\), then the formula for integration by parts becomes,

\[\int_\Omega v \frac{\partial u}{\partial x_i} \,\mathrm{d} \Omega = \oint_{\Gamma} u v \, n_i \, \mathrm{d} \Gamma - \int_{\Omega} u \frac{\partial v}{\partial x_i} \, \mathrm{d} \Omega, \qquad i=1,2,3\]where \({\mathbf{n}}\) is the outward unit surface normal to \(\Gamma\), and \(n_i\) is its \(i\)-th component, and \(i\) ranges from \(1\) to \(3\) for 3D domains. Summation of this equation for \(i=1,2,3\) yields the vector form of this equation,

\[\int_{\Omega} v \boldsymbol{\nabla} u \, \mathrm{d}\Omega = \oint_{\Gamma} u v \, \mathbf{n} \,\mathrm{d}\Gamma - \int_{\Omega} u \boldsymbol{\nabla} v \, \mathrm{d}\Omega\]where \(\boldsymbol{\nabla} u\) is a vector defined as

\[\boldsymbol{\nabla} u = \frac{\partial u}{\partial x_1} \mathbf{i}+ \frac{\partial u}{\partial x_2} \mathbf{j} + \frac{\partial u}{\partial x_3} \mathbf{k}\]and similarly,

\[\boldsymbol{\nabla} v = \frac{\partial v}{\partial x_1} \mathbf{i}+ \frac{\partial v}{\partial x_2} \mathbf{j} + \frac{\partial v}{\partial x_3} \mathbf{k}\]If the function \(v(x_1, x_2, x_3)\) is a vector-valued function \(\mathbf{v}(x_1, x_2, x_3)\) of space, then the formula becomes This equitation was used in the derivation of the weak form of 3D BVP.

\[\int_{\Omega} \mathbf{v} \cdot \boldsymbol{\nabla} u \, \mathrm{d}\Omega = \oint_{\Gamma} u (\mathbf{v}\cdot \mathbf{n})\, \mathrm{d}\Gamma - \int_\Omega u\, \boldsymbol{\nabla} \cdot\mathbf{v}\, \mathrm{d}\Omega\]where \(\boldsymbol{\nabla}\cdot\mathbf{v}\) is a scalar,

\[\boldsymbol{\nabla} \cdot\mathbf{v} = \frac{\partial v_1}{\partial x_1} + \frac{\partial v_2}{\partial x_2} + \frac{\partial v_3}{\partial x_3}\]This formula can be derived by using the relationship

\[\boldsymbol{\nabla} \cdot (u\mathbf{v} ) = \mathbf{v} \cdot \boldsymbol{\nabla} u + u\, \boldsymbol{\nabla} \cdot\mathbf{v}\]With that, we have,

\[\int_\Omega \boldsymbol{\nabla} \cdot (u\mathbf{v} ) \mathrm{d}\Omega = \int_{\Omega} \mathbf{v} \cdot \boldsymbol{\nabla} u \, \mathrm{d}\Omega + \int_\Omega u\, \boldsymbol{\nabla} \cdot\mathbf{v}\, \mathrm{d} \Omega\]The left-hand side of this equation can be simplified by using the divergence theorem (see also the Green’s theorem)

\[\int_\Omega \boldsymbol{\nabla} \cdot (u\mathbf{v} ) \mathrm{d}\Omega = \oint_{\Gamma} u (\mathbf{v}\cdot \mathbf{n})\, \mathrm{d}\Gamma\]Thus, we obtain the final form of the equation,

\[\oint_{\Gamma} u (\mathbf{v}\cdot \mathbf{n})\, \mathrm{d}\Gamma = \int_{\Omega} \mathbf{v} \cdot \boldsymbol{\nabla} u \, \mathrm{d}\Omega + \int_\Omega u\, \boldsymbol{\nabla} \cdot\mathbf{v}\, \mathrm{d} \Omega\]which is identical to the above equation. \(\qquad \blacksquare\)

If it happens that \(\mathbf{v}= \boldsymbol{\nabla} v\), then the formula becomes the first Green’s identity,

\[\int_{\Omega} \boldsymbol{\nabla} v \cdot \boldsymbol{\nabla} u \, \mathrm{d}\Omega = \oint_{\Gamma} u\, \left( \boldsymbol{\nabla} v\cdot \mathbf{n} \right) \, \mathrm{d}\Gamma - \int_\Omega u\, \boldsymbol{\nabla}^2 v\, \mathrm{d}\Omega\]or

\[\int_\Omega u\, \boldsymbol{\nabla}^2 v\, \mathrm{d}\Omega= \oint_{\Gamma} u\, \left( \boldsymbol{\nabla} v\cdot \mathbf{n} \right) \, \mathrm{d}\Gamma - \int_{\Omega} \boldsymbol{\nabla} v \cdot \boldsymbol{\nabla} u \, \mathrm{d}\Omega\]where \(\boldsymbol{\nabla}^2\) is called Laplace operator or Laplacian, and \(\boldsymbol{\nabla}^2 v\) is also a scalar,

\[\boldsymbol{\nabla}^2 v = \frac{\partial^2 v_1 }{\partial x_1^2} + \frac{\partial^2 v_2}{\partial x_2^2} + \frac{\partial^2 v_3}{\partial x_3^2}\]The Laplace operator \(\boldsymbol{\nabla}^2\) is also written as \(\boldsymbol{\Delta}\), for example, suppose \(f(x,y,z)\) is a continuous function defined on a 3D domain,

\[\boldsymbol{\nabla}^2 f = \boldsymbol{\Delta} f = \frac{\partial^2 f}{\partial x^2} + \frac{\partial^2 f}{\partial y^2} + \frac{\partial^2 f}{\partial z^2}\]For more information, see the Wikipedia page on integration by parts.