I have an integral:

$$ I_N=\int_{-\infty}^\infty \frac{ \sum_{i=1}^N \alpha_i x_i^2 }{ \sum_{i=1}^N x_i^2} \prod_{j=1}^N \delta(x_j) dx_j, $$

where $\delta$ is the Dirac delta function. I'm not quite sure how to get the correct result for this integral. I suspect the result should be something like $I_N = \frac{1}{N} \sum_i^N a_i$, but I can't seem to get the 1/N factor right.

As simple examples we have

$$ I_1 = \alpha_1 \int_{-\infty}^\infty \delta(x) dx = \alpha_1, \\ I_2 = \int_{-\infty}^\infty \frac{\alpha_1 x_1^2 + \alpha_2 x_2^2}{x_1^2 + x_2^2} \delta(x_1) \delta(x_2) dx_1dx_2 = a_1+ a_2 ~~ ( ? ), $$ but I'm already stuck on $I_2$ case. Seems that splitting the integrand or not would give me different results. How do I proceed???

  • $\begingroup$ I may be incorrect, but I believe the order of integration matters, so \begin{align} I_N &= \int_{-\infty}^{\infty}\dotsb\int_{-\infty}^{\infty} \frac{\sum_{i=1}^N a_ix_i^2}{\sum_{i=1}^N x_i^2}\prod_{j=1}^N \delta(x_j)\,dx_j\\ &= \int_{-\infty}^{\infty}\dotsb\int_{-\infty}^{\infty} \frac{\sum_{i=1}^N a_ix_i^2}{\sum_{i=1}^N x_i^2}\delta(x_1)\,dx_1\prod_{j=2}^N \delta(x_j)\,dx_j\\ =\dotsb&=\int_{-\infty}^{\infty} \frac{\sum_{i=N}^N a_ix_i^2}{\sum_{i=N}^N x_i^2}\prod_{j=N}^N \delta(x_j)\,dx_j = \int_{-\infty}^{\infty} a_N \delta(x_N)\,dx_N = a_N \end{align} $\endgroup$
    – adfriedman
    Commented Aug 16, 2017 at 6:26
  • $\begingroup$ Where we repeatedly use the dirac property, e.g., $$\int_{-\infty}^{\infty} \frac{\sum_{i=k}^N a_ix_i^2}{\sum_{i=k}^N x_i^2} \delta(x_k)\; dx_k = \frac{a_k(0)^2+\sum_{i=k+1}^N a_ix_i^2}{(0)^2+\sum_{i=k+1}^N x_i^2} = \frac{\sum_{i=k+1}^N a_ix_i^2}{\sum_{i=k+1}^N x_i^2} $$ $\endgroup$
    – adfriedman
    Commented Aug 16, 2017 at 6:31
  • $\begingroup$ Hi, thanks for the response. Yea, that is the cause of my confusion... how can it be that the order of int matters here? I should certainly be able to use commutative of the sum and product in the integrand. If I use that I get either of a_i out as a solution? On the other hand, if I first replace the order of the sum in the denominator and integrals, which I should be able to do since integration is a linear operation, I get as a result $\sum_i a_i$... and so I'm confused what goes wrong there. $\endgroup$
    – z.v.
    Commented Aug 16, 2017 at 11:56
  • $\begingroup$ Already the $I_2$ case has these confusing features... where it looks like the solution could be either $a_1$, $a_2$ or $a_1+a_2$ depending on how one looks at it... so I'm afraid none of these approaches are correct for some reason and I'm missing something more basic. $\endgroup$
    – z.v.
    Commented Aug 16, 2017 at 12:02

2 Answers 2


Taking a geometric approach is a bit tedious, but it seems to give the desired result. I'll frequently use the volumes and surfaces of N-spheres and N-balls throughout this computation.

The object you are integrating is a ratio of two quadratic forms, so we can write it compactly using slightly different notation.

$$\int_{\mathbb R^N}\frac{\vec x^TA\vec x}{\vec x^T\vec x}\delta(\vec x)d\vec x$$

