# Bizarre limit problem

If $$f(x) = \begin{cases} x^2 & \text{if }x\text{ is rational} \\ 0 & \text{if }x\text{ is irrational} \end{cases}$$ prove that $$\lim_{x\to 0} f(x)=0$$ without using the definition of limits

-
Hi Akram. Thanks for acknowledging that this his a homework question with the appropriate tag. It would be helpful if you mentioned what you have tried so far and where you are getting stuck. This way we can provide the most helpful hints. –  Brett Frankel Oct 29 '12 at 16:04
You got excellent answers to many of your previous questions. Why is your accept rate low? Please see meta.stackexchange.com/a/5235 –  Ayman Hourieh Oct 29 '12 at 16:06
So "lim" is just a heap of pixels? –  Christian Blatter Oct 29 '12 at 16:18
@BrettFrankel Intuitively, i find f(x) is zero or getting closer to zero as x goes to zero, but i don't think it's enough to prove it –  Akram Hassan Oct 29 '12 at 16:31
Your intuition is correct, but you want to use some more robust tools to tackle this. One is the definition of a limit (which you specifically ask to avoid). Another is the squeeze theorem (see below). There are other arguments as well, although the ones I have in mind are not quite accessible at a calculus level. –  Brett Frankel Oct 29 '12 at 16:33

Use the squeeze theorem. What can you use as your upper bound? Your lower bound? (Hint: $f$ is a piece-wise function.)
It is definitely the answer :) $$\text{If we have }f_1(x) = 0 \text{ and }f_2(x) = x^2\text{ then we have }f_1(x)\leq f(x)\leq f_2(x)$$ and by the squeezing theorem$$\lim_{x\to 0} f(x)= \lim_{x\to 0} f_1(x)= \lim_{x\to 0} f_2(x)=0$$ –  Akram Hassan Oct 29 '12 at 19:06