Converting a limit into an integral.

When we write $$\lim_{n\to \infty} \sum_{I=1}^{n} f \left(a+ \frac{(b-a)}{n} i \right) \frac{(b-a)}{n} = \int_{a}^{b} f(x) dx$$ I really get a very big doubt about what is $$\displaystyle f(x)$$. And most importantly what is $x$? Is $x$ the whole expression $\left(a+ \frac{(b-a)}{n}i\right)$ or $i \rightarrow x$.

I want to illustrate my problem with help of an example, consider
$$\lim_{n\to \infty} \left ( \frac{1}{\sqrt{n}\sqrt{n+1}} +\frac{1}{\sqrt{n}\sqrt{n+2}} + ... + \frac{1}{\sqrt{n}\sqrt{n+n}} \right ) \\ \lim_{n\to \infty} \sum_{i=1}^{n} \frac{1}{\sqrt{n}\sqrt{n+i}}\\ \lim_{n\to \infty} \sum_{i=1}^{n} \frac{1}{n\sqrt{1+i/n}} \\ \lim_{n\to \infty} \sum_{i=1}^{n} \frac{1}{\sqrt{1+i/n}} \frac{1}{n} ~~~~~~~~~~~~~~~~~~~~(1)$$.

Now, how can we write the last expression into an integral. From the actual expression of Riemann sum (the one I have written at top) we can infer by direct comparison that $$\frac{(b-a)}{n} \rightarrow \frac{1}{n}$$ and hence $b-a = 1$ and from the input of the function in Riemann sum expression we can infer, again, by direct comparison that $$\left( a +\frac{(b-a)}{n}i \right) \rightarrow \left(1 + i/n \right)$$ and therefore, I conclude that $a=1$ and therefore $b=2$. But what is the function? What is $f(x)$? Is $f(x) = \frac{1}{x}$, here I have assumed that in $\frac{1}{\sqrt{ 1+i/n}}$ the whole thing inside the radical corresponds to $x$.

greg1313

Forum Staff
$$\displaystyle \int_0^1\frac{1}{\sqrt{1+x}}\,dx=2\sqrt2-2$$

You could choose different functions for $f(x)$ and that would change the bounds of integration, but the answer would be the same. I chose the above because it's easy to integrate.

Here's a reference I found to be very helpful.

In you $f(x)$ What is it that you have replaced by $x$ in the expression $\frac{1}{\sqrt{1+i/n}}$ ? It seems to me that you have replaced $i/n$ by $x$, but why?

The link that you have shared says clearly that $c_i= a + \frac{b-a}{n}i$ and hence I think $c_i$ become $x$ in the integral.

In the example I gave, $c_i=a+\frac{b-a}{n}i=0+\frac{1-0}{n}i=\frac in$. So yes, $c_i$ becomes $x$.
You could also choose $c_i=1+\frac{2-1}{n}i$ which gives $\int_1^2\frac{1}{\sqrt{x}}\,dx=2\sqrt2-2$