How to calculate this limit of a function defined in pieces?

54 Views Asked by At

Calculate $$\lim_{x\rightarrow~ 0} f(x)$$ where

$$f(x)=\left\{\begin{matrix} x~\textrm{if}~x\in \mathbb{Q}\\x^2 ~\textrm{if}~x\notin \mathbb{Q} \end{matrix}\right.$$

To me it seems like the function will have limit $0$ but I'm not sure how to show/prove it.

1

There are 1 best solutions below

0
On

Hint: $0\le|f(x)|\le|x|$ for every $x\in[-1,1].$ From squeeze theorem you get:

$$\lim\limits_{x\rightarrow 0} |f(x)|=0,$$

which is equivalent to:

$$\lim\limits_{x\rightarrow 0} f(x)=0.$$