# Thread: example of discontinuous function

1. ## example of discontinuous function

my lecturer told us that one example of function that is discontinuous anywhere:

$\displaystyle f(x) = 1$ if x = rational function and $\displaystyle f(x) = -1$ if x = not a rational number

can anyone sketch the graph? i can't "see" what is the mean of 'discontinuous' from the graph? (e.g. give data for x)

any other example of function that discontinuos anywhere?

2. Originally Posted by bobey
my lecturer told us that one example of function that is discontinuous anywhere:

$\displaystyle f(x) = 1$ if x = rational function and $\displaystyle f(x) = -1$ if x = not a rational number

can anyone sketch the graph? i can't "see" what is the mean of 'discontinuous' from the graph? (e.g. give data for x)

any other example of function that discontinuos anywhere?
Between any two rational numbers there exists irrational numbers, and vice versa.

So if you COULD draw it out, you would only be able to place a point, then jump to another point, then jump again and so on... There will not ever be any two points joined together. Therefore, the function is discontinuous everywhere.

3. The graph looks like two horizontal straight lines- one at y= -1 and the other at y= 1. But it isn't, really. The line at y= 1 has a "hole" at every irrational number and the line at y= -1 has a "hole" at every rational number. But rationals and irrationals are so close together (technically, each is "dense" in the set of real numbers) that no matter how small a pencil or pen point or pixel on a screen you used, each "dot" would overlap both rational and irrational numbers.

The easy way to get other examples- just choose values other than "1" and "-1"!

4. Originally Posted by bobey
my lecturer told us that one example of function that is discontinuous anywhere:

$\displaystyle f(x) = 1$ if x = rational function and $\displaystyle f(x) = -1$ if x = not a rational number

can anyone sketch the graph? i can't "see" what is the mean of 'discontinuous' from the graph? (e.g. give data for x)

any other example of function that discontinuos anywhere?
Notice that $\displaystyle f$ is an example of a function that is continuous nowhere but that $\displaystyle f^2$ is infinitely differentiable.