# Turning a riemann sum into a definite intergral

I have this specific riemann sum, and I can't find a way to turn it into a definite integral.

I understand this is considered to be pretty basic. Does anyone mind explaining the way of solution for me? Thanks!

The integral:

$$\lim_{n \to \infty} \space {1 \over n^2 }\sum_{k=1}^n \space k\sin\left({\pi k\over n} \right)$$

The dictionary is that $\frac kn$ corresponds to $x$ and $\frac1n$ corresponds to $\mathrm dx$:

$$\begin{array}{cl} & \displaystyle \lim_{n \to \infty} \frac 1 {n^2} \sum_{k=1}^n k \sin \left( \frac {\pi k} n \right) \\ =& \displaystyle \lim_{n \to \infty} \color{red}{\frac 1 n} \sum_{k=1}^n \color{blue}{\frac kn} \sin \left( \frac {\pi \color{blue}k} {\color{blue}n} \right) \\ =& \displaystyle \int_0^1 \color{blue}x \sin (\pi \color{blue}x) \ \color{red}{\mathrm dx} \\ =& \displaystyle \frac12 \int_0^1 x \sin (\pi x) \ \mathrm dx + \frac12 \int_0^1 x \sin (\pi x) \ \mathrm dx \\ =& \displaystyle \frac12 \int_0^1 x \sin (\pi x) \ \mathrm dx + \frac12 \int_0^1 (1-x) \sin (\pi (1-x)) \ \mathrm dx \\ =& \displaystyle \frac12 \int_0^1 x \sin (\pi x) \ \mathrm dx + \frac12 \int_0^1 (1-x) \sin (\pi x) \ \mathrm dx \\ =& \displaystyle \frac12 \int_0^1 \sin (\pi x) \ \mathrm dx \\ =& \displaystyle \frac12 \left[ -\frac1\pi \cos(\pi x) \right]_0^1 \\ =& \dfrac1\pi \end{array}$$

• I don't get how that ${1\over n}$ turn into $dx$ I'm sorry, I'm a beginner to intergrals – Guysudai1 May 27 '18 at 18:46
• The interval $[0,1]$ is divided to $n$ equal parts, so $\Delta x=\frac1n$, and it will (formally) become the $dx$ part of the integral. – Berci May 27 '18 at 18:49
• How did u turn the $x \sin( \pi x )$ into $(1-x) \sin( \pi (1 - x))$ ? – Guysudai1 May 28 '18 at 18:50
• @fdsaddsa it's the $a+b-x$ substitution, i.e. I substitute $x$ by $0+1-x$ (the lower limit and the upper limit) – Kenny Lau May 28 '18 at 21:13