Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a function that is defined as such,

$f(x)=x$, if x is rational, ie $x=\frac{p}{q}$ and $f(x)=1-x$, if x is irrational. What are all the points of continuity?

I would say that all the points of continuity are the points where $p\neq q$ since at any the limit of f(x) as x approaches 1 is 0, while the functional value of the limit of x, as x approaches 1 is 1. Since they do not agree, the function is discontinuous at any point $p=q$

Is that view correct?

share|improve this question
When $p=q$, $x=1$. The representation of a rational as quotient of integers is immaterial to this problem. –  Lubin Nov 27 '12 at 23:47
add comment

2 Answers

up vote 3 down vote accepted

Note that every point is the limit of a rational sequence and an irrational sequence.

So $f$ is continuous at $x_0$ if and only if approximating by rational and irrational sequences give the same result.

So we have $r_n\to x_0$ which are all rationals and $y_n\to x_0$ which are all irrational, and we want: $$x_0=\lim_{n\to\infty} r_n = \lim_{n\to\infty} f(r_n) = f(x) = \lim_{n\to\infty} f(y_n) = \lim_{n\to y_n} (1-y_n)= 1 - \lim_{n\to y_n} y_n=1-x_0$$

Therefore we see that $f$ can be continuous at $x_0$ if and only if $x_0=1-x_0$, and so $x_0=\frac12$.

share|improve this answer
add comment

The only points where $f$ might be continuous is $x=1/2$. You can simply verify this straight forward by using your definition of continuity.

At all other point $f$ can't be continuous. Remember, that irrational and rational numbers both are dense in $\mathbb{R}$.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.