# Bizarre limit problem [closed]

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

-

## closed as off-topic by Care Bear, Claude Leibovici, Miha Habič, Jyrki Lahtonen, Stefan HansenJul 30 at 7:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Care Bear, Claude Leibovici, Miha Habič, Jyrki Lahtonen, Stefan Hansen
If this question can be reworded to fit the rules in the help center, please edit the question.

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