# Integration by parts for multivariable functions using the Divergence Theorem

I came across the following formula used in a calculation of the distributional derivative (though the formula itself is not really to do with distributions), which apparently follows from the Divergence Theorem:

$$\int_{\mathbb{R}^d}D^{\alpha}\phi \ \psi \ dx =(-1)^{|\alpha|}\int_{\mathbb{R}^d}\phi \ D^{\alpha}\psi \ dx.$$

Here, $$\phi,\psi:\mathbb{R}^d \to \mathbb{R}$$ with compact support, the integrals are Riemann integrals and $$\alpha$$ is a multi-index. I think for a single partial derivative ($$|\alpha|=1$$) we'd write

$$\int_{\mathbb{R}^d}\partial_i\phi \ \psi \ dx +\int_{\mathbb{R}^d}\phi \ \partial_i\psi \ dx=\int_{\mathbb{R}^d}\partial_i(\phi \ \psi) \ dx.$$

I understand that the integrand on the right can be seen as the divergence of the vector field that has all components $$0$$ except for the $$i$$th one, $$\phi \psi$$. Then by compact support the integral is just over some ball which properly contains the support, so by the Divergence Theorem it's the integral over a sphere of some multiple of $$\phi\psi x_i$$ (because the outward unit normal has direction $$x$$). But this is $$0$$ on the sphere so the integral is $$0$$ as required. Is this reasoning correct?

For higher derivatives maybe we take $$\partial_j$$ of this equation and need to show that

$$\int_{\mathbb{R}^d}\partial_i\phi \ \partial_j\psi \ dx +\int_{\mathbb{R}^d}\partial_j\phi \ \partial_i\psi \ dx=0,$$

and I'm not sure how to show this, though I might be missing something obvious.

• If you convert to an iterated integral, integrating over $x_i$ first, your $\partial_i$ formula is just integration by parts, and the rh side is 0 by the fundamental theorem of calculus. You then integrate over the remaining variables to get the result. Your bottom formula is not an example of what you are trying to prove, though. That would be $$\int_{\Bbb{R}^d}\partial_i\partial_j\phi \ \psi \ dx = \int_{\Bbb{R}^d}\phi \ \partial_i\partial_j\psi \ dx$$ which follows from a double application of the single derivative result. – Paul Sinclair Feb 13 at 4:24
• @PaulSinclair Oh of course, I forgot the sign in the bottom formula. So that solves the second part given the first, somehow I couldn't see how a double application would work at first. As for the first part, your solution makes sense, but is my method also valid? If you could put your comment in an answer and mention whether my argument for the first part is correct then I'd accept your answer. – AlephNull Feb 13 at 12:16

To expand on my argument, if $$\phi \in C_c^\infty(\Bbb R^n)$$, the set of all smooth functions with compact support, then for the $$i$$-th variable $$x_i$$, $$\int_{-\infty}^\infty \partial_i\phi\ dx_i = \phi|_{-\infty}^\infty = 0 - 0 = 0\tag1$$ If $$\phi, \psi \in C_c^\infty(\Bbb R^n)$$, then so is $$\phi\psi$$ and $$\partial_i(\phi\psi) = \phi\partial_i\psi + \psi\partial_i\phi$$. Applying $$(1)$$, this gives $$\int_{-\infty}^\infty \phi\partial_i\psi + \psi\partial_i\phi\ dx_i = 0$$ And then integrating $$0$$ over all the other variables continues to give $$0$$: $$\int_{\Bbb R^n} \phi\partial_i\psi + \psi\partial_i\phi\ |dx| = 0$$ $$\int_{\Bbb R^n} \phi\partial_i\psi \ |dx|= - \int_{\Bbb R^n}\psi\partial_i\phi\ |dx|\tag2$$
Finally, if $$\alpha$$ is a multi-index with $$m = |\alpha|$$, then there is a sequence $$\{i_j\}_{j = 1}^m \subseteq \{1, ..., n\}$$ such that $$D^\alpha\phi = \partial_{i_1}\partial_{i_2}...\partial_{i_m}\phi$$. Hence $$m$$ applications of $$(2)$$ gives $$\int ( \partial_{i_1}...\partial_{i_m}\phi)\psi\ |dx| = (-1)^m\int \phi(\partial_{i_m}...\partial_{i_1}\psi)\ |dx|$$ $$\int_{\Bbb R^n} \psi D^\alpha\phi\ |dx| =(-1)^{|\alpha|} \int_{\Bbb R^n} \phi D^\alpha\psi\ |dx|\tag3$$ since the order of the differentiations does not matter.