# Calculating this Riemann sum limit

Calculate the limit $$\lim_{n\to \infty} {\sum_{k=1}^{n} {\left(\frac{nk-1}{n^3}\right) \sin\frac{k}{n}}}$$

How exactly do we calculate this limit of the Riemann sum? I am never able to find what is the partition. I know that our $f(x)$ is $\sin(x)$.

-

Rewrite the sum as

$$\frac{1}{n} \sum_{k=1}^n \left ( \frac{k}{n} - \frac{1}{n^2}\right ) \sin{\left ( \frac{k}{n}\right)}$$

As $n \to \infty$, the $1/n^2$ term vanishes and we are left with

$$\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^n \frac{k}{n} \sin{\left ( \frac{k}{n}\right)}$$

which is the Riemann sum for the integral

$$\int_0^1 dx \, x \, \sin{x}$$

NB in general

$$\int_a^b dx \, f(x) = \lim_{n \to \infty} \frac{b-a}{n} \sum_{k=1}^n f\left (a + \frac{k}{n} (b-a) \right)$$

when the integral on the left exists.

I was asked to expand upon the claim that $1/n^2$ vanishes. If we use this term, we see that its contribution is

$$\frac{1}{n^3} \sum_{k=1}^n \sin{\left ( \frac{k}{n}\right)}$$

which, in absolute value, is less than $(1/n^3) (n) = 1/n^2$, which obviously vanishes as $n \to \infty$.

-
Could you be more detailed about the claim "the $1/n^2$ term vanishes"? A simple estimation would do, say $|\sin x|\leq 1$, but still, I think it should be written out, since people (not you, but in general) tend to hand wave limits that have $n$ both in the summand and in the summation sign, and fall into snake pits. –  Pedro Tamaroff Jul 9 '13 at 18:50
@PeterTamaroff: you are as always too kind. I hope my addendum address your concern. –  Ron Gordon Jul 9 '13 at 18:58
Of course. I cannot upvote now, used up all my votes! –  Pedro Tamaroff Jul 9 '13 at 18:58
@PeterTamaroff: approval from you is good enough in my book. –  Ron Gordon Jul 9 '13 at 18:59
@RonGordon For your answer (after "NB In general..."), did you mean to put: $$\dfrac{b-a}{n}$$ instead of $1/n$? –  Adriano Jul 9 '13 at 19:23

Recall that if $f$ is integrable on $[a,b]$, then:

$$\int_a^b f(x)~dx = \lim_{n\to \infty} \dfrac{b-a}{n}\sum_{k=1}^n f \left(a + k \left(\dfrac{b-a}{n}\right) \right)$$

Notice that: $$\sum_{k=1}^{n} {\left(\frac{nk-1}{n^3}\right) \sin\frac{k}{n}} = \sum_{k=1}^{n} {\left(\dfrac{k}{n^2} - \dfrac{1}{n^3}\right) \sin\frac{k}{n}} = \dfrac{1}{n}\sum_{k=1}^{n} \dfrac{k}{n}\sin\frac{k}{n} - \dfrac{1}{n^3}\sum_{k=1}^{n} \sin\frac{k}{n}$$

Hence, by letting $a=0$ and $b=1$ and considering the functions $f(x)=x \sin x$ and $g(x) = \sin x$, we obtain: \begin{align*} \lim_{n\to \infty} {\sum_{k=1}^{n} {\left(\frac{nk-1}{n^3}\right) \sin\frac{k}{n}}} &= \lim_{n\to \infty} \left[ \dfrac{1}{n}\sum_{k=1}^{n} \dfrac{k}{n}\sin\frac{k}{n} - \dfrac{1}{n^3}\sum_{k=1}^{n} \sin\frac{k}{n} \right] \\ &= \lim_{n\to \infty} \left[ \dfrac{1}{n}\sum_{k=1}^{n} \dfrac{k}{n}\sin\frac{k}{n} \right] - \lim_{n\to \infty}\left[\dfrac{1}{n^2} \right] \cdot \lim_{n\to \infty} \left[\dfrac{1}{n}\sum_{k=1}^{n} \sin\frac{k}{n} \right] \\ &= \int_0^1 x \sin x~dx - 0 \cdot \int_0^1 \sin x~dx \\ &= \int_0^1 x \sin x~dx\\ &= \left[\sin x - x\cos x \right]_0^1\\ &= \sin 1 - \cos 1\\ \end{align*}

-
The first equation is not entirely clear. The right hand side may exist even when $f$ is not integrable over $[a,b]$. It would be appropriate to write "if $f$ is integrable, then..." –  Pedro Tamaroff Jul 9 '13 at 19:17
It is Ron Gordon's answer, not mine, and yes, I think it is a typo. Good catch. –  Pedro Tamaroff Jul 9 '13 at 19:22