# Integration by parts involving the delta function

Often in physics we integrate by parts $$\int_{x_0}^{x_1} f(x) \frac{d}{dx}( \delta(x-y))dx$$

by:

$$=[f(x) \delta(x-y)]_{x_0}^{x_1} - \int_{x_0}^{x_1} \delta(x-y) \frac{df}{dx} dx$$.

I have a really simple question, how can we assume that $$[f(x) \delta(x-y)]_{x_0}^{x_1}=0$$?

Intuitively the delta function is zero except for at $$x=y$$, but what if either $$x_0$$ or $$x_1$$ was equal to y?

Is the answer simply 'we must assume separately that $$x_0,x_1 \neq y$$, or is there something obvious that I'm missing, or is there some measure theory reason why we can say it is zero?

• I would strive to make sure $x_0,x_1\neq y$ whenever doing an integral like this Commented Oct 14, 2021 at 20:07
• When using delta functions one always integrates over the entire real line, and against test functions that vanish at infinity, so the integrated out term is alsway zero. If you are needding to worry abou such terms you need to define a different distribution. Commented Oct 14, 2021 at 20:07
• @mikestone the construction is valid even if we do not integrate over the entire real line, is it not? Commented Oct 14, 2021 at 20:08
• @Quantum Mechanic. If you want to use a finite interval I think you need to redefine your space of test functions. The derivative of the delta is defined by the "integration by parts" without a boundary term. Commented Oct 14, 2021 at 20:10
• Would Mathematics be a better home for this question? Commented Oct 14, 2021 at 20:48

The thing to understand about delta functions is that they are essentially shorthand for a recipe. When we write $$\int_\mathbb R f(x) \delta(x-y) \mathrm dx = f(y)$$ we should understand this as being true by definition; we don't actually perform the integral on the left-hand side, because $$\delta$$ isn't really a function. In that sense it is a convenient shorthand for the recipe "evaluate the function $$f$$ at the point $$y$$."

On the other hand, you may have seen$$^\dagger$$ that the delta function can be understood in some sense as the limit of a sequence of e.g. normalized gaussians of decreasing width and increasing height. Letting $$g_\epsilon(x):= \frac{1}{\epsilon\sqrt{2\pi }} e^{-x^2/2\epsilon^2}$$, one sometimes says that $$\delta(x-y) \overset{?}{:=}\lim_{\epsilon\rightarrow 0} g_\epsilon(x-y) \qquad (\star)$$ On its face, this doesn't make much sense, since this limit obviously fails to exist when the argument of $$g_\epsilon$$ is equal to zero. However, we define it via integration against a so-called test function. We first consider a vector space of "well-behaved" functions $$\mathscr F$$; for example, $$\mathscr F$$ is commonly taken to be the space of all smooth functions with compact support. From there, we can understand the aforementioned definition as follows:

$$\int_\mathbb R f(x) \delta(x-y)\mathrm dx := \lim_{\epsilon \rightarrow 0} \int_{\mathbb R} f(x) g_\epsilon(x-y) \mathrm dx$$

Note the subtle trickery here - we've moved the limit outside of the integral. In other words, the limit in $$(\star)$$ is to be understood as being taken only after integration against a suitable test function. The limit doesn’t define a function, but rather a procedure.

If the delta function is constructed in this way, the extension to a compact interval is immediate; we simply have that

$$\int_a^b f(x) \delta(x-y) \mathrm dx := \lim_{\epsilon \rightarrow 0}\int_a^b f(x) g_\epsilon(x-y) \mathrm dx = \begin{cases}f(y) & y\in(a,b)\\\frac{1}{2}f(y) & y\in\{a,b\} \\ 0& \text{else}\end{cases} \qquad (\star\star)$$

where the factor of $$1/2$$ at the endpoints is due to the fact that only half of the normalized Gaussian $$g_\epsilon$$ is inside the interval $$[a,b]$$.

This brings us to the derivative of the delta function. We can proceed as before, defining $$\int_{\mathbb R} f(x) \delta'(x-y)\mathrm dx := \lim_{\epsilon\rightarrow 0} \int_\mathbb R f(x) g'_\epsilon(x-y) \mathrm dx \overset{IBP}{=} -\lim_{\epsilon\rightarrow 0} \int_\mathbb R f'(x) g_\epsilon(x-y)\mathrm dx$$ $$= -\int_\mathbb R f'(x)\delta(x-y)\mathrm dx$$

