Exception to the Sandwich/Squeeze principle Why does $\lim_{x\to 0} x\sin(1/x) = 0$ and $\lim_{x\to 0} \sin(1/x)$ not exist?
I'm aware of the Sandwich principle; I would like to know if there are any exceptions to this rule, or it conforms consistently to all cases.
 A: The Squeeze theorem certainly isn't wrong, but it does have conditions that need to be fulfilled for it to hold. What the Squeeze theorem says is that if you have an interval $I$ containing the point $a$, and functions $f,g,h$ defined on $I$, except possibly at $a$, and we have $f(x)\leq g(x)\leq h(x)$ for all $x$ in $I$, except possibly at $a$, and $\lim_{x\to a}f(x)=\lim_{x\to a}h(x)=L$, then $\lim_{x\to a}g(x)=L$.
For the first example, $x\sin(1/x)$ acts as our $g$, and we choose $[-1,1]$ to be our interval $I$, and $0$ to be $a$. Since we know that $\sin(x)$ is always bounded by $-1$ and $1$, then $g(x)$ is bounded by $-|x|$ and $|x|$. We choose the constant functions $f(x)=-|x|$ and $h(x)=|x|$ to be our bounds for $g$. As $x$ approaches $0$, both $f(x)$ and $h(x)$ approach $0$ as well. The Squeeze theorem tells us that $g(x)$ approaches $0$ too.
For the second example, the Squeeze theorem doesn't stop being true, but you can't meet the conditions to use it. As $x$ approaches $0$, $\sin(1/x)$ oscillates with increasing speed between $-1$ and $1$. You won't be able to bound it from above and below with functions $f$ and $h$ that approach the same value as $x$ approaches $0$, because $f$ will have to approach $-1$ and $h$ will have to approach $1$. This is not an error of the Squeeze theorem, just a limitation of its power. You have to know what the conditions of the theorem are before you try to use it.
A: Since $|sin (x)|\leq1$ we can bound $-|x|\leq xsin(\frac{1}{x})\leq |x|$ and since $-|x|$ and $|x|$ both have the limit $0$ the squeeze rule says that the limit of $xsin(\frac{1}{x})$ is also $0$.
To show that $f(x)=sin(\frac{1}{x})$ has no limit we consider the sequences $x_{m}=\frac{1}{\frac{\pi}{2}+2m\pi}$ and $x_{n}=\frac{1}{2n\pi}$. They both tend to $0$ as $m$ and $n$ tend to infinity but $f(x_{m})=1$ for all $m$ and $f(x_{n})=0$ for all $n$ so $f(x)$ cannot have a limit as $x$ tends to $0$ as this contradicts the sequential definition of a limit.
A: Students never understand the squeeze theorem. And complex numbers are more important then real numbers. I propose the following way of solution alternative to the squeeze theorem you find it out of place or not:
$\begin{align}
0\leq \left|\lim_{x\rightarrow 0}x\sin\left({\frac{1}{x}}\right)\right|&=\left|\frac{1}{2i}\lim_{x\rightarrow 0}xe^{\frac{i}{x}}+\frac{1}{2i}\lim_{x\rightarrow 0}xe^{-\frac{i}{x}}\right|\;\; \text{(Because $\sin\theta=\frac{e^{i\theta}+e^{-i\theta}}{2i}$})\\
&\leq \frac{1}{|2i|}\lim_{\rightarrow 0}|x|\left|e^{\frac{i}{x}}\right|+\frac{1}{|2i|}\lim_{x\rightarrow 0}|x|\left|e^{-\frac{i}{x}}\right|\;\;\text{(Triangular inequality!)}\\
&\leq \frac{1}{2}\lim_{\rightarrow 0}|x|+\frac{1}{2}\lim_{x\rightarrow 0}|x| \;\;\text{($|e^{i\theta}|=1$)}\\\\
&\leq 0+0=0.
\end{align}$
We obtained
$$0\leq \left|\lim_{x\rightarrow 0}x\sin\left({\frac{1}{x}}\right)\right|\leq 0.$$
Therefore, $\lim_{x\rightarrow 0}x\sin\left({\frac{1}{x}}\right)=0.$
For the second limit, take the test numbers $x_n=\frac{2}{\pi n}$, $n\in\Bbb{Z^{+}}$. It is clear that $x_n\rightarrow 0$ as $n\rightarrow\infty$. If $\lim_{x\rightarrow 0}\sin(\frac{1}{x})$ existed, the sequence  $a_n=\sin(\frac{1}{x_n})=\sin\frac{\pi n}{2}=(-1)^{\frac{n-1}{2}}\left(\frac{1+(-1)^{n+1}}{2}\right)$ would have a limit. But it is a divergent sequence: $1,0,-1,0,1,0,...$
