I wanted to evaluate the limit $$\lim_{x\to\infty}x^2(1-\cos\frac{1}{x})$$
Since we know that $-1\leq \cos x\leq1$ and that $-1\leq \cos\frac{1}{x} \leq 1$, so by algebraic manipulation, $0\leq x^2(1-\cos\frac{1}{x})\leq2x^2 $.
Why does squeeze theorem fails to obtain a numerical limit here since the actual limit is $\frac{1}{2}$? I know the whole limit would be 0 when $x$ approaches 0.