Evaluating limit of a function at $0$ Yesterday my colleague asked me to find the limit of $$\lfloor\sin (x) \lfloor\cot (x )\rfloor  \rfloor$$ as $x$ approaches zero. It is easy to see that the function inside the outer brackets tends to 1  from the left when $x$ tends to $0$ from the right. Thus the right limit at zero would be $0$. However, for the left limit, while the function inside the outer brackets approches 1, Wolfram alpha shows that the values of this function at any left  neighborhood of 0 may be less or greater than 1, implying that the  left limit at $0$  for the original function does not exist. How to show that  for negative values of $x$ close to 
$0$, $\lfloor \sin (x ) \lfloor\cot (x )\rfloor \rfloor$ oscillates between two values $0$ and $1$ using only algebraic manipulations? We have to provide a sequence of negative numbers tending to $0$ for which the function tends to $1$ with values greater than 1, and another sequence for which the function approaches $1$ with values from the left. What are these two sequences? 
Thank you. 
 A: We have that
$$x=-\arctan \frac 1n\to 0^- \implies\sin x\lfloor \cot x \rfloor=\frac{-\frac1n}{\sqrt{1+\frac1{n^2}}}\cdot (-n)=\frac1{\sqrt{1+\frac1{n^2}}}\to 1^-$$
$$x=-\arctan \frac 1{n-\frac12}\to 0^- \implies\sin x\lfloor \cot x \rfloor=\frac{-\frac 1{n-\frac12}}{\sqrt{1+\frac 1{\left(n-\frac12\right)^2}}}(-n)=\frac{n}{\sqrt{1+\left(n-\frac12\right)^2}}\to 1^+$$
A: Assuming that the expression is $\lfloor\sin(x)\lfloor\cot(x)\rfloor \rfloor$, we can rewrite as
$$\lfloor\cos(x) -\sin(x)\{\cot(x)\}\rfloor,$$ where $\{\cot(x)\}$ takes all values in $[0,1)$.
For small positive $x$, the floored quantity is always close to but smaller than $1$. For negative $x$, it oscillates around $1$. Values exactly $1$ are the solutions of
$$\cos(x) -\sin(x)\{\cot(x)\}=1,$$ or, with a linear approximation,
$$1-x\left\{\frac1x\right\}=1$$ or
$$\left\{\frac1x\right\}=\frac1x,$$ which is the sequence of the inverse naturals.

The plot clearly shows the values above $1$.


A better approximation is
$x\approx\dfrac1{n+f}$. Then
$$\cos\left(\frac1 {n+f}\right)-f\sin\left(\frac1 {n+f}\right)\approx1\approx 1-\frac 1{2(n+f)^2}-\frac f{n+f},$$
giving $f\approx\dfrac{\sqrt{n^2+2}-n}2\approx\dfrac1{2n}$ and $x\approx\dfrac{2n}{2n^2+1}$.
A: Let $u=\cot x$. Then $\sin x=\sigma(u)/\sqrt{u^2+1}$, where $\sigma(u)$ is the sign of $u$, and thus
$$\lfloor\sin x\lfloor\cot x\rfloor\rfloor=\left\lfloor\sigma(u)\lfloor u\rfloor\over\sqrt{u^2+1} \right\rfloor$$
Note that $u\to\infty$ as $x\to0^+$ and $u\to-\infty$ as $x\to0^-$.
For $u\gt0$ we have
$$0\lt\left\lfloor\lfloor u\rfloor\over\sqrt{u^2+1} \right\rfloor\le{ u\over\sqrt{u^2+1}}\lt1$$
so 
$$\left\lfloor{\lfloor u\rfloor\over\sqrt{u^2+1}}\right\rfloor=0\quad\text{for }u\gt0$$
and thus $\lim_{x\to0^+}\lfloor\sin x\lfloor\cot x\rfloor\rfloor=0$, as the OP said. For $u\lt0$, on the other hand, let's write $u=-n+r$ with $0\lt n\in\mathbb{Z}$ and $0\le r\lt1$, so that
$$\left\lfloor-\lfloor u\rfloor\over\sqrt{u^2+1} \right\rfloor=\left\lfloor n\over\sqrt{(n-r)^2+1} \right\rfloor=\left\lfloor\sqrt{1-{r^2-2nr+1\over(n-r)^2+1}} \right\rfloor$$
(from $n^2=(n-r)^2+1-(r^2-2rn+1)$).  From the quadratic formula, we have $r^2-2nr+1\gt0$ if $0\le r\lt n-\sqrt{n^2-1}$, in which case the integer value is $0$, and $r^2-2rn+1\lt0$ if $n-\sqrt{n^2-1}\lt r\lt1$, in which case the integer value is $1$. Both cases occur for all $n\gt1$, so $\lim_{x\to0^-}\lfloor\sin x\lfloor\cot x\rfloor\rfloor$ does not exist.