Where $A$ is a diagonal matrix whose diagonal entries are $\alpha_i$, and $\delta$ is a multivariate Dirac delta function. Ordinarily, we could evaluate the integral using the properties of the Dirac delta (often, the equality below is used as a definition):

$$\vec 0\in D\implies\int_Df(\vec x)\delta(\vec x)d\vec x=f(\vec 0)$$

However, in this case $f(0)$ is undefined. This means that we can't generally consider this integral to be well-defined. Luckily, since the rational function of integration is bounded and continuous almost everywhere, we can still integrate it over regions containing the origin, but we'll have to treat the delta a bit more carefully (and perhaps a bit less rigorously).

To begin with, consider the surface of an $N$-sphere or radius $R$ centered at the origin, which I'll denote $\Sigma(R)$, with an associated $N-1$ dimensional volume differential $d\sigma$. We know the volume of this region is the surface volume of an $N$-sphere.


Where $S_{N-1}=\frac{2\pi^{N/2}}{\Gamma(N/2)}$ is the sphere surface constant. Since $\vec x\cdot\vec x= R^2$ everywhere in $\Sigma(R)$, we can write the following integral.

$$\int_{\Sigma(R)}\vec x\cdot\vec x\ d\sigma=S_{N-1}R^{N+1}$$

Using Euclidean coordinates:


$$\int_{\Sigma(R)}x_1^2\ d\sigma+\int_{\Sigma(R)}x_2^2\ d\sigma+...+\int_{\Sigma(R)}x_N^2\ d\sigma=S_{N-1}R^{N+1}$$

Due to symmetry, we know each of the integrals must have the same value.

$$\int_{\Sigma(R)}x_i^2\ d\sigma=\frac{S_{N-1}}{N}R^{N+1}\tag{1}$$

With this identity, we can integrate our function on $\Sigma(R)$.

$$\int_{\Sigma(R)}\frac{\vec x^TA\vec x}{\vec x^T\vec x}d\sigma$$

The denominator is is the constant $R^2$ everywhere in $\Sigma(R)$.

$$=\frac{1}{R^2}\int_{\Sigma(R)}\vec x^TA\vec x\ d\sigma$$


Now we just have a linear combination of the integrals from $(1)$.

$$\int_{\Sigma(R)}\frac{\vec x^TA\vec x}{\vec x^T\vec x}d\sigma=\frac{\sum_{i=1}^N\alpha_i}{N}S_{N-1}R^{N-1}\tag{2}$$

This essentially tells us that the average value of the rational function on $\Sigma(R)$ is the constant $\frac{\sum_{i=1}^N\alpha_i}{N}$ for any $R>0$. Now if we let $B(R)$ be a ball of radius $R$ centered at the origin, we can integrate the rational function on $B(R)$ by switching to polar coordinates.

$$\int_{B(R)}\frac{\vec x^TA\vec x}{\vec x^T\vec x}d\vec x=\int_0^R\int_{\Sigma(r)}\frac{\vec x^TA\vec x}{\vec x^T\vec x}d\sigma\ dr$$

Using $(2)$:


The integral is simply the volume of an $N$-sphere, which we can write using the volume constant $V_N=\frac{\pi^{N/2}}{\Gamma(N/2+1)}$.

$$\int_{B(R)}\frac{\vec x^TA\vec x}{\vec x^T\vec x}d\vec x=\frac{\sum_{i=1}^N\alpha_i}{N}V_Nr^N\tag{3}$$

We can think of the Dirac delta as the limit of a sequence of symmetric distributions centered about the origin that integrate to $1$. In particular, consider the following set of distributions:

$$\Delta_R(\vec x)=\begin{cases} \frac{1}{V_NR^N} & \vec x\in B(R) \\ 0 & \vec x\notin B(R) \end{cases}$$

