# Partial integration for smooth functions with compact support

Let

• $d\in\mathbb N$
• $\lambda$ be the Lebesgue measure on $\mathbb R^d$
• $\Omega\subseteq\mathbb R^d$ be open

Why can we use partial integration to obtain $$\int_\Omega\phi\Delta\psi\;{\rm d}\lambda=-\int_\Omega\nabla\phi\cdot\nabla\psi\;{\rm d}\lambda\tag 1$$ for all $\phi,\psi\in C_c^\infty(\Omega)$?

The multi-dimensional partial integration is a special case of the divergence theorem. But the divergence theorem in the version that I know only can be applied on compact subsets $K$ of $\mathbb R^d$ with smooth boundary $\partial K$. Smooth boundary means that for all $p\in\partial K$, there is an open set $U\subseteq\mathbb R^d$ with $p\in U$ such that there is a continuously differentiable $F:U\to\mathbb R$ with

1. $K\cap U=\left\{x\in U:F(x)\le 0\right\}$ and
2. $F'(x)\ne 0$ for all $x\in U$

Let's so what we've got in the situation of $\phi,\psi\in C_c^\infty(\Omega)$. Suppose we can find a compact $K$ with smooth boundary such that $K\subseteq\Omega$ and $\operatorname{supp}\Delta\psi\subset K$. Then it's easy to conclude that $$\int_\Omega\nabla\phi\cdot\nabla\psi+\phi\Delta\psi\;{\rm d}\lambda=\int_K\nabla\phi\cdot\nabla\psi+\phi\Delta\psi\;{\rm d}\lambda=\int_{\partial K}\phi\frac{\partial\psi}{\partial\nu}\;{\rm d}o=0$$ by the divergence theorem, since $\phi$ vanishes at $\partial K$.

So, can we always find such a $K$? If not, how can we prove $(1)$ instead?

You do not need to find such a set $K \subset \Omega$!
At first, let us assume that $\Omega \subset \mathbb{R}^d$ is bounded. Then there is an open ball $B_R(0) \subset \mathbb{R}^d$ such that $\Omega \subset B_{R/2}(0)$. For every function $\varphi \in C_c^{\infty}(\Omega)$, we define an extension $\tilde{\varphi} \colon B_R(0) \to \mathbb{R}$ by \begin{align} \tilde{\varphi}(x) &:= \varphi(x) &\text{ for } x \in \Omega, \\ \tilde{\varphi}(x) &:= 0 &\text{ otherwise.} \end{align} Then $\tilde{\varphi} \in C_{c}^{\infty}(B_R(0))$.
Let $\varphi, \psi \in C_c^{\infty}(\Omega)$. As above, we construct extensions $\tilde{\varphi}, \tilde{\psi} \in C_c^{\infty}(B_R(0))$. As the ball $B_R(0)$ has a smooth boundary, we are allowed to integrate by parts. So we obtain that $$\int_{\Omega} \varphi \Delta \psi = \int_{B_R(0)} \tilde{\varphi} \Delta \tilde{\psi} = - \int_{B_R(0)} \nabla \tilde{\varphi} \cdot \nabla \tilde{\psi} = - \int_{\Omega} \nabla \varphi \cdot \nabla \psi.$$ This proves the claim for bounded domains $\Omega$.
If $\Omega \subset \mathbb{R}^d$ is not bounded, then there is no ball $B_R(0) \subset \mathbb{R}^d$ such that $\Omega \subset B_{R/2}(0)$. However, our construction from above works! This is because for $\varphi \in C_c^{\infty}(\Omega)$ the support of $\varphi$ is a compact set; in particular, $\text{supp} \, \varphi \subset \mathbb{R}^d$ is bounded. So we find a ball $B_R(0) \subset \mathbb{R}^d$ such that $\text{supp} \, \varphi \subset B_{R/2}(0)$. Now, you can define the same extension $\tilde{\varphi} \colon B_R(0) \to \mathbb{R}$ as above. This proves the claim for unbounded domains $\Omega$.