However, when we now attempt to restrict to the compact interval, we have a problem; because the boundary terms appear, we instead find

$$\int_a^b f(x) \delta'(x-y)\mathrm dy = \lim_{\epsilon\rightarrow 0} \bigg[ f(x) g_{\epsilon}(x-y)\bigg]^b_{x=a} - \int_a^b f'(x)\delta(x-y) \mathrm dx$$

If $$y\in\{a,b\}$$, then the limit of the boundary term diverges unless $$f$$ vanishes. As a result, the only way to use this construction to define something like $$\int_a^b f(x) \delta'(x-a)\mathrm dx$$ is to restrict the set of test functions to those which vanish at $$a$$.

In summary, $$\int_\mathbb R f(x) \delta(x-y)\mathrm dx$$ and $$\int_\mathbb R f(x) \delta'(x-y) \mathrm dx$$ should be understood as shorthand for the recipes "evaluate $$f$$ at $$y$$" and "evaluate $$-f'$$ at $$y$$," respectively. Although $$\delta$$ is not a function in its own right, it can be understood as the limit of a sequence of functions $$g_\epsilon$$ where the limit is to be taken after integration against a suitable test function, where the latter is chosen specifically to make the aforementioned limit well-defined.

When we restrict the integration to a compact interval, we don't run into any problems unless the argument of $$\delta'$$ vanishes at one of the endpoints. If this happens, we need to choose the space of test functions to vanish at the problematic endpoint; otherwise the limit doesn't exist, and the "recipe" is nonsensical.

Note finally that we don't actually need to construct the recipe by taking a limit of some $$g_\epsilon$$'s; we might simply define the recipe all by itself as e.g.

$$\int_a^b f(x) \delta'(x-y) := \begin{cases}-f'(y) & y\in(a,b)\\-\frac{1}{2}f'(y) & y\in\{a,b\} \\ 0& \text{else}\end{cases}$$

Of course, if we do this then it renders the answer to this question somewhat trivial.

$$^\dagger$$As per Ruslan's comment, we sometimes call the $$g_\epsilon$$'s nascent delta functions. It is not necessary to use a Gaussian - any sufficiently well-behaved, normalized functions would do. However, the details of the $$g_\epsilon$$'s may have an impact on some subsequent properties e.g. the factor $$1/2$$ in $$(\star\star)$$.

• Note that nascent delta function doesn't have to be a gaussian: it can be any function that integrates to unity and picks out $f(0)$ in the zero-width limit when used as a weight in an integral. Commented Oct 14, 2021 at 22:52
• @Ruslan Yes, thanks for the note, I've added that clarification to my answer. Commented Oct 14, 2021 at 23:11
• I just want to point out that there isn't any trickery involved, the delta function is rigorously defined as a generalised function, otherwise known more succintly as a distribution - more or less by your definition. Commented Oct 14, 2021 at 23:24
• @MoziburUllah Right. By “trickery,” I was referring to the $\lim$ written in $(\star)$, which isn’t meant in the usual sense, but rather is meant to be moved outside of a suitable integral before being evaluated. I didn’t mean that there was anything questionable about the delta distribution or any of the rigorous ways to construct it. Commented Oct 14, 2021 at 23:33
• @ApoorvPotnis 1. No, the second expression you wrote is perfectly well-behaved unless $y=a$ or $y=b$, in which case you need to restrict the domain of the distribution. 2) Yes, essentially. Commented Aug 29, 2023 at 23:59

Intuitively the delta function is zero except for at x=y, but what if...

If this were really true, then there would be no way that "integrating" the delta "function" against another function could have any non-zero results.

Unfortunately "delta function" is a misnomer, since the delta "function" is not really a function, but a functional. A functional takes as input a function and outputs a number.

We pretend that the delta function is actually a function, but only as a convenient fiction...

is there some measure theory reason why we can say it is zero?

As mentioned above, if the delta function truly was equal to zero at all points except one, then it could not integrate to anything other than zero, since a single point has measure zero.