Is f continuous at $ x = \pm 2 $ and everywhere else it isn’t continuous

continuitygeneral-topology

Let $f:\mathbb{R} \to \mathbb{R}$ be given by
$$
f(x) = \begin{cases}
x^2 – 2, & x \in \mathbb{I}, \\
-x^2 +2, & x \in \mathbb{Q}
\end{cases}
$$

Is $f$ continuous at $ x = \pm \sqrt{2} $ and everywhere else it isn't continuous? I think it's easy to prove where it isn't continuous because of the density of the set of reals but how do I prove the continuity in $ x = \pm \sqrt{2}$? I tried it by definition but got stuck.

Best Answer

Note that $f(\sqrt{2}) = 0$, and that $$ x^2-2 = (x-\sqrt{2})(x+\sqrt{2}), $$ so that $$ |-x^2+2 - 0| = |x^2-2 - 0| = |x-\sqrt{2}||x+\sqrt{2}|. $$ Note that when $x$ is close to $\sqrt{2}$, the right factor is close to $\sqrt{2}$, and the left factor is small.

Can you find your delta using this?

Related Question