# Guidance to evaluating Integration of Greatest Integer function / Floor function

Being a high school student, i would be really grateful if anyone could explain the methods and approach to integrating the Greatest Integer function / Floor function with an example of your own choice. My tries usually include graphing the function and use the area under it but it is the part of taking which area exactly is my confusion and also on functions which have a floor function inside a floor function and how the integral is done. Here's an example from my side,

$$\int_3^ {10} [log[x]] \,dx$$ = 9 , (done using simple graphing) .

• Floor functions are piecewise constant; generally speaking, the best way to approach an integration problem involving floor functions is to consider the relevant pieces (just as with any piecewise function).
– JBL
Mar 26 at 15:04

I would say the $$\lfloor\cdot\rfloor$$ ("floor") function simplifies things by fixing the values to be from a much smaller set $$\mathbb Z$$ rather than $$\mathbb R$$, at the expense of the need to distinguish cases.

In your example, $$\lfloor x\rfloor$$ can only take integer values: if $$3\le x\le 10$$, then $$\lfloor x\rfloor\in\{3,4,5,6,7,8,9,10\}$$.

Now, as you can easily see,

$$e<3<7

so

$$1<\log 3<\log 7<2<\log 8<\log 10<3$$

and so $$\lfloor \log \lfloor x\rfloor\rfloor$$ will be $$1$$ whenever $$\lfloor x\rfloor\in\{3,4,5,6,7\}$$ (which is when $$3\le x<8$$) and $$2$$ when $$\lfloor x\rfloor\in\{8,9,10\}$$ (which is when $$8\le x\le 10$$).

In other words, your function is really $$\lfloor\log\lfloor x\rfloor\rfloor=\begin{cases}1,&3\le x<8\\2,&8\le x\le 10\end{cases}$$. This is now easy to integrate.