Discuss the continuity of the function defined by:
$\displaystyle f(x)=\begin{cases}
& x\text{ if } x\,\in\,Q \\
& -x\text{ if } x\,\notin \,Q
\end{cases}$
Yes, the function is continuous at 0. Given any $\displaystyle \epsilon$> 0, [tex]|f(x)- f(0)| is |x- 0|= |x| if x is rational, and |-x- 0|= |x| if x is irrational. Take $\displaystyle \delta$ to be any number less than $\displaystyle \epsilon$.
If a is any rational number other than 0, f(x)= a so |f(x)- f(a)= |x-a| if x is rational and |-x-a|= |x+a| if x is irrational. No matter how small $\displaystyle \delta$ is, there will exist both rational and irrational numbers between $\displaystyle a-\delta$ and $\displaystyle a+ \delta$ so with $\displaystyle \epsilon$ less than half the difference between them, there will exist x such that |f(x)- f(a)|> [tex]\epsilon[/b]. The same is true if a is irrational.