\documentclass[a4paper,12pt]{article}
\begin{document}

\noindent {\bf Question}

\noindent Consider the function $g: {\bf R}\rightarrow {\bf R}$
given by setting $g(x) = 1$ if $x$ is a rational number and $g(x)
= 0$ if $x$ is an irrational number.  Determine whether $g$ is or
is not continuous.

\medskip

\noindent {\bf Answer}

\noindent This function is not continuous at $0$, since there are
numbers arbitrarily close to $0$, namely all the irrational
numbers of the form $\frac{\pi}{n}$ for $n\in {\bf N}$, and we
have that $| g(0) -g( \frac{\pi}{n})| = | 1 - 0| =1$.  Hence, for
$\varepsilon =\frac{1}{2}$, there does not exist $\delta >0$ so
that if $| 0-a| < \delta$, then $|g(0) -g(a)| <\varepsilon
=\frac{1}{2}$. So, $\lim_{x\rightarrow 0} g(x) \ne g(0)$.  (In
fact, $\lim_{x\rightarrow 0} g(x)$ does not exist.)


\end{document}
