Limit approaching 0 of a rational defined function For $f(x)=\begin{cases}
e^{x^2}-1,  & x \in \mathbb Q\\[2ex]
0, & x \not\in  \mathbb Q
\end{cases}
$ 
Evaluate $\lim_{x\to 0}f(x)$.
Can someone point me in the right direction? I have no clue how to find this limit and have never worked with a function defined by rationality.
Thanks 
 A: When you have a function definition split into $2$ or more parts and asked about a limit value, it's not really different than a normal limit question, except you have the extra complication of considering how the function behaves in the various cases. As in all limit conditions of $x \to x_0$, you want to determine if there's a value $L$ such that for all $\epsilon \gt 0$, there exists a $\delta \gt 0$ such that $|f(x) - L| \lt \epsilon$ for all $|x - x_0| \lt \delta$. With multiple cases, you need to show the absolute differences in values between any the cases which apply in arbitrarily small neighborhoods of the limit point $x_0$ go to $0$. In this case here, since the irrational set of values are $0$, the difference between the irrational & rational set of values for $f(x)$ is just those of the rational values. Thus, you just need to consider whether $e^{x^2} - 1 \to 0$ as $x \to 0$. Since this is a continuous function, you know this is true.
Alternatively, note that $e^{x^2}$ is a monotonically decreasing function for $x \lt 0$ and a monotonically increasing function for $x \gt 0$, with $e^{x^2} = 1$ at $x = 0$. Thus, as $x \to 0^{+}$, the rational values will have $e^{x^2}$ approaching $1$ monotonically from above, and as $x \to 0^{-}$, the rational values will also have $e^{x^2}$ approaching $1$ monotonically from above. Thus, in both cases, the value of $e^{x^2} - 1$, i.e., the upper bound, is positive and goes to $0$ monotonically. As the lower bound of irrational values are always $0$, this shows the function converges to $0$ overall as $x \to 0$.
A: In the reals, $e^{x^2}-1$ is continuous and tends to $e^{0^2}-1=0$. Hence it tends to $0$ in the rationals ($0$ is an accumulation point).
In the reals, $0$ is continuous and tends to $0$. Hence it tends to $0$ in the irrationals ($0$ is an accumulation point).
As both limits are equal, the limit of $f$ is also $0$.
A: Limit does not exist.  As $x\to 0$ through irrationals $f(x)\to 0$.  As $x\to 0$ through rationals $f(x)\to 1$.
A: Let $g(t):=e^t$. Then
$\frac{e^{t^2}-1}{t^2}=\frac{f(t^2)-f(0)}{t^2-0} \to f'(0)=1$ as $t \to 0.$
Hence there is $r>0$ such that $\frac{|e^{t^2}-1|}{t^2} \le 2 $ for $0<|t|<r.$
This gives $|e^{t^2}-1| \le 2t^2$  for $0<|t|<r.$
Consequence: $|f(x)| \le 2x^2$ for $0<|x|<r.$
Therefore $\lim_{x\to 0}f(x)=0.$
A: If a limit $L$ does exist, then $\forall \epsilon >0, \exists \delta > 0$ such that when $\vert x - 0 \vert < \delta$, $\vert f(x) - L \vert < \epsilon$. 


*

*A natural guess might be that $L = 0$, given that $f(0) = 0$.

*So now we want to show that $\exists \delta > 0$ such that $\vert x \vert < \delta \rightarrow \vert f(x) \vert < \epsilon$.

*Notice that if $x \in \mathbb Q$, $f(x) = \epsilon \iff e^{x^2} - 1 = \epsilon \iff e^{x^2} = 1 + \epsilon \iff \vert x \vert = \sqrt{log(1+\epsilon)} \equiv \delta(\epsilon)$

*Finally, notice that if $x\in (-\delta(\epsilon),\delta(\epsilon)))$, then $f(x)<\epsilon$, as desired. We have shown that 0 is the limit of the sequence.

