[Math] the greatest integer function, and how do you integrate it

calculusdefinite integralsintegration

$[x]$ denotes the greatest integer $\leq x$. Let $f(x)=[x]$ and let $g(x)=[2x].$

I am having hard time understanding this. What is meant by "greatest integer?" Can anyone refer me to any visual/graphical explanation for $[x]?$

For example, how would we draw the graph for $f(x)=[\sqrt{x}]$?

Also I am a little confused by the including properties such as $[2x]=[x]+[x+1/2]$ and with $[3x],[4x]…$

Lastly, how would you integrate it?

For example, what would be the evaluation of the integral of $\int_1^3{[x]dx}$ and integral of $\int_0^9[\sqrt t]dt$?

In general, I am completely confused by $[x]$ and its meaning and its functional ability. So any intuitive explanation would be much appreciated.

Best Answer

Given a real number $x$, the notation $[x]$ (also often seen as $\lfloor x\rfloor$) literally means "the greatest integer less than or equal to $x$". For example, $1.2$ is not an integer. The integers are $$\ldots,\;-4,\;-3,\;-2,\;-1,\;0,\;1,\;2,\;3,\;4,\ldots$$ We throw away all the integers that are not less than or equal to $1.2$: $$\ldots,\;-4,\;-3,\;-2,\;-1,\;0,\;1\hphantom{,\;2,\;3,\;4,\ldots}$$ and take the largest one of them, which is $1$. Therefore, the greatest integer less than $1.2$ is $1$, and we write $$\lfloor 1.2\rfloor =1.$$ (By the way, take a look at the relevant Wikipedia article.)


Here is a graph of $\lfloor x\rfloor$, from $x=-3$ to $x=3$:

enter image description here

Here is a version where I've added a graph of just the function $x$ itself (in red) and lines indicating the integers (in green).

enter image description here

You can see on this graph that, as we expected, $\lfloor 1.2\rfloor =1$.


Here is a graph of $\lfloor \sqrt{x}\rfloor$, from $x=0$ to $x=25$:

enter image description here

Here is a version where I've added a graph of just the function $\sqrt{x}$ itself (in red) and lines indicating the integers (in green).

enter image description here

Here's a check for this graph: using a calculator, we know that $$\sqrt{20}\approx 4.47214$$ and so the largest integer that's less than or equal to $\sqrt{20}$ will be $4$.


Using the fact that, for any numbers $a<b<c$, $$\int_a^c f(x)\,dx=\int_a^bf(x)\,dx+\int_b^cf(x)\,dx,$$ we can break up the range we're integrating over into pieces where $\lfloor\;\;\rfloor$ is constant, and we do know how to integrate constants (note that the endpoints don't contribute the value of the integral; integrating over the set of $x$'s for which $a\leq x\leq b$ will give the same answer as integrating over the set of $x$'s for which $a\leq x<b$, and we denote both of these operations by $\int_a^b$). For example, $$\int_1^3\lfloor x\rfloor\,dx=\int_1^2\lfloor x\rfloor\,dx+\int_2^3\lfloor x\rfloor\,dx=\int_1^21\,dx+\int_2^32\,dx=1+2=3.$$

Related Question