# Continuity at rational and irrational

Let $f:\mathbb{R}\rightarrow\mathbb{R}$ defined by $$f(x)=\begin{cases} x^6-1 & x\in\mathbb{Q} \\ 1-x^6 & x\notin\mathbb{Q} \end{cases}$$ How to find the number of points at which $f$ is continuous? I think as there are infinite irrational numbers between any two numbers rational no. This point should be discontinuous everywhere except at $x=1$ as we approach 1 from both side although the rational or irrational both will give values close to zero but this is totally based on intuition, how to find the actual number of point of continuity.

• You should use \begin{cases} \end{cases} for what you wanted to do. Sep 28, 2015 at 8:38

You could use continuity by sequences, and the fact that both $\mathbb Q$ and $\mathbb R\setminus\mathbb Q$ are dense in $\mathbb R$.
For instance, choose $x\in\mathbb R\setminus\mathbb Q$; then you can find a sequence $\{x_n\}_n\subset\mathbb Q$ such that it converges to $x$.
The limit of the image of the sequence will be, by continuity of polynomials, $x^6-1$, but the image of $x$ is $1-x^6$. Therefore the function is continuous $\forall x$ such that $1 - x^6=-(1-x^6)$, that is, $x=\pm 1$.