Artificial intelligent assistant

educate continuity of a function $f(x)=0$ How can I educate the continuity of $f(x)$, as $f(x)=0\ \forall x \in \mathbb{Q}$ and $f(x)=x\ \forall x \notin \mathbb{Q}$? Because there is real number between every rational number.

Let us proceed by the $\epsilon$-$\delta$ definition of continuity.

It is to be shown that $$\forall \epsilon >0 \exists \delta >0: |x|<\delta \implies |f(x)-f(0)|<\epsilon$$

Since $f(0) = 0$, this comes down to $|f(x)|<\epsilon$. Now take $\delta = \epsilon$.

Suppose that $x \in \Bbb R$ has $|x| < \delta$.

Then if $x \in \Bbb Q, |f(x)| = 0 < \epsilon$. If $x \
otin \Bbb Q, |f(x)| = |x| < \delta = \epsilon$.

Thence $f$ is continuous at $0$. At other points a similar case distinction can be used to show that $f$ is discontinuous.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e61e52365042a8dddb6ab968e4009efe