← Back to learning objective

Existence of a limit for a rational/irrational-valued function

Consider the function t(x)={2if x is rational−2if x is irrationalt(x) = \begin{cases} 2 & \text{if } x \text{ is rational} \\ -2 & \text{if } x \text{ is irrational} \end{cases} defined for all real numbers xx.

Every interval around x=0x=0, no matter how small, contains infinitely many rational numbers and infinitely many irrational numbers. Using this fact, determine whether lim⁡x→0t(x)\lim_{x \to 0} t(x) exists. Explain your reasoning and state your conclusion.

Hint

Think about what happens if you pick a sequence of rational xx-values approaching 0, versus a sequence of irrational xx-values approaching 0. Does t(x)t(x) settle down to a single value in either case? Compare the two behaviors — this is one of the three standard ways a limit can fail to exist.

Step-by-step solution

Choose values of xx approaching 0 that are all rational, such as x=0.1,0.01,0.001,…x = 0.1, 0.01, 0.001, \ldots. For every one of these, t(x)=2t(x) = 2, so along this approach the values seem to head toward 22.

Now choose values of xx approaching 0 that are all irrational, such as x=0.12,0.012,0.0012,…x = 0.1\sqrt{2}, 0.01\sqrt{2}, 0.001\sqrt{2}, \ldots. For every one of these, t(x)=−2t(x) = -2, so along this approach the values head toward −2-2 instead.

Since we can get arbitrarily close to x=0x=0 while t(x)t(x) stays exactly at 22, and also get arbitrarily close to x=0x=0 while t(x)t(x) stays exactly at −2-2, the function does not approach a single value as x→0x \to 0. It oscillates between 22 and −2-2 no matter how close xx gets to 00, so the limit fails to exist.

Related problems

Practice similar Calculus problems interactively.

Start Closing the Gap