Confusion about Limits (Rationals)

50 Views Asked by At

$ f(x)= \begin{cases} x^2&\text{if $x$ is irrational}\,\\ 2x+1&\text{if $x$ is rational}\\ \end{cases} $

I want to calculate the limit of $f(x)$ as $x$ tends to $0$. Is it enough to just say that when $x$ tends to $0$ and $x$ is irrational, the limit of $x^2$ is clearly $0$, but when $x$ is rational we get $1$, and $1$ isn't equal to $0$ so the limit doesn't exist?

Or is there a way to do this more precisely using the sandwich theorem?

1

There are 1 best solutions below

0
On BEST ANSWER

Your argument is correct.If you want a formal proof you can use the definition of continuity in terms of limit of sequences e.g.,

Define the sequence $x_n=\frac{1}{2^n}$ and $y_n=\frac{\pi}{2^n}$ Then, if $f$ is continuous at zero we would have $$ \lim_{n \to \infty} f(x_n)= \lim_{n \to \infty} 2x_n+1=1=\lim_{n \to \infty} f(y_n)=\lim_{n \to \infty} y_n^2=0 $$ That is basically what you have said in the OP.