Each of these has the properties mentioned above, and additionally they become increasingly localized around the origin as $R\to 0^+$. Because of this, I'll claim that the following definition is equivalent to the other definitions of the multivariate Dirac delta. (this can be justified more thoroughly, but I'll just note that both will converge to $f(\vec 0)$, provided $f$ is continuous there.)

$$\int_Df(\vec x)\delta(\vec x)d\vec x\equiv\lim_{R\to 0^+}\int_Df(\vec x)\Delta_R(\vec x)d\vec x$$

Importantly, this definition no longer requires that $f$ be continuous at $\vec 0$. We can therefore use it to evaluate the integral of interest.

$$\int_{\mathbb R^N}\frac{\vec x^TA\vec x}{\vec x^T\vec x}\delta(\vec x)d\vec x=\lim_{R\to 0^+}\int_{\mathbb R^N}\frac{\vec x^TA\vec x}{\vec x^T\vec x}\Delta_R(\vec x)d\vec x$$

$$=\lim_{R\to 0^+}\frac{1}{V_NR^N}\int_{B(R)}\frac{\vec x^TA\vec x}{\vec x^T\vec x}d\vec x$$

Noticing that the integral above appears in $(3)$:

$$=\lim_{R\to 0^+}\frac{\sum_{i=1}^N\alpha_i}{N}$$

$$\int_{\mathbb R^N}\frac{\vec x^TA\vec x}{\vec x^T\vec x}\delta(\vec x)d\vec x=\frac{\sum_{i=1}^N\alpha_i}{N}$$

The reason this result is "not rigorous" is because treating the Dirac delta as a limit of distributions is very problematic here. If $f$ is continuous at the origin then the equality

$$\int_Df(\vec x)\delta(\vec x)d\vec x=\lim_{R\to 0^+}\int_Df(\vec x)\Delta_R(\vec x)d\vec x$$

holds or a wide class of well-behaved distributions. However, when we allow $f$ to be discontinuous at the origin, different distributions will give different results. In general, I believe the following can be derived.

$$\liminf_{\epsilon\to 0^+}\{f(\vec x):|\vec x|<\epsilon\}\le\lim_{R\to 0^+}\int_Df(\vec x)\Delta_R(\vec x)d\vec x\le\limsup_{\epsilon\to 0^+}\{f(\vec x):|\vec x|<\epsilon\}$$

Thus a different choice of distributions could have resulted in a result of $\min\{\alpha_i\}$ or $\max\{\alpha_i\}$. If we arbitrarily limit ourselves to spherically symmetric distributions, the definition is no longer inconsistent, but we now aren't talking about the standard delta function, but an entirely new function that no longer "sees" $f(0)$, but instead the spherically symmetric average of $f$ in the vicinity of $0$. This function is equivalent to the delta for continuous functions and defined for all locally bounded almost everywhere continuous function. By using it, we aren't computing the integral you posed (which is ill-defined), but rather a very similar looking, but arbitrarily chosen integral. Whether this result is useful at all depends on where the integral comes from.

  • $\begingroup$ It is nice that a delta function may be defined so that this integration may take place, but it does not explain why the delta may not be split into a product with respect to each variable. As far as I can tell the reason is due to the essential discontinuity at $0$. The product measure of 1 dimensional deltas is generally defined for compactly supported continuous functions; this is neither, $\endgroup$
    – adfriedman
    Commented Aug 16, 2017 at 18:07
  • $\begingroup$ As far as I can tell, many definitions of the delta function don't even make sense for this problem. I used the limit of distributions approach because it allows you loosen the smoothness requirements without causing issues. It's possible that this "generalization" causes other definitions to lose equivalence. $\endgroup$
    – Kajelad
    Commented Aug 16, 2017 at 18:23
  • 1
    $\begingroup$ thanks! It is quite an instructive solution! $\endgroup$
    – z.v.
    Commented Aug 16, 2017 at 18:32
  • $\begingroup$ As far expressing the single multivariate delta as a product of single variable deltas, we could treat each $\delta(x_i)$ as a Gaussian distribution with standard deviation $\sigma$, and take $lim_{\sigma\to 0}$ (it is necessary to "shrink" the distributions simultaneously) Their product would be a multivariate Gaussian, which would still have the necessary symmetry. $\endgroup$
    – Kajelad
    Commented Aug 16, 2017 at 19:10

I am afraid any quantity such as $$ I_N=\int_{-\infty}^\infty \frac{ \sum\limits_{i=1}^N \alpha_i x_i^2 }{ \|x\|^2} \prod_{j=1}^N \delta(x_j) dx_j $$ where $$\|x\|^2=\sum\limits_{i=1}^N x_i^2$$ can only be given a meaning by awfully nonrigorous methods since the function to be integrated, namely, $$\frac{ \sum\limits_{i=1}^N \alpha_i x_i^2 }{\|x\|^2}$$ is not even defined at the unique point which is "seen" by the Dirac measure, being given at this point by a typical undeterminate ratio $$\frac00$$ However... let us agree that this undefined quantity satisfies the following three properties, which seem rather minimal requisites for any meaningful interpretation of $I_N$:

  1. By symmetry, for every $1\leqslant i\ne k\leqslant N$, $$\int_{-\infty}^\infty \frac{ x_i^2 }{\|x\|^2} \prod_{j=1}^N \delta(x_j) dx_j=\int_{-\infty}^\infty \frac{ x_k^2 }{\|x\|^2} \prod_{j=1}^N \delta(x_j) dx_j$$
  2. By linearity, $$\int_{-\infty}^\infty \frac{ \sum\limits_{i=1}^N \alpha_i x_i^2 }{\|x\|^2} \prod_{j=1}^N \delta(x_j) dx_j=\sum_{i=1}^N\alpha_i\int_{-\infty}^\infty \frac{x_i^2 }{\|x\|^2} \prod_{j=1}^N \delta(x_j) dx_j$$
  3. By pure logic, $$\int_{-\infty}^\infty \frac{ \sum\limits_{i=1}^N x_i^2 }{\|x\|^2} \prod_{j=1}^N \delta(x_j) dx_j=\int_{-\infty}^\infty \frac{\|x\|^2} {\|x\|^2} \prod_{j=1}^N \delta(x_j) dx_j=1$$

Then, using only 1.-2.-3., one can easily "prove" that $$I_N=\frac1N\sum_{i=1}^N\alpha_i$$

  • $\begingroup$ Thanks! At point 2. on the rhs we should have $\alpha_k^2 \to \alpha_k$. Could you maybe say a bit more rigorously why zero point is exactly problematic and not integrable? Or maybe better phrased, when/why this result makes sense? $\endgroup$
    – z.v.
    Commented Aug 16, 2017 at 18:29
  • $\begingroup$ "Thanks!" You are welcome. "At point 2. on the rhs we should have α2k→αk." Indeed, well spotted. "Could you maybe say a bit more rigorously why zero point is exactly problematic and not integrable?" Why zero is a problem is explained (did you miss the 0/0 episode?). But please note that the whole point of my answer is that the notation is not rigorous. "Or maybe better phrased, when/why this result makes sense?" "Why" is in my points 1.-2.-3. "When" includes the case at hand. If you have a more general problem in mind, please post it as another question. $\endgroup$
    – Did
    Commented Aug 16, 2017 at 19:35
  • $\begingroup$ hm... ok let me try maybe this way; this solution seems to be correct in the sense that one obtains it using seemingly different methods (e.g. solution by Kajelad). But for example, if I'd use $1/||x|| = \lim_{\epsilon\to0 }1/(||x||+\epsilon)$ and change $\epsilon \to 0$ limit and integration order I'd get zero as a solution which implies this operation is not allowed for some reason in this case. So there is a sense in which the solution above is less nonrigorous than this one... but I guess what is implied here is that it might be wiser not to speak in that terms. $\endgroup$
    – z.v.
    Commented Aug 16, 2017 at 20:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .