# 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.

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.
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.