# Find out the value of the integral $\int_{-2}^{2} \lfloor x^2-1\rfloor dx$

Find out the value of the integral $$\int_{-2}^{2} \lfloor x^2-1\rfloor dx$$ where $$[x]$$ denotes the floor function (i.e., $$[x]$$ is the greatest integer $$\le x$$.)

My attempt ..... $$\int_{-2}^2 \lfloor x^2 – 1\rfloor dx = 2\int_0^2 \lfloor x^2-1\rfloor dx$$ Because $$\lfloor x^2 – 1\rfloor$$ is even. $$2\int_0^2 \lfloor x^2-1\rfloor dx =\\ 2\int_0^1 \lfloor x^2-1\rfloor dx+2\int_1^{\sqrt{2}} \lfloor x^2-1\rfloor dx +2\int_{\sqrt{2}}^{\sqrt{3}} \lfloor x^2-1\rfloor dx + 2\int_{\sqrt{3}}^2 \lfloor x^2-1\rfloor dx$$

But how to evaluate this or am I wrong in the whole assumption?

• By square brackets, do you mean entier function? Feb 13, 2019 at 14:30
• By [x] I mean greatest integer $\le$ x Feb 13, 2019 at 14:30
• Sorry for the bad edits.. Feb 13, 2019 at 14:36
• You already have done what is needed...by finding the values of $x$ where the floor function changes it's values. Feb 13, 2019 at 14:46

Since $$f$$ is even we have $$I/2 =\int_0^2[x^2-1]\;dx=$$ $$=\int_0^1-1\;dx+\int_1^\sqrt{2}0\;dx+\int_\sqrt{2}^\sqrt{3}1\;dx+\int_\sqrt{3}^22\;dx=...$$ $$=(-1)+0+(\sqrt{3}-\sqrt{2})+(4-2\sqrt{3})=3-\sqrt{3}-\sqrt{2}$$
• Of course, for each $x\in [0,1)$ we have $f(x)=-1$ Feb 13, 2019 at 14:42