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?