Let us say I want to compute the following expression by a numerical integration scheme:

$$ I = \int^{-x}_{-\infty} f(x + y) \, \mathrm dy - \int_{\mathbb R}\bigg(f(x+y) -f(x)\bigg)\, \mathrm dy $$ for a range of $x$-values $x \in \mathcal O$ for some $\mathcal O \subset \mathbb R$, and where $f(x)$ is some function such that the integrals are defined.

There is one thing about this keeps confusing me:

If we treated that expression in a `naive', algebraic way, we could decouple the latter integral and get the simpler expression $$ I = \int_{\mathbb R}f(x) \, \mathrm dy - \int^{\infty}_{-x}f(x+y) \, \mathrm dy $$ but clearly, $$ \int_{\mathbb R}f(x) \, \mathrm dy = f(x) \int_{\mathbb R}\, \mathrm dy = \infty $$ so the decoupling does not make sense mathematically. But here is my confusion: when you solve this numerically, everything is discretized into sums, i.e. $I$ becomes one large sum, and in that sense it does not seem to matter whether you decouple the integral or not. How does this work? Will a decoupling affect the result itself or perhaps just the convergence rate?

  • 2
    $\begingroup$ Be careful about formally simplifying possibly infinite quantities. If there's two ways of computing a single quantity, and both give different answers, that's a sure sign that one of the ways wasn't mathematically valid. In particular, for unbounded integration, quadrature yields a series, not a finite sum, and if that series is not absolutely convergent, you are not allowed to rearrange it (without changing the value). $\endgroup$ Aug 20, 2015 at 23:11

1 Answer 1


Your second integral in the first expression for $I$ is ill-defined unless $\lim_{y\to\pm\infty}f(x+y)=f(x)$ (necessary so that it converges), and the first integral is ill-defined unless $\lim_{y\to-\infty}f(x+y)=0$, which proves the expression is well-defined only if $f(x)=0$. So there is absolutely no contradiction there.

If, however, $f(x)\neq 0$, then both expressions for $I$ are undefined.

In general, numerical methods can only be expected to handle well-defined mathematical problems. This here is merely an issue of whether your expression makes sense mathematically.

You may as well just rewrite $$I = -\int_0^\infty f(y)\,dy, $$ since that is what both of your expressions are equal to when they exist, and note that $I$ is independent of $x$.

Note: In principle there is a way to regularize a divergent integral in a meaningful way using some kind of a regularization procedure, but that is not the way to go here, because the purpose of regularization is usually not to deal with integrals like $\int_{\mathbb{R}}1\,dy$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.