# Limits of floor functions

Is anyone able to help me with the following limit question concerned with the floor function.

Let $f(x)=\lfloor x\rfloor$ be the floor function, that is the largest integer less then or equal to $x$. For example, $\lfloor \pi \rfloor=2=\lfloor 3\rfloor$, but $\lfloor-\pi\rfloor=-4$.

Let $A=\lim_{x\to0}\left(f(x)+f(-x)\right)$. Let $B=f(0)+f(-0)$.

Find $A$ and $B$.

• What are your thought? What are the values of $f(0.0001)$, $f(-0.0001)$, $f(0)$, $f(-0)$? – Hagen von Eitzen Jan 16 '15 at 7:48
• Hi, I have tried (0,0) as a solution, but this is not the correct solution. As zero is an integer, I would've thought this would be the correct answer. – MatStrat Jan 16 '15 at 7:50

$$\lim_{x\to 0^+} f(x)+f(-x)=0-1=-1$$ $$\lim_{x\to 0^-}f(x)+f(-x)=-1+0=-1$$
and $$f(0)+f(-0)=2f(0)=0$$
therefore $$(A,B)=(-1,0)$$
For this problem it's useful to appeal to the definition of a limit as $x$ approaches $0$: $$\lim_{x\to 0} f(x) = L \Longleftrightarrow \text{for all \epsilon>0 there exists \delta>0 such that 0<|x|<\delta\implies |f(x)-L|<\epsilon.}$$ In layman's terms, we look at the values of $x$ close to $0$, but not equal to $0$. So imagine now that $x$ is very small and positive. Then $f(x) = 0$ and $f(-x) = -1$. On the other hand, if $x$ is very small and negative $f(x) = -1$ and $f(-x) = 0$. You can numerically check these with $x=0.0001$ and $x=-0.0001$. In either case, the limits from the left and right are equal, so $$\lim_{x\to 0} f(x) + f(-x) = -1.$$ For B, it should be clear from the definition of the floor function (which allows for equality) that $f(0) = f(-0) = 0$.