Difference in limits because of greatest-integer function

A Problem : $$\lim_{x\to 0} \frac{\sin x}{x}$$ results in the solution : 1

But the same function enclosed in a greatest integer function results in a 0

$$\lim_{x\to 0} \left\lfloor{\frac{\sin x }{x}}\right\rfloor$$

Why?

My thoughts:
[The value of the first function tends to 1 because of the expansion :

$$\frac{\sin\left( x \right)}{x}\approx\frac{ x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots}{x}$$ $$\approx 1 - \frac{x^2}{3!} + \frac{x^4}{5!} - \frac{x^6}{7!} + \cdots$$ and putting zero in the function results in 1

but applying the greatest integer function to the same will result in a zero as whenever the value of the result is taken it will be slightly less than one because of all the subtractions involved in the expansion.]

-
Isn't it just as simple as noting that $|\sin x|<|x|$ when $x\neq 0$? This has a relatively simple geometric meaning. –  Thomas Andrews May 16 '12 at 17:03
Your thoughts are essentially correct. It is possible for a function or sequence to tend to $1$ while always being less than $1$, take the sequence $1-\frac{1}{n}$ for a simpler example. What you have proved is that the greatest integer function does not commute with taking limits. This should not be too surprising, as the greatest integer function is not continuous. –  Matt Pressland May 16 '12 at 17:12
Just wondering, is there any particular reason for writing $\approx$ instead of $=$ when using the power series? –  Antonio Vargas May 16 '12 at 17:15
@The-Ever-Kid Fair question - it means that it matters whether you take the limit and then apply the greatest integer function, or do it the other way round. The reason why this happens is that the greatest integer function is not continuous (this is something worth finding out about if you aren't familiar with it). –  Matt Pressland May 16 '12 at 17:20
Or in the same spirit: $$\lim_{x \to 0} \lfloor 1-x \rfloor$$ –  azdahak May 16 '12 at 20:54
The problem that is ocurring in your example is that the greatest integer function is not continuous. One consequence of this is that in general the limits $\lfloor \lim_{x\to c}f(x)\rfloor$ and $\lim_{x\to c}\lfloor f(x)\rfloor$ will not be equal to each other. This happens because the greatest integer function changes value abrubtly as you move along $\mathbb{R}$; every time you hit an integer, the value jumps up by $1$. So if, as $x\to c$, the function $f(x)$ approaches an integer $n$ from below, as in the case of $\frac{\sin{x}}{x}$ as $x\to 0$, the greatest integer function will (for $x$ close enough to $c$) return $n-1$, as $f(x)$ eventually exceeds $n-1$ as $x\to c$, but it never gets as high as $n$. On the other hand, if you take the limit first, you "attain" $n$, and then the greatest integer function returns $n$.
In general, $g(\lim_{x\to c}f(x))=\lim_{x\to c}(g(f(x))$ for all $c$ and $f$ such that $\lim_{x\to c}f(x)$ actually exists if and only if the function $g$ is continuous. This has several equivalent definitions, but can be thought of roughly as meaning the graph of $f$ has no sudden jumps (and doesn't oscillate too fast, like $\sin\frac{1}{x}$).