If $f(x)=x \sin (\frac{\pi}{x})$, is continuous everywhere, then find $f(0)$ $$\lim_{x\to 0} x\sin \left (\frac{\pi}{x} \right )$$
$$=\lim_{x\to 0} x \frac{\sin \left (\frac{\pi}{x} \right )}{\frac{\pi}{x}} \frac{\pi}{x}$$
$$=\pi$$
So the answer should be $\pi$, but it is actually $0$
Why is the value of limit $0$ in this case?
 A: $\lim_{y \to 0} \frac  {\sin y} y=1$ but $\lim_{x \to 0} \frac  {{\sin (\frac  {\pi} x)}} {\frac {\pi} x}$ is not $1$.
For the correct answer use the fact that $|\sin t| \leq 1$ for all $t$.
A: $$ |x \sin(\frac{\pi}{x})| \le |x| \cdot 1=|x|.$$
A: We have
$$\left|x\sin(\frac{\pi}{x})\right|\le |x| \to 0$$
your mistake is here
$$\lim_{x\to \infty} \frac{\sin (\frac{\pi}{x})}{\frac{\pi}{x}} =1$$
but here we are dealing with $x \to 0$.
A: Bt sandwich theorem:   $$-x\le x \sin(\pi/x) \le x \implies L=\lim_{x \to 0} =0.$$ So $f(x)=x \sin (\pi/x)$ bring continuous everywhere $f(0)=L=0$.
A: As, $\sin(\frac{π}{x}) $ is bounded , so, $\lim_{x\to0} x \sin(\frac{π}{x}) = 0 $
And, since, $f = x \sin(\frac{π}{x}) $ is continuous everywhere on $\mathbb{R} $,
So, $f(0) = \lim_{x\to0} x \sin(\frac{π}{x}) = 0$
A: That $\sin(\text{something})$ is a red herring.  In fact, we have for any function $g$ which is bounded at $x=0$ that
$$\lim_{x\to0}x\cdot g(x)=0.$$
Hence $f(x)=x\cdot g(x)$ is continuous at $x=0$.  (Furthermore, $x^2\cdot g(x)$ is differentiable at $x=0$.)
