# Real Analysis limit problem

## Homework Statement

f:ℝ→ℝ is defined as f(x)= 2x if x is rational and f(x)=4-2x if x is irrational.
Is it true that lim x→1/2=1?

2. The attempt at a solution
Intuitively it seems that as x gets ever closer to 1/2 from either side that the function will oscillate between numbers very close to 1 and 3 and therefore there the limit doesn't exist.
Firstly is my intuition right?
Secondly how does one show this using the definition of a limit or some other theorem?
I thought about using the fact that all (xn)$\subseteq$ℝ such that (xn)→1/2 would have to imply that (f(xn))→1. Again i can't formally show that this can't be.

Last edited:

Related Calculus and Beyond Homework Help News on Phys.org
HallsofIvy
Homework Helper
Yes, that is correct. If x is a rational number close to 1/2, then f(x) is close to 2(1/2)= 1 and if x is an irrational number close to 1/2, then f(x) is close to 4- 2(1/2)= 3. The function does NOT get close to any one number for all real numbers close to 1/2 and so the limit does not exist.