Recently I’ve been deriving some integral expressions of the form
$$\int_0^\infty f(x)\,dx$$
that can’t be solved analytically, but can be converted to an infinite sum instead, say,
$$\sum_{n=1}^\infty g(n).$$
My question is, for numerical computation, is one of these forms generally preferred or better for calculation? I know this question is very broad, but I’m curious if there’s a rule of thumb that always applies, or if there’s a set of rules for determining which is better for a given integrand, or if it depends on the computational software, etc.
EDIT:
Based on an example from this recent post of mine:
$$\int_{1}^{\infty} \frac{1}{x\left(e^{a x}-1\right)} d x = \sum_{n=1}^{\infty} E_{1}(a n),$$
($E_1$ is the $n=1$ case of the exponential $E_n$ integrals)
I might start be classifying $f$ as a composition of products of "standard" functions like polynomials, exponentials, and trig functions; and $g$ as a composition of products of "special" functions like the polygamma functions, polylogarithms, exponential integrals, etc.