# Epsilon-Delta-Definition: How to prove $f(x)=x\cdot \sin\left(\frac{1}{x}\right)$ is continuous in $x_0=0$

Epsilon-Delta-Definition: How to prove $$f(x)=\begin{cases}x\cdot\sin\left(\frac{1}{x}\right) , x\neq 0 \\ 0, x=0\end{cases}$$ is continuous in $$x_0=0$$

My attended proof:

In order to be continuous in $$x_0$$, one has to show that: $$\forall \epsilon >0 \exists \delta >0 \forall x\in \mathbb{R}: |x-x_0|<\delta \implies |f(x)-f(x_0)|<\varepsilon$$

I figured that $$|f(x)-f(x_0)|=\big | x\cdot\sin\left(\frac{1}{x}\right) \big |\leq |x|<\varepsilon$$. Furthermore $$|x-x_0|=|x|<\delta$$ How would I chose $$\delta$$? Couldn't I use $$\delta = \varepsilon$$?

• Exactly.... So write it in the right order: let $\epsilon >0$. Pick $\delta=\epsilon$. Then, for all $x$ in $\mathbb R$ such that .... – N. S. Jul 20 '19 at 17:04

It would be clearer if you wrote $$0$$ everywhere you wrote $$x_0$$. But yes, you can choose $$\delta = \varepsilon$$. In this case, writing everything in the correct order of quantifiers, you would say: let $$\varepsilon > 0$$ be arbitrary, and choose $$\delta = \varepsilon$$. Let $$x \in \Bbb{R}$$ be such that $$0< |x-0|< \delta = \varepsilon$$. Then \begin{align} |f(x) -f(0)| &= \left|x\sin\left(\frac{1}{x} \right) - 0 \right|\\ & \leq |x| \\ &< \delta \\ &= \varepsilon. \end{align} Since $$\varepsilon > 0$$ was arbitrary, this shows $$f$$ is continuous at $$0$$.
• Okay, cool! I could basically choose any $\delta$ right? – ParabolicAlcoholic Jul 20 '19 at 17:10
• @ParabolicAlcoholic No! You're first given an arbitrary $\varepsilon > 0$; from now on, $\varepsilon$ is fixed. After this, you have to choose any $\delta$ satisfying $0 < \delta \leq \varepsilon$. So, for example if I give you $\varepsilon = 1$, you can't choose $\delta = 3$ for this proof; you need to choose $0< \delta \leq 1.$ – peek-a-boo Jul 20 '19 at 17:13