Compute $$\lim\limits_{n\to \infty} \int\limits_0^1 x^{2019} \{nx\} dx,$$ where $\{a\}$ denotes the fractional part of the real number $a$.
I firstly tried to apply the substitution $nx=t$, but the computations didn't look nice, so I couldn't make any further progress. I also tried to use the mean value theorem for integrals, but it was also a dead end.


7 Answers 7


Here is another approach which is somewhat simpler than the one given in another answer here.

I establish that $$\int_{0}^{1}f(x)\{nx\}\,dx\to\frac{1}{2}\int_{0}^{1}f(x)\,dx$$ as $n\to\infty $. The integral on left of above equation can be split as sum of $n$ integrals $$\sum_{k=0}^{n-1}\int_{k/n}^{(k+1)/n}f(x)\{nx\}\,dx=\frac{1}{n}\sum_{k=0}^{n-1}\int_{k}^{k+1}f(t/n)\{t\}\,dt$$ Using mean value theorem for integrals the right hand side of the above equation can be written as $$\frac{1}{n}\sum_{k=0}^{n-1}f(t_k/n)\int_{k}^{k+1}\{t\}\,dt$$ where $t_k\in[k,k+1]$ and since $\{t\} $ is periodic with period $1$ the above reduces to $$\left(\int_{0}^{1}\{t\}\,dt\right)\cdot\frac{1}{n}\sum_{k=0}^{n-1}f\left(\frac{t_k}{n}\right)$$ The integral above is $1/2$ as $\{t\} =t$ if $t\in[0,1)$ and the next factor is Riemann sum for $f$ or $[0,1]$. Thus the above tends to $$\frac{1}{2}\int_{0}^{1}f(x)\,dx$$ Above derivation assume that $f$ is continuous on $[0,1]$. Putting $f(x) =x^{2019}$ we get the desired limit as $1/4040$.

More generally we can use same method to prove that $$\lim_{n\to\infty} \int_{0}^{1}f(x)g(\{nx\})\,dx=\left(\int_{0}^{1}f(x)\,dx\right)\left(\int_{0}^{1}g(x)\,dx\right)$$ where $f$ is continuous on $[0,1]$ and $g$ is of constant sign and Riemann integrable on $[0,1]$.

Going further we can also note that if $g$ is periodic with period $T$ and of constant sign and Riemann integrable on $[0,T]$ and $f$ is continuous on $[0,T]$ then $$\lim_{n\to\infty} \int_{0}^{T}f(x)g(nx)\,dx=\frac{1}{T}\left(\int_{0}^{T}f(x)\,dx\right)\left(\int_{0}^{T}g(x)\,dx\right)$$

Based on suggestion in comments, one can prove that the above result holds for Riemann integrable $f, g$ and $g$ also being periodic with period $T$.

The idea is to express the integral on left as a sum $$\frac{1}{n}\sum_{k=0}^{n-1}\int_{kT}^{(k+1)T}f(x/n)g(x)\,dx$$ which can be further rewritten as $$\frac{1}{n}\sum_{k=0}^{n-1}\int_{0}^{T}f((x+kT)/n)g(x+kT)\,dx$$ And since $g$ is periodic it follows that the above can be written as $$\frac{1}{T}\int_{0}^{T}\left(\frac{T}{n}\sum_{k=0}^{n-1}f\left(\frac{x+kT}{n}\right)g(x)\right)\,dx\tag{1}$$ Since $f$ is Riemann integrable on $[0,T]$ with integral $I=\int_{0}^{T}f(x)\,dx$ we can see that if $$P_n=\{0,T/n,2T/n,\dots,(n-1)T/n,T\} $$ is a partition of $[0,T]$ and $U(f, P_n), L(f, P_n) $ be corresponding upper and lower Darboux sums then we have $$L(f, P_n) \leq S(f, P_n) \leq U(f, P_n)$$ where $S(f, P_n) $ is any Riemann sum for $f$ over $P_n$. Since the integral $I$ is also sandwiched between both upper and lower sums we have $$|S(f, P_n) - I|\leq U(f, P_n) - L(f, P_n) $$ We can now observe that the integrand in equation $(1)$ is of the form $S(f, P_n) g(x) $ and hence $$\left|\int_{0}^{T}S(f,P_n)g(x)\,dx-I\int_{0}^{T}g(x)\,dx\right|\leq (U(f, P_n) - L(f, P_n)) \int_{0}^{T}|g(x)|\,dx$$ and clearly the right hand side above tends to $0$ so that the left hand side also does the same. It follows that the desired limit is $$\frac{1}{T}\int_{0}^{T}f(x)\,dx\int_{0}^{T}g(x)\,dx$$ Credit for the idea of above proof must go to the user WE Tutorial School.

If the integral $\int_{0}^{T}g(x)\,dx=0$ then the above can be used as a proof of Riemann-Lebesgue Lemma for Riemann integrable functions and therefore the above is a generalization of it.

  • $\begingroup$ Nice generalization at the end. $\endgroup$ Jan 30, 2020 at 16:53
  • $\begingroup$ I am not sure why $g$ must be of constant sign (although I understand why you put this condition in your answer). I think being Riemann integrable is sufficient. Perhaps $f$ needs to only be Riemann integrable as well, but I understand that your proof requires continuity of $f$. $\endgroup$ Jan 31, 2020 at 0:38
  • $\begingroup$ @WETutorialSchool: The mean value theorem requires that the second function $g$ be of constant sign. $\endgroup$
    – Paramanand Singh
    Jan 31, 2020 at 0:39
  • 2
    $\begingroup$ After thinking about this carefully, I am very certain that $f$ only needs to be Riemann integrable, and $g$ only needs to be Lebesgue integrable. This can be proved by DCT. $\endgroup$ Jan 31, 2020 at 1:04
  • 1
    $\begingroup$ @Jules_99: its a substitution $x=u+kT$ and then further replace the symbol $u$ by $x$. This does not involve any periodic properties of $g$. $\endgroup$
    – Paramanand Singh
    Nov 17, 2020 at 8:05

$$ \begin{align} &\int_0^1x^{2019}\{nx\}\,\mathrm{d}x\\ &=\frac1{n^{2020}}\int_0^nx^{2019}\{x\}\,\mathrm{d}x\tag1\\ &=\frac1{n^{2020}}\sum_{k=0}^{n-1}\int_0^1(k+x)^{2019}((k+x)-k)\,\mathrm{d}x\tag2\\ &=\frac1{n^{2020}}\sum_{k=0}^{n-1}\left(\frac{(k+1)^{2021}-k^{2021}}{2021}-k\frac{(k+1)^{2020}-k^{2020}}{2020}\right)\tag3\\ &=\frac1{n^{2020}}\sum_{k=0}^{n-1}\left(\frac{(k+1)^{2021}-k^{2021}}{2021}-\frac{(k+1)^{2021}-(k+1)^{2020}-k^{2021}}{2020}\right)\tag4\\ &=\frac1{n^{2020}}\left(\frac{n^{2021}}{2021}-\frac{n^{2021}}{2020}+\sum_{k=0}^{n-1}\frac{(k+1)^{2020}}{2020}\right)\tag5\\ &=\frac1{n^{2020}}\left(-\frac{n^{2021}}{2021\cdot2020}+\frac{n^{2021}}{2021\cdot2020}+\frac12\frac{n^{2020}}{2020}+O\!\left(n^{2019}\right)\right)\tag6\\[6pt] &=\frac1{4040}+O\!\left(\frac1n\right)\tag7 \end{align} $$ Explanation:
$(1)$: substitute $x\mapsto x/n$
$(2)$: break into integer intervals; $x\mapsto k+x$ and $\{x\}\mapsto x$
$(3)$: integrate
$(4)$: $k(k+1)^{2020}=(k+1)^{2021}-(k+1)^{2020}$
$(5)$: sum the telescoping parts
$(6)$: use the first two terms of Faulhaber's Formula
$(7)$: simplify

Thus, $$ \lim_{n\to\infty}\int_0^1x^{2019}\{nx\}\,\mathrm{d}x=\frac1{4040}\tag8 $$

Faulhaber's Formula $$ \begin{align} \sum_{k=1}^nk^m &=\int_0^nx^m\,\mathrm{d}\lfloor x\rfloor\tag9\\ &=\int_0^nx^m\,\mathrm{d}\!\left(x-\{x\}\right)\tag{10}\\ &=\tfrac1{m+1}n^{m+1}-\int_0^nx^m\,\mathrm{d}\!\left(\{x\}-\tfrac12\right)\tag{11}\\ &=\tfrac1{m+1}n^{m+1}+\tfrac12n^m+m\int_0^nx^{m-1}\left(\{x\}-\tfrac12\right)\,\mathrm{d}x\tag{12}\\[6pt] &=\tfrac1{m+1}n^{m+1}+\tfrac12n^m+O\!\left(n^{m-1}\right)\tag{13} \end{align} $$ Explanation:
$\phantom{1}(9)$: write the sum as a Stieltjes integral
$(10)$: $\lfloor x\rfloor=x-\{x\}$
$(11)$: integrate
$(12)$: integrate by parts
$(13)$: use the estimate of the error below $$ \begin{align} \left|\,m\int_0^nx^{m-1}\left(\{x\}-\tfrac12\right)\,\mathrm{d}x\,\right| &=\left|\,m\sum_{k=0}^{n-1}\int_k^{k+1}\left(x^{m-1}-k^{m-1}\right)\left(\{x\}-\tfrac12\right)\,\mathrm{d}x\,\right|\tag{14}\\ &\le\frac{m}2\sum_{k=0}^{n-1}\int_k^{k+1}\left(x^{m-1}-k^{m-1}\right)\,\mathrm{d}x\tag{15}\\ &=\frac{m}2\sum_{k=0}^{n-1}\left(\frac{(k+1)^m-k^m}m-k^{m-1}\right)\tag{16}\\ &\le\frac{m}2\sum_{k=0}^{n-1}\left((k+1)^{m-1}-k^{m-1}\right)\tag{17}\\[6pt] &=\frac{m}2n^{m-1}\tag{18} \end{align} $$ Explanation:
$(14)$: partition the domain at the integers; $\{x\}-\frac12$ has mean value $0$ over each interval
$(15)$: $\left|\{x\}-\tfrac12\right|\le\frac12$
$(16)$: integrate
$(17)$: Mean Value Theorem
$(18)$: sum the telescoping series


For a finite value of $n$ our equation The graph of our function looks like a saw tooth, that touches the curve $x^{2019}$ when $x$ is a multiple of $\frac {1}{n}$

The area under the curve is the red area. enter image description here

As $n$ approaches infinity, the red area becomes $\frac 12$ the area under the curve.

$\frac 12 \int_0^1 x^{2019} dx = (\frac 12) (\frac 1{2020})$

  • 4
    $\begingroup$ As $n$ approaches infinity, the red area becomes $\frac 12$ the area under the curve. I get that this is intuitively obvious, but how would you show it rigorously? $\endgroup$
    – YiFan Tey
    Jan 29, 2020 at 23:08
  • $\begingroup$ I show it in my answer. $\endgroup$ Jan 30, 2020 at 0:21
  • $\begingroup$ +1 your intuitive answer is lot better than rigorous mechanical answers $\endgroup$
    – user454960
    Jan 30, 2020 at 0:31
  • 6
    $\begingroup$ @FaradayPathak: one should be cautious while using intuition in analysis. Most of the intuitive approaches are provided by those who back it up with rigorous proof. $\endgroup$
    – Paramanand Singh
    Jan 30, 2020 at 3:19

Here's a proof that $\lim_{n \to \infty} \int\limits_0^1 f(x) \{nx\} dx =\dfrac12 \int_0^1 f(x) dx $.

If $f(x) = x^m$, then $\lim_{n \to \infty} \int\limits_0^1 f(x) \{nx\} dx =\dfrac12 \int_0^1 x^m dx =\dfrac1{2(m+1)} $.


$\begin{align}\\ g(n) &=\int\limits_0^1 f(x) \{nx\} dx\\ &=\sum_{k=0}^{n-1}\int\limits_{k/n}^{(k+1)/n} f(x) \{nx\} dx\\ &=\sum_{k=0}^{n-1}\dfrac1{n}\int\limits_{k}^{k+1} f(y/n) \{y\} dy \qquad y = nx, dx = dy/n\\ &=\sum_{k=0}^{n-1}\dfrac1{n}\int\limits_{0}^{1} f((z+k)/n) \{z+k\} dz \qquad z = y-k\\ &=\sum_{k=0}^{n-1}\dfrac1{n}\int\limits_{0}^{1} f((z+k)/n) \{z\} dz\\ &=\dfrac1{n}\sum_{k=0}^{n-1}\int\limits_{0}^{1} f((z+k)/n) z dz\\ \\ &\text{(uses IBP } \int zf = \frac12 z^2f-\frac12\int z^2f' \\ &=\dfrac1{n}\sum_{k=0}^{n-1}(\dfrac12 (z^2f((z+k)/n)))_0^1-\dfrac1{2n}\int\limits_{0}^{1} f'((z+k)/n) z^2 dz)\\ &=\dfrac1{n}\sum_{k=0}^{n-1}\dfrac12 (z^2f((z+k)/n)))_0^1-\dfrac1{n}\sum_{k=0}^{n-1}\dfrac1{2n}\int\limits_{0}^{1} f'((z+k)/n) z^2 dz\\ &=\dfrac1{2n}\sum_{k=0}^{n-1}(f((1+k)/n)))-\dfrac1{2n^2}\sum_{k=0}^{n-1}\int\limits_{0}^{1} f'((z+k)/n) z^2 dz\\ &=\dfrac1{2n}\sum_{k=1}^{n}(f(k/n)))-\dfrac1{2n^2}\int\limits_{0}^{1} z^2f'(z) dz\\ &\to \frac12 \int_0^1 f(z) dx\\ \end{align} $

  • 1
    $\begingroup$ You need to replace $f$ by $f'$ in second term after IBP. +1 $\endgroup$
    – Paramanand Singh
    Jan 30, 2020 at 2:51
  • $\begingroup$ You are right. Thanks. Upvoted and fixed. $\endgroup$ Jan 30, 2020 at 6:51
  • $\begingroup$ I have given a somewhat simplified proof in another answer here. $\endgroup$
    – Paramanand Singh
    Jan 30, 2020 at 8:40
  • 2
    $\begingroup$ I think integration by parts can be avoided so that the claim holds for all Riemann integrable functions $f$ defined on $[0,1]$ (which are not necessarily differentiable). Note that $$g(n)=\frac{1}{n} \sum_{k=0}^{n-1}\int_0^1 f\left(\frac{z+k}{n}\right) zdz=\int_0^1\left(\sum_{k=0}^{n-1}\frac{1}{n}f\left(\frac{z+k}{n}\right)\right)zdz.$$ If $f$ is Riemann integrable, then $$\lim_{n\to \infty}\sum_{k=0}^{n-1}\frac{1}{n}f\left(\frac{z+k}{n}\right)=\int_0^1 f(x)dx.$$ So $$\lim_{n\to \infty} g(n)=\int_0^1 \left(\int_0^1f(x)dx\right)zdz=\frac12\int_0^1f(x)dx.$$ $\endgroup$ Jan 31, 2020 at 0:26
  • 2
    $\begingroup$ However, I have not checked which conditions would allow me to swap the limit with the integral, so maybe I need a stronger assumption on $f$. At least for continuous $f$, there seems to be no problems. $\endgroup$ Jan 31, 2020 at 0:32

We have $$f_n(x)=\int_0^x\{nu\}du=\begin{cases} {nx^2\over 2}&,\quad 0\le x< {1\over n}\\ {1\over 2n}+{n\left(x-{1\over n}\right)^2\over 2}&,\quad {1\over n}\le x< {2\over n}\\ {2\over 2n}+{n\left(x-{2\over n}\right)^2\over 2}&,\quad {2\over n}\le x< {3\over n}\\ {3\over 2n}+{n\left(x-{3\over n}\right)^2\over 2}&,\quad {3\over n}\le x< {4\over n}\\ {4\over 2n}+{n\left(x-{4\over n}\right)^2\over 2}&,\quad {4\over n}\le x< {5\over n}\\ \vdots \end{cases}$$we know that $${x\over 2}-{1\over 8n}\le {k\over 2n}+{n\left(x-{k\over n}\right)^2\over 2}\le{x\over 2}\quad,\quad {k\over n}\le x<{k+1\over n}$$therefore$${x\over 2}-{1\over 8n}\le\int_0^x\{nu\}du\le{x\over 2}\quad,\quad 0\le x<1$$By using Integration by parts we obtain$$ \int_0^1 x^{2019}\{nx\}dx{= x^{2019}f_n(x)\Big|_0^1-\int_0^1 2019x^{2018}f_n(x)dx \\={1\over 2}-\int_0^1 2019x^{2018}f_n(x)dx }$$where the latter integral can be bounded as$${1\over 4040}\le {1\over 2}-\int_0^1 2019x^{2018}f_n(x)dx\le {1\over 4040}+{1\over 8n}$$therefore$$\lim\limits_{n\to \infty} \int\limits_0^1 x^{2019} \{nx\} dx={1\over 4040}$$

  • $\begingroup$ Thank you! But why can you apply IBP? $f_n$ is not differentiable $\endgroup$
    – Math Guy
    Jan 30, 2020 at 7:54
  • $\begingroup$ You are right but because of the continuity, the error becomes negligible and tending to zero in discontinuities of the 1st order differentiation (where the original function is not differentiable). $\endgroup$ Jan 30, 2020 at 14:05
  • $\begingroup$ I think the answer is incorrect. $\endgroup$
    – PythonSage
    Jan 30, 2020 at 14:34

I have a slightly different approach. Might not be the best. We have $\int\limits_{0}^{1}x^{2019}\{nx\}dx$.

Say $x\in[\frac{r-1}{n},\frac{r}{n})$, then $nx\in[0,1)$. Hence, $[nx]\in [r-1,r)$. We can, therefore, write the integral as follows: $$I=\lim\limits_{n\to\infty}\frac{1}{n^{2019}}\int\limits_{0}^{1}(nx)^{2019}\{nx\}dx=\lim\limits_{n\to\infty}\frac{1}{n^{2020}}\int\limits_{0}^{\infty}t^{2019}\{t\}dt$$ For $t\in[r-1,r),\{t\}=t-(r-1)$ $$ \begin{aligned} I=&\lim_{n\to\infty}\frac{1}{n^{2020}}\left[\int_{0}^{1}t^{2020}dt+\int_{1}^{2}t^{2019}(t-1)dt\cdots\int_{n-1}^{n}t^{2019}(t-(n-1))dt\right]\\ =&\lim_{n\to\infty}\frac{1}{n^{2020}}\left[\int_{0}^{n}t^{2020}dt-\left\{\int_{1}^{2}t^{2019}dt+2\int_{2}^{3}t^{2019}dt\cdots(n-1)\int_{n-1}^{n}t^{2019}dt\right\}\right] \\ =&\lim_{n\to\infty}\frac{1}{n^{2020}}\left[\frac{n^{2021}}{2021}-\left\{\int_{1}^{n}t^{2019}dt+\int_{2}^{n}t^{2019}dt\cdots+\int_{n-1}^{n}t^{2019}dt\right\}\right]\\ =&\lim_{n\rightarrow \infty}\left( \frac{n}{2021}-\frac{1}{n^{2020}}\left\{ \left( \frac{n^{2020}-1^{2020}}{2020} \right) +\left( \frac{n^{2020}-2^{2020}}{2020} \right) \cdots +\left( \frac{n^{2020}-\left( n-1 \right) ^{2020}}{2020} \right) \right\} \right) \\ =&\lim_{n\to\infty}\left[\frac{n}{2021}-\frac{1}{2020\cdot n^{2020}}\left\{(n-1)n^{2020}-1^{2020}-2^{2020}\cdots-(n-1)^{2020}\right\}\right] \\ =&\lim_{n\to\infty}\left[\frac{n}{2021}-\frac{n-1}{2020}+\frac{1}{2020}\sum_{r=1}^{n-1}\left(\frac{r}{n}\right)^{2020}\right] \\ =&\lim_{n\to\infty}\left[\frac{1}{2020}-\frac{n}{2020\cdot2021}+\frac{n}{2020}\int_{0}^{1}x^{2020}dx\right]\rightarrow\text{(Summation as integration)}\\ =&\lim_{n\to\infty}\left[\frac{1}{2020}\right]=\frac{1}{2020}\\ \end{aligned} $$


$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} &\bbox[5px,#ffd]{\lim_{n\to \infty} \int_{0}^{1}x^{2019}\braces{nx}\dd x} \,\,\,\stackrel{\large nx\ \mapsto x}{=}\,\,\, \lim_{n\to \infty} {1 \over n^{2020}}\int_{0}^{n}x^{2019}\braces{x}\dd x \\[5mm] = &\ \lim_{n\to \infty} {1 \over \pars{n + 1}^{2020} - n^{2020}}\ \times \\[2mm] &\ \phantom{\lim_{n\to \infty}\,\,\,\,}\pars{% \int_{0}^{n + 1}x^{2019}\braces{x}\dd x - \int_{0}^{n}x^{2019}\braces{x}\dd x} \\[5mm] = &\ \lim_{n\to \infty} {1 \over \pars{n + 1}^{2020} - n^{2020}} \int_{n}^{n + 1}\pars{x^{2020} - nx^{2019}}\dd x\label{1}\tag{1} \end{align} where I used the Stolz-Ces$\mrm{\grave{a}}$ro Theorem.

Indeed the integration is an elemental one and it's $\ds{\sim \color{red}{n^{2019} \over 2}}$ while the denominator is $\ds{\sim \color{red}{2020\, n^{2019}}}$ as $\ds{n \to \infty}$ such that $$ \begin{align} &\bbox[5px,#ffd]{\lim_{n\to \infty} \int_{0}^{1}x^{2019}\braces{nx}\dd x} = {1/2 \over 2020} = \bbx{\large{1 \over 4040}} \\ & \end{align} $$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .