Find the $\lim_{x\to 0}$ of a piecewise function defined for $x\in\mathbb{Q}$ and $x\notin\mathbb{Q}$

62 Views Asked by At

For example, finding the limit for $f(x)$ where $$f(x) = \begin{cases} e^{x^2}-1 &x\in\mathbb{Q} \\ 0 &x\notin\mathbb{Q} \end{cases}$$

I had a hunch that you had to use the sandwich theorem with $0$ on either side of $e^{x^2}-1$ however I do not know how to formally show this.

2

There are 2 best solutions below

0
On

Denote $g(x) = e^{x^2} - 1$, for $x \in \mathbb{R}$. $g$ is continuous and $g(0) = 0$.

$\forall \varepsilon > 0$, $\exists \delta > 0$ such that $| g(x ) | < \varepsilon$, for any $|x| \leq \delta$.

Using the same $\delta$, we write $| f(x) | < \varepsilon$, for any $|x| \leq \delta$.

Indeed, if $x \in \mathbb{Q}$, then $g(x) = f(x)$ and, for $x$ irrational, $| f(x) | = 0 < \varepsilon$.

0
On

For an explicit $\epsilon -\delta$ proof note that $$0 \leq f(x) \leq \sum\limits_{k=1}^{\infty} \frac {x^{2n}} {n!}$$ $$<c\sum\limits_{k=1}^{\infty} \frac 1 {n!} =c(e-1)$$ if $0<c<1$ and $|x| <c$. Thus $|x| <\frac {\epsilon } {e-1} $ implies $|f(x)| <\epsilon$.