2

I wish to find the limit of this function as $x \rightarrow \infty$.

$$f(x)=\left\{\begin{matrix} 1-\frac{1}{x} ~:\forall x \in \mathbb{Q}\\1 ~:\forall x \notin \mathbb{Q} \end{matrix}\right.$$

I have never had to find the limit of a function defined in pieces like this and wondered if it would be okay to bound the function below by $1-\frac{1}{x}$ and above by $1$ and then to just use the squeeze theorem to simply conclude the limit is $1$. I can't see any reason why this wouldn't work according to the theorem but the inclusion of the $\mathbb{Q}$ is making me a little unsure.

Samuel
  • 21

1 Answers1

1

For all $x\ne0$, we have

$$1-\frac{1}{|x|} \le f(x) \le 1+\frac{1}{|x|}$$

Hence as $|x|\to\infty$, both lower and upper bounds tend to $1$, so by the Squeeze Theorem, $\lim_{|x|\to\infty}f(x)=1$. That is

$$\lim_{x\to\infty}f(x)=1$$ and $$\lim_{x\to-\infty}f(x)=1$$

Marconius
  • 5,635