To show that function is Riemann Integrable on $[0,1]$ I am having difficulty in understanding this proof. Firstly why is the set $E$ defined? Why is specific value of $\delta$ chosen and about possibility of tags counting twice. Can anyone help me with this?
Thanks

 A: I honestly don't like that proof for a couple of reasons, in particular the fact that the argument depends unnecessarily on the fact that the set $E$ is finite. Here is a different proof of a slightly stronger result, namely that the function $f : [0,1] \to \mathbb{R}$ with $f(1/n)=1$ for each $n$ and $f(x)=0$ otherwise is Riemann integrable with integral zero.
Given any partition of $[0,1]$, the lower sum of $f$ is zero. (The function is nonnegative, and it is zero somewhere on every interval). Now given $\varepsilon > 0$, we will choose a partition to make the upper sum less than $\varepsilon$. First we will make the contribution from near zero less than $\varepsilon/2$; for this we can take the first piece of the partition to be $[0,\varepsilon/2]$. 
Next we will make the rest of the contribution less than $\varepsilon/2$. For this we want to put small intervals around the "spikes" at each $1/n$ on $(\varepsilon/2,1]$. There are only finitely many of these; specifically, there are at most $\frac{2}{\varepsilon}$ of them. As a result, if we choose the interval around each spike to have width at most $\frac{\varepsilon^2}{4}$, then the upper sum from those intervals will be at most $\frac{2}{\varepsilon} \frac{\varepsilon^2}{4}=\frac{\varepsilon}{2}$. Now on the rest of $[0,1]$, the function is zero, so there is no contribution to the upper sum there. Hence the upper sum of this partition is at most $\varepsilon$. So by definition, the Darboux integral exists and is zero. Hence (by a theorem I'm taking as given) the Riemann integral also exists and is zero.
I have deliberately postponed a few technical problems with what I've written. First, the intervals might overlap. Let's check that, and fix it if need be. Suppose $N$ is the largest integer such that $1/N \in (\varepsilon/2,1]$. Then $\frac{1}{N-1} - \frac{1}{N} = \frac{1}{N(N-1)}>\frac{1}{N^2}$ is the smallest distance between two spikes on $(\varepsilon/2,1]$. Now $\frac{1}{N^2}>\frac{\varepsilon^2}{4}$. So there is no problem of overlap between any two subintervals of $(\varepsilon/2,1]$. If $\frac{1}{N}-\frac{\varepsilon^2}{8} < \frac{\varepsilon}{2}$, then we make the left endpoint of that subinterval be $\frac{\varepsilon}{2}$ instead, to avoid any overlap. The moral of this piece of the story is that if we can find a "partition with overlap" which suits our needs, we can always refine it into an ordinary partition.
Second, one of the spikes is at $1$. So that point gets treated a little differently, in that the last point in the partition is $1$, not $1+\frac{\varepsilon^2}{8}$. (Certainly we don't integrate outside the domain.)
Third, if $\varepsilon$ is too big then this procedure might not make sense (for instance you could have $\varepsilon/2>1$, in which case we again leave the domain.) But the fix for that is the usual one: given an arbitrary $\varepsilon > 0$, run the procedure I wrote for $\varepsilon' = \min \{ \varepsilon,1 \}$.
