Possible Pitfalls when Converting a Infinite Series to a Riemann Integral I am examining an infinite series and am curious to know of any pitfalls when invoking the left hand rectangular approximation formula.
$$\lim_{n\to\infty}\frac {x_1-x_0}{n}\sum_{i=0}^{n-1} f\left(x_0+\frac{x_1-x_0}n i \right)=\int_{x_0}^{x_1} f(x)dx$$
Naively, I would wish that choosing $x_1=n$ and $x_0 = 0$ would imply
$$\lim_{n\to\infty} \sum_{i=0}^{n-1} f(i) = \lim_{n\to\infty} \int_{0}^{n} f(x) dx$$
However, this result is nonsensical unless of course $f(x)$ is composed from step functions of width one. (Unlike the original formula for the left hand rectangular approximation, the second formula forces the width of the rectangles to remain $1$ instead of decaying as $\mathcal{O}\left(\frac{1}{n}\right)$.) Furthermore, the integral test for convergence only ascertains if $\sum_{n=1}^{\infty} f(n) \approx \int_{0}^{\infty} f(x) dx$ converges, not the actually value of the summation.
Question 1: Why is the left hand rectangular approximation formula invalid under the substitution $x_1 = n$? (If anyone has a formal verification of this fact and its implications in existing literature, I would be very grateful.)
Question 2: In my particular case, the formula for $f(i)$ is quite complicated, so I am having great difficulty producing an algebraic substitution capable of rendering it into the form of $f\left(\frac{i}{n}\right)$. Do such difficulties often limit the scope of this approach? I have already proved that my series converges, and had wished to find a means to evaluate its sum.
Note: My question is partly motivated by the solution to the 1970 B1 Putnam problem, which converts an infinite product into a series and evaluates it as a Riemann integral.
 A: I think the problem is the "would imply" before the second equation. Take a look a the first equation:
$$\lim_{n\to\infty}\frac {x_1-x_0}{n}\sum_{i=0}^{n-1} f\left(x_0+\frac{x_1-x_0}n i \right)=\int_{x_0}^{x_1} f(x)dx$$
note that the left hand side (LHS) has two types of variables. You have "dummy variables" or "bound variables" $n,i$. This means that the LHS is NOT a function of $n,i$. The LHS is not something you can evaluate, e.g. as $n=10$. In fact, you can change names of these variables as
$$\lim_{m\to\infty}\frac {x_1-x_0}{m}\sum_{j=0}^{m-1} f\left(x_0+\frac{x_1-x_0}m j \right)=\int_{x_0}^{x_1} f(x)dx$$
and this would not change the value of the expression. Moreover, changing the names of $n,i$ to $m,j$ in the left hand side does not change anything in the right hand side (RHS), mainly because the RHS is not a function of $n,i$ either (since they are bound variables).
On the other hand you have $x_0,x_1$ which are "free variables". This means that the LHS is indeed a function of $x_0,x_1$ and you can evaluate these variables e.g., as $x_0=5, x_1=10$. Note that you can also change names (change $x_0$ to $y_0$ and $x_1$ to $y_1$) but this would require to change names in the right hand side too!
The reason is that the RHS is also a function of $x_0,x_1$. The RHS has only a bound variable which is $x$. Note that we can change $x$ to $y$ (the names) without changing anything else:
$$
\int_{x_0}^{x_1} f(x)dx = \int_{x_0}^{x_1} f(y)dy
$$
That said, lets call the LHS $L(x_0,x_1)=\lim_{n\to\infty}\frac {x_1-x_0}{n}\sum_{i=0}^{n-1} f\left(x_0+\frac{x_1-x_0}n i \right)$ and the RHS $R(x_0,x_1)=\int_{x_0}^{x_1} f(x)dx $. Hence, your equation reads
$$
L(x_0,x_1)=R(x_0,x_1)
$$
Do you want to evaluate $x_0=0,x_1=n$ for some integer $n$? Ok! go ahead:
$$
L(0,n)=R(0,n)=\int_{0}^{n} f(x)dx
$$
Up to know, there are no problems. However, the main difference with what you obtained is that we don't have the limit $\lim_{n\to\infty}$ here. Why? because when we evaluated $x_1=n$ for some $n$, this $n$ need not to be the same as the dummy variable $n$ we used inside $L(x_0,x_1)$.
Lets, take a look at $L(0,n)$. Since we insist in evaluating $x_1=n$ with some variable named $n$, we must use another dummy variable for the limit, since these are two different variables. Again: one is a dummy variable which you cannot evaluate and the other is a free variable which you are evaluating. Hence:
$$
L(0,n)=\lim_{m\to\infty}\frac {n}{m}\sum_{i=0}^{m-1} f\left(\frac{n}m i \right)
$$
Is this expression useful for your problem? Probably not. But at least I think this can clarify your Question 1 on how the expressions you derived are incorrect.
Regarding Question 2, converting a general summation, which is not of the form of a Riemann sum, to an integral is certainly not trivial. It is precisely the problem you are describing the main limitation for this approach. I'm not saying it cannot be done, but it might be hard to do it explicitly in most cases. Without looking at your concrete summation problem I cannot help more.
