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?


Solution 1:

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

Solution 2:

$$ |x \sin(\frac{\pi}{x})| \le |x| \cdot 1=|x|.$$

Solution 3:

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

Solution 4:

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