# Riemann sum - integral

Tags:
1. Jan 4, 2017

### Rectifier

The problem
I want to calculate $$\sum^n_{k=1} \frac{4}{1+ \left(\frac{k}{n} \right)^2} \cdot \frac{1}{n}$$ when $n \rightarrow \infty$

The attempt
$\sum^n_{k=1} \underbrace{f(\epsilon)}_{height} \underbrace{(x_k-x_{k-1})}_{width} \rightarrow \int^b_a f(x) \ dx$, when $n \rightarrow \infty$ $n=$amount of rectangles and $e$ is the height of a single rectangle on a specific sub-interval $k$.

I set $f(x)=\frac{4}{1+ \left(x \right)^2}$ and then for some reason the suggestion in my book is to set $x_k = \frac{k}{n}$ but I don't understand why.

I need help with calculating the end-points for the integral $a$ and $b$ later too.

Pleas help.

2. Jan 4, 2017

### Ray Vickson

Write out the sum in detail (not using summation notation $\sum$) and see why the sum is an approximation to a Riemann integral.

3. Jan 4, 2017

### Staff: Mentor

I can understand why $x_k=\frac{k}{n}$ makes sense, for one wants to have $\Delta x = \frac{1}{n}$. But how would you plan to deal with the $k$ in $f(\frac{x}{k})$ in your setup?

4. Jan 4, 2017

### Rectifier

$\sum^n_{k=1} \frac{4}{1+ \left(\frac{k}{n} \right)^2} \cdot \frac{1}{n} = \frac{4}{1+ \left(\frac{1}{n} \right)^2} \cdot \frac{1}{n} + \frac{4}{1+ \left(\frac{2}{n} \right)^2} \cdot \frac{1}{n} + ... + \frac{4}{1+ \left(\frac{n}{n} \right)^2} \cdot \frac{1}{n}$

I have no idea how to continue.

Last edited: Jan 4, 2017
5. Jan 4, 2017

### Rectifier

I am not sure of what you mean by $f(\frac{x}{k})$

6. Jan 4, 2017

### Staff: Mentor

You wrote $f(x)=\frac{4}{1+(x)^2}$ so your sum is $\sum_{k=1}^{n}f(\frac{k}{n})\cdot \frac{1}{n}$. I don't see how this helps.
The setting $x_k=\frac{k}{n}$ results in $\sum_{k=1}^{n}f(x_k)\cdot (x_k-x_{k-1})$ which should look familiar to you.

7. Jan 4, 2017

### Rectifier

Yes that looks familiar indeed but how could I have come up with that by myself without "cheating" and looking on the suggestions-page for this problem? Is there something that I should take into consideration if I were to receive sums like these in the future? Sorry if that is a weird question.

8. Jan 4, 2017

### Staff: Mentor

It's not weird, it's only difficult to answer. I don't know about procedures that automatically lead to results in general. Unfortunately, for otherwise ... Anyway. You normally gain these abilities by experience, trial and error, a lot of reading, a lot of practice, sometimes by pure luck, and some problems might stay difficult. If one way doesn't lead to somewhere, simply try another. It's also a matter of personal attributes. Some are better at recognizing patterns than others, but even this could heavily depend on the patterns in question.

In this special case a possible line of thought could have been:

$S(n) = \sum_{k=1}^n \text{ sth. } \cdot \frac{1}{n}$ is a constant and a sum of something added $n-$times over equidistant points with interval length $\frac{1}{n}$. The context of Riemann sums might help a lot here. Otherwise one could also conclude: Now if $n$ is increasing, then the intervals become shorter and shorter, so integrals are a natural association. The crucial point here is to regard $\frac{1}{ n}$ as the length of an interval. Once you have this, you can proceed: What are the boundaries of these intervals? What happens with the something at those points? And so on.

Another way might have been to start with the setting $x(k)=\frac{k}{n}$ because this is, what really disturbs. The next question here would be: What is $\frac{1}{n}$ in terms of these $x(k)$? I think, your only mistake has been by setting $x=\frac{1}{n}$ because it ignores $k$ on which $x$ also depends on.

These are different ways to look at the problem: by a) context (Riemann sums), b) intervals (of length $\frac{1}{n}$) or c) the function (with the disturbing $\frac{k}{n}$). You just looked at it one way and got stuck. The only advice that comes to mind and often helps is:
Approach it from another side and only drop information if you're sure you won't need it anymore.
In your case, the fact, that $x=x(k)=x_k$; but it applies to anywhere else as well: estimations, round ups, the use of unities and many more.

9. Jan 4, 2017

### Ray Vickson

Practice and experience. Do lot of problems until the methods become familiar. Besides, I would be very surprised if your textbook did not have already some examples of that type, so you just need to read carefully and fully, and try to reproduce what the book does.

10. Jan 4, 2017

### Rectifier

This is my first encounter with Riemann sum like that other were constant.

EDIT:
Wait, I have not had any encounters with Riemann sums at all in this book. I have had an introduction to the concept with a picture with rectangles under the curve with varying width without any examples. The other integrals were step-functions as seen in my last post. Next chapter is about Generalized integrals or something like that.

11. Jan 4, 2017

### Rectifier

Thank you for your help so far everyone it has been helpful in understanding this problem better.

Now to the last issue: how do I calculate the end-points of the integral?

I know that the length of the interval is $b-a$ and $\frac{b-a}{n}$ represents the amount of sub-intervals. Unfortunately that is not making it easier to continue :(

12. Jan 4, 2017

### Staff: Mentor

I haven't done the exercise, so I don't know. But how about my advice? Try it from the other side.
How is $\int_a^bf (x)dx$ defined with Riemann sums? Write the down the limit, compare it with your sum and see where it leads you to. Just have an eye on the indices, i.e. whether it starts at $0$ or $1$.

13. Jan 4, 2017

### Rectifier

How should I write down the limit? Like I did in post #4 and the try to predict what happens when $n \rightarrow \infty$?

14. Jan 4, 2017

### Staff: Mentor

No. I meant the integral. How does your book define the integral? $\int_a^b f(x)dx = \lim_{n\rightarrow\infty} \sum_{k=1}^{n} f(t_k)(x_k-x_{k-1})$ with $t_k \in [x_{k-1},x_k]$? How do $a$ and $b$ come into play here?

15. Jan 4, 2017

### Rectifier

Yes. and also $a=x_0$ and $b=x_n$ but I don't know how to find $x_0$ and $x_n$?

16. Jan 4, 2017

### Staff: Mentor

C'mon. $x_k=\frac{k}{n}$ and you try to find $x_0$ and $x_n$?

17. Jan 4, 2017

### Rectifier

0 and 1 but the problem is that I should start my sum at k=1 ($k=1$) or doesn't that matter?

18. Jan 4, 2017

### Staff: Mentor

If you partition an interval into $n$ sections, you will get $n+1$ of boundary points. Think as if you don't have to calculate the sum. Calculate the integral instead. Thus you start at the interval, cut it into pieces and write it down as in #14. Formally it might be some more things to do, because we have $f(x_k)(x_k-x_{k-1})$ instead of $f(t_k)(x_k-x_{k-1})$. Therefore I asked about your definition. You know, the stuff with upper and lower sums, or infima and suprema or similar. And $a=0$ doesn't mean $f(a)=0$. You could also make a drawing to see what has to be added.

Last edited: Jan 4, 2017
19. Jan 4, 2017

### Ray Vickson

You must be using one very weird textbook. In previous threads you were doing integration by going into the complex plan, doing integrals by partial fractions, etc., and now you are saying the book has not really even defined integrations properly yet (or something like that).

All I can advise is this: if your book is pretty bad, go to the library and take out a better book (or, nowadays, look topics up via Google, etc.) A google search on "riemann integral"; for example, turns up numerous articles, but some of them are quite formal and "abstract", although the article
http://www.geometer.org/mathcircles/riemannint.pdf
is reasonably elementary and covers the basics in a quite readable way. There are others like that as well.

Last edited: Jan 4, 2017
20. Jan 5, 2017

### Rectifier

Thank you for your suggestion. Yes, I was doing indefinite integrals (primitive functions) but not integrals with partitions like now.