# How to integrate greatest integer function $\int^{1.5}_0 \lfloor x^2 \rfloor \, dx$

How to integrate greatest integer function

$$\int\lfloor x\rfloor \, dx$$

I don't have any idea how to integrate greatest integer function, only have idea about the function viz. If $x = 1.5$ then the value of function will be $2$.

Request you to please elaborate on this, I will be grateful to you.

• If my memory serves me correctly, the greatest integer part of $1.5$ is $1$ and not $2$. You "throw away" any "decimal tail", e.g. $\lfloor 1.999 \rfloor = 1$ and $\lfloor 2.0001 \rfloor = 2$. – Fly by Night Sep 5 '13 at 17:24
• I am talking about the value of function $[x^2] = [1.5^2] = [ 2.25] = 2$ – sultan Sep 6 '13 at 2:24
Hint: Break up into three integrals, (i) $0$ to $1$; (ii) $1$ to $\sqrt{2}$; (iii) the rest. Each will be quick.
To see why this works, plot $\lfloor x^2\rfloor$ in our interval. You will get a staircase pattern.
• The integrals will be $\int^1_0 [x^2]dx + \int^{\sqrt{2}}_1 [x^2]dx + \int^{1.5}_{\sqrt{2}} [x^2]dx$ ... now how to proceed further..thanks.. don't know how to draw the graph of this function..... can draw graph of [x] function which is a step function discontinued at integral values.. – sultan Sep 5 '13 at 17:16
• Between $0$ and $1$ the function is $0$, integral $0$. Between $1$ and $\sqrt{2}$, the function is $1$, integral $(1)(\sqrt{2}-1)$. Between $\sqrt{2}$ and $1.5$, the function is $2$, integral $(2)(1.5-\sqrt{2})$. Add up and simplify. I think you will get $2-\sqrt{2}$. – André Nicolas Sep 5 '13 at 17:27