About Riemann sums.

162 Views Asked by At

Indeed, consider the function $F(x)=\dfrac{\sin(x)}x$ on the interval $[0,\pi]$, and the partition $\left\{\dfrac{k\pi}n,k\in[1,n]\right\}$ of $[0,\pi]$. So the Riemann sums $$\dfrac\pi n\left( \dfrac{\sin\left(\dfrac\pi{2n}\right)}{\dfrac\pi{2n}} + \ldots + \dfrac{\sin\left(\dfrac{(2n-1)\pi}{2n}\right)}{\dfrac{(2n-1)\pi}{2n}} \right)$$ converges to $\displaystyle\int_0^\pi F(x)\,\mathrm dx$.

This ia a description in http://www.sosmath.com/fourier/fourier3/gibbs.html. Is the description of Riemann sums right? I don't think it is right. I think it is from $\frac{\pi}{n}$ to $(n-1)\frac{\pi}{n}$.

1

There are 1 best solutions below

0
On

Generalities: We review the definition of Riemann sum for the function $f(x)$ over the interval $[a,b]$, where $a\lt b$.

First we take points $a=x_0\lt x_1 \lt x_2\lt \cdots \lt x_n=b$. Suppose that for every with $1\le i\le n$, we choose a point $w_i$ in the interval $[x_{i-1}, x_{i}$. Then $$(x_1-x_0)f(w_1)+(x_2-x_1)f(w_2)+(x_3-x_2)f(w_3)+\cdots +(x_n-x_{n-1}f(w_{n})$$ is a Riemann sum for our function.

Often the $x_i$ are equally spaced. Then $x_{i}-x_{i-1}=\frac{b-a}{n}$, and the Riemann sum takes the simpler form $$\frac{b-a}{n}\left(f(w_1)+f(w_2)+f(w_3)+\cdots +f(w_{n})\right).$$

You have met fairly often the special case where $w_i$ is chosen to be the left end of the interval $[x_{i-1},x_{i}]$. This is called a left Riemann sum. But we can alternately choose $w_i$ to be the right end of the interval for all $n$. That's the right Riemann sum.

In general, we can choose $w_i$ arbitrarily in the appropriate interval. We need not choose the point $w_i$ by the same "rule" in every interval. The choice of $w_i$ is absolutely free, as long as each is in the correct interval.

This particular case: In this case, the authors have used a rule for picking the $w_i$. Each $w_i$ is the midpoint of the appropriate interval. Actually, for numerical purposes, that's often a good idea, for then the value $f(w_i)$ is more likely to be close to the "average" value of $f$ in that interval. However, here the purpose is not numerical.

Let's do the details in this case. We have $a=0$ and $b=\pi$. So $x_k=\frac{k \pi}{n}$.

The midpoint of the interval $[x_{i-1},x_{i}]$ is then $\frac{1}{2n}\left ((i-1)\pi +i\pi \right)$. This simplifies to $\frac{(2i-1)\pi}{2n}$.

So we have chosen $w_i=\frac{(2i-1)\pi}{2n}$.

Finally, add up $i=1$ to $n$. The first evaluation point $w_1$ is $\frac{\pi}{2n}$, the second is $\frac{3\pi}{2n}$, and the last evaluation point $w_n$ is $\frac{(2n-1)\pi}{2n}$, exactly as in the formula you quoted.