# Question from *Spivak Calculus*, Ch.22 - #9 i) - relationship between sequences and integration.

The following is a question from Spivak's Calculus, it is in the chapter on sequences, but it relates them to integrals.

After reading the question and taking in the hint. I went about trying to evaluate the limit. First thing I came up with after a little playing around was what I thought to possibly be a representation of the sequence:

$$a_{n} = \frac{\sum_{i = 1}^{n}e^{\frac{i}{n}}}{n}$$.

Now in the treatment of integrals we had defined the upper and lower sums, so playing with the lower sum to start I started to think about possible intervals as a partition, but since $$n \in \mathbb{N}$$ this somewhat limited me to only choosing a partition of length $$1$$. Thus I would have some lower sums looking like:

$$L(f,P) = \sum_{i=1}^{n}m_{i}(1)$$

where $$m_{i} = \inf\{f(x):n-1 < x < n\}$$. With this idea I thought perhaps I should define $$f(x) = e^{\frac{x}{n}}$$ and work from here. By this point I was struggling to see how the idea of the limit could actually be applied. Fortunately (or not) I have solutions available, the solution states the following:

Here are my issues that I hope to get some clarification on:

1. How do we arrive at using the expression of $$e^{x}$$ ?
2. How did we arrive at using the interval $$[0,1]$$ over the whole integral, yet we are somehow dividing it into $$n$$ equal parts ?

The only thing that makes sense to me out of all this is that taking the limit of the upper and lower sums to infinity will result in the expression of integration (using Riemann sums as well). Everything else has me baffled.

Clearly, $$a_n = \frac{1}{n} \sum_{i=1}^n e^{i/n}$$ is an upper sum. If $$f(x) = e^x$$, then this has the form $$a_n = \frac{1}{n} \sum_{i=1}^n f(i/n)$$ which for the partition of the interval $$[0,1]$$ into $$[0, 1/n]$$, $$(1/n, 2/n]$$, $$(2/n, 3/n]$$, etc., the function is being evaluated at the right endpoints.
• I could see where the upper sum notion comes from (summation starting at $i = 1$). I could also see the reason behind choosing the partition $[0,1]$, but why would we evaluate this at the generic form: $f(x) = e^{x}$ instead of using $e^{\frac{i}{n}}$? – dc3rd Oct 2 '20 at 23:08
• @dc3rd Because $f$ is a function of some continuous variable $x$, which takes on values that are themselves a particular function of the indexing variable $i$ and the limiting variable $n$. If this is confusing to you, choose some function $f(x)$ and write its equivalent definite integral as a limit of an upper sum. For example; what does the integral from $x = 0$ to $x = 1$ of $f(x) = x^3 + 1$ look like as a limit of a sum? – heropup Oct 3 '20 at 0:47
• Sorry it took so long for me to reply, life got in the way. But I began playing around with the function you suggested and I wanted to make sure I am on the right track with it because I have a concern with my expression. To start, I chose a simple partition of length $\frac{1}{n}$. Using this partition I expressed the suggested function as the limit of the sum: $\lim_{n \to \infty}(\frac{1}{n}\sum_{i=1}^{n}(\frac{i}{n})^{3} + 1)$. I did a few terms, but I'm concerned because if I go to infinity the fraction will turn my sum to zero. – dc3rd Oct 5 '20 at 22:54
• @dc3rd That is the correct expression. We can evaluate it as follows: $$\frac{1}{n} \sum_{i=1}^n \left( \frac{i^3}{n^3} + 1 \right) = \frac{1}{n}\left( n + \frac{1}{n^3} \sum_{i=1}^n i^3 \right) = 1 + \frac{1}{n^4} \left(\frac{n(n+1)}{2}\right)^2 = 1 + \frac{(n+1)^2}{4n^2}.$$ Taking the limit as $n \to \infty$ we obtain $1 + \frac{1}{4} = \frac{5}{4}$. – heropup Oct 5 '20 at 22:58
• So if we were to write an upper sum for $e^x$ on $x \in [0,1]$, we would get $$\int_{x=0}^1 e^x \, dx = \lim_{n \to \infty} \frac{1}{n} \sum_{i=1}^n e^{i/n}.$$ If the interval of integration were changed to, say, $x \in [2,5]$, the upper sum becomes $$\int_{x=2}^5 e^x \, dx = \lim_{n \to \infty} \frac{5-2}{n} \sum_{i=1}^n e^{2 + (5-2)i/n}.$$ – heropup Oct 5 '20 at 23:01