Suppose I have an integral that's bounded on one (or both) end by (-)infinity. AFAICT, I can't analytically solve this problem, it takes brute force (e.g. using a Left Riemann Sum). I'm having trouble generalizing the algorithm so that it sets the proper subdivisions; I'll either do far too much work to calculate something trivial, or not do nearly enough and have huge aliasing errors.
Answering in any language is cool, but maybe someone with better google-fu can end this quickly. :)
Is what I'm looking for as impossible as trying to measure the British coastline?
There are several ways to proceed, most of which involve trying to understand the behavior of your integrand. Often, there is a transformation x -> z(x) with a finite z(infinity) so you can transform your unbounded integral to a bounded one.
Also, it is often the case that you can analyze the "asymptotic" behaviour of the integrand as x goes to + and - infinity, so you can at least approximately work out the contributions from x>x+ and x< x- and then just do the definite integral between x- and x+.
There are plenty of good books on numerical integration. One that's used a lot in the physical sciences is Numerical Recipes. (Although you should rarely use the code directly!)