# How do you prove that the function xsin(1/x) is continuous at x=0?

May 9, 2016

The function, as given, is not continuous at $0$ as $0 \sin \left(\frac{1}{0}\right)$ is not defined. However, we may make a slight modification to make the function continuous, defining $f \left(x\right)$ as

$f \left(x\right) = \left\{\begin{matrix}x \sin \left(\frac{1}{x}\right) \text{ if "x!=0 \\ 0" if } x = 0\end{matrix}\right.$

We will proceed using this modified function.

Using the $\epsilon - \delta$ definition of a limit, we must show that for any $\epsilon > 0$ there exists a $\delta > 0$ such that if $0 < | x - 0 | < \delta$ then $| f \left(x\right) - f \left(0\right) | < \epsilon$

To do so, we first let $\epsilon > 0$ be arbitrary. Next, let $\delta = \frac{\epsilon}{2}$. Now, suppose $0 < | x - 0 | = | x | < \delta$. Note that as $| x | > 0$ we have $f \left(x\right) = x \sin \left(\frac{1}{x}\right)$. Proceeding,

$| f \left(x\right) - f \left(0\right) | = | x \sin \left(\frac{1}{x}\right) - 0 |$

$= | x \sin \left(\frac{1}{x}\right) |$

$= | x | \cdot | \sin \left(\frac{1}{x}\right) |$

$\le | x | \text{ }$ (as $| \sin \left(\frac{1}{x}\right) | \le 1$ for all $x \ne 0$)

$< \delta$

$= \frac{\epsilon}{2}$

$< \epsilon$

So, as for an arbitrary $\epsilon > 0$ there exists a $\delta > 0$ such that if $0 < | x - 0 | < \delta$ then $| f \left(x\right) - f \left(0\right) | < \epsilon$, we have shown that $f \left(x\right)$ is continuous at $x = 0$.