Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I integrate $$\int_{0}^1 x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\}\, dx$$

Where $\lceil x \rceil $ is the ceiling function, and $\left\{x\right\}$ is the fractional part function

share|cite|improve this question
I don't understand why you changed the question completely. It might be an idea to reverse it and pose this as a new question. – user50407 Dec 27 '12 at 21:24
I also don't understand that part of "simple integral": if it is "simple" then what's the problem? – DonAntonio Dec 27 '12 at 23:13
If I write simple it attracts more viewers and for all I know it is simple to people familiar with this kind of thing. – Ethan Dec 28 '12 at 10:19
up vote 8 down vote accepted

A related problem.

Hint: try to use the definition of the fractional part function which is defined by

$$ \left\{ x\right\} = x - \lfloor x\rfloor , $$

and the following relation between the floor and ceiling functions

$$ \lceil x \rceil - \lfloor x \rfloor = \begin{cases} 0&\mbox{ if } x\in \mathbb{Z}\\ 1&\mbox{ if } x\not\in \mathbb{Z} \end{cases}. $$


$$ \int_{0}^1 x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\}\, dx=\int_{0}^1 x (1+\lfloor 1/x \rfloor)(1/x-\lfloor1/x\rfloor)\, dx. $$

Now, make the change of variables $y=1/x$ to the last integral

$$\int_{0}^1 x (1+\lfloor 1/x \rfloor)(1/x-\lfloor1/x\rfloor)\, dx=\int_{1}^{\infty} \frac{1}{y} (1+\lfloor y \rfloor)(y-\lfloor y\rfloor)\, \frac{dy}{y^2}$$

$$\implies I = \sum_{n=1}^{\infty}\int_{n}^{n+1} \frac{1}{y^3} (1+n)(y-n)\, dy= \frac{1}{2}\sum_{n=1}^{\infty}\frac{1}{n(n+1)}=\frac{1}{2} $$

Note: To evaluate the sum, use the telescoping technique. First write the summand as

$$ \frac{1}{n(n+1)}= \frac{1}{n}-\frac{1}{n+1}. $$

Now, find the partial sum of the series

$$ s_n = \sum_{k=1}^{n} \left( \frac{1}{k}-\frac{1}{k+1} \right)=1-\frac{1}{n+1}. $$

Then the series sums to

$$ s = \lim_{n \to \infty} s_n = 1. $$

share|cite|improve this answer
Ive been trying for the past 30 minutes I really dont understand, I really need to brush up on my integration skills, I would appreciate it if you walked me through it. – Ethan Dec 27 '12 at 21:32
@Ethan: I added more materials. – Mhenni Benghorbal Dec 27 '12 at 22:23

The main idea is to divide $(0,1)$ into "good" intervals. I'lll give only the main steps of computation $$ \int\limits_{(0,1)} x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\} dx =\sum\limits_{n=1}^\infty\int\limits_{n\leq \frac{1}{x}<n+1} x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\} dx =\sum\limits_{n=1}^\infty\int\limits_{\frac{1}{n+1}< x\leq \frac{1}{n}} x (n+1) \left(\frac{1}{x}-n\right) dx =\sum\limits_{n=1}^\infty\frac{1}{2n^2+2n}=\frac{1}{2}\sum\limits_{n=1}^\infty\left(\frac{1}{n}-\frac{1}{n+1}\right)=\frac{1}{2} $$

share|cite|improve this answer
I changed the question, and I think im within my rights too, in the original question I didn't just ask for a counter example. – Ethan Dec 27 '12 at 21:11
@Norbert A quick test reveals the integral has to be between $0$ and $1$. $\lfloor 1/x \rfloor \leq 1/x$ and $\{1/x\} < 1$. Hence, we have $x \lfloor 1/x \rfloor \{1/x\} < x \times 1/x \times 1 = 1$. Hence, the integral has to be less than $1$. The divergence you have indicated would mean that the integral is negative, which is not possible. – user17762 Dec 27 '12 at 22:31
@Mrvis, I found the mistake – Norbert Dec 27 '12 at 22:59

Split the integral up into segments $S_m=[1/m,1/(m+1)]$ with $[0,1]= \cup_{m=1}^\infty S_m$. In the segment $m$, we have $\lceil 1/x \rceil=m+1$ and $\{1/x\} = 1/x- \lfloor 1/x\rfloor = 1/x - m$ (apart from values of $x$ on the boundary which do not contribute to the integral).

This yields $$\begin{align}\int_0^1 x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\}\, dx &= \sum_{m=1}^\infty \int_{S_m}x \bigg\lceil \frac{1}{x} \bigg\rceil \left\{ \frac{1}{x} \right\}\, dx \\ &= \sum_{m=1}^\infty \int_{1/(m+1)}^{1/m} x (m+1)\left(\frac1x -m \right)\, dx\\ &= \sum_{m=1}^\infty \frac{1}{2m(1+m)}\\ &=\frac{1}{2}. \end{align}$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.