# Integration by parts

One of the methods for calculating integrals. Consider a continuous function $u:[a,b]\to \mathbb R$ and a continuously differentiable function $v:[a,b]\to \mathbb R$. If $U$ is a primitive of $u$, the integration by parts formula for the definite integral $\int_a^b u(x) v(x) dx$ is \begin{equation}\label{e:by_parts} \int_a^b u(x) v(x)\, dx = U(b) v (b) - U(a) v(a) - \int_a^b U(x) v' (x)\, dx\, . \end{equation} The formula is an easy consequence of the Fundamental theorem of calculus and of the the Leibniz rule, according to which $x\mapsto U (x) v (x) - \int_a^x U (t) v' (t)\, dt$ is a primitive of $uv$. The latter assertion is also called formula of integration by parts for indefinite integrals.
The formula \eqref{e:by_parts} is still valid under the assumption that $u$ is Lebesgue integrable and $v$ is absolutely continuous, replacing Riemann integrals with Lebesgue integrals.
In higher dimension the analogue of \eqref{e:by_parts} is a consequence of the Gauss formula. If $\Omega\subset {\mathbb R}^n$ is a bounded open set with $C^1$ boundary and $\nu$ denotes the outward unit normal to $\partial \Omega$, then the following formula holds for every pair of $C^1$ functions $u$ and $v$: $\int_\Omega u \frac{\partial u}{\partial x_i} = \int_{\partial \Omega} uv\, \nu_i - \int_\Omega u \frac{\partial v}{\partial x_i}$ ($\nu_i$ denotes the $i$-th component of the vector $\nu$; moreover the functions $u$, $v$ and their partial derivatives are assumed to have continuous extensions up to the boundary). The formula is still valid if $u$ and $v$ belong to the Sobolev spaces $W^{1,q}$ and $W^{1,p}$ for exponents $p,q$ with $\frac{1}{p}+\frac{1}{q} \leq 1 + \frac{1}{n}\, .$ The assumptions on the regularity of $\partial \Omega$ can also be weakened (for instance the formula still holds for Lipschitz domains).