# Expressing Riemann sums as integrals

$$L_2=\lim_{n→∞}\sum_{k=1}^n\frac{(k-\cos^2(k))^4}{n^5}.$$ My teacher said that when brackets at the numarator is expanded the limit of sum except $$\dfrac{k^4}{n^5}$$ equals $$0$$, so the Riemann sum becomes $$\lim\limits_{n→∞}\sum\limits_{k=1}^n\dfrac{k^4}{n^5}$$. I don't understand this point. Please explain this point. Sorry for my bad English.

$$\sum_{k=1}^{n} k^{j} \leq \int_1^{n} x^{j} dx =\frac {n^{j+1} -1} {j+1}$$ and $$\frac {n^{j+1} -1} {n^{5}} \to 0$$ as $$n \to \infty$$ if $$j <4$$. Hence, when you expand $$(k-\cos^{2}(k))^{4}$$ all terms except $$k^{4}$$ give limit $$0$$. [Note that $$\cos^{2} k \leq 1$$].
$$\sum\frac{(k-\cos^2 k)^4}{n^5}=\sum \left(\frac{k^4-4k^3\cos ^2\left(k\right)+6k^2\cos ^4\left(k\right)-4k\cos ^6\left(k\right)+\cos ^8\left(k\right)}{n^5}\right)$$Every term is involving $$\cos k$$ except the term $$k^4$$. Applying summation and use algebra of limits together with the fact $$\cos k$$ is bounded by $$1$$ to get your result
Since $$\sum_{k=1}^nk^3=\frac{n^2(n+1)^2}4$$ we get \begin{align} \lim_{n\to\infty}\sum_{k=1}^n\frac{\left(k-\cos^2(k)\right)^4}{n^5} &=\lim_{n\to\infty}\sum_{k=1}^n\left[\frac{k^4}{n^5}+O\!\left(\frac{k^3}{n^5}\right)\right]\\ &=\lim_{n\to\infty}\left[\sum_{k=1}^n\frac{k^4}{n^4}\frac1n+O\!\left(\frac1n\right)\right]\\ &=\int_0^1x^4\,\mathrm{d}x+0\\[6pt] &=\frac15 \end{align}