Let $ \begin{equation} f(x) = \begin{cases} e^{-1/x}, & x > 0,\\ 0, & x \le 0 \end{cases} \end{equation}$
I have proven that $f(x)$ is continuous at $x \in R\setminus {0}$, and in order to prove that it is continuous at $x=0$, consider $(x_{n}) \in \mathbb R_{+}$ as well as $(y_{n}) \in \mathbb R_{-}$
For a sequence $x_{n} \to 0, n \to \infty$, we have $f(x_{n})=e^{-1/x_{n}}$. My intuition would be to just say
$\lim_{n \rightarrow \infty} f(x_{n}) = \lim_{n \rightarrow \infty} \frac {1}{e^\frac{-1}{x_{n}}}$=$\frac{1} {e^\lim {n \rightarrow \infty}{\frac{-1}{x_{n}}}}=0$. But would this not be 'illegal' as taking the limit into the equation already constitutes it being continuous at $0$. Isn't that exactly what I am attempting to prove?
I'm struggling to understand this nuance. Any help would be greatly appreciated
You can justify that $\lim_{x\rightarrow 0^{-}}f(x)=\lim_{x\rightarrow 0^{+}}f(x)=f(0)$.
But $\lim_{x\rightarrow 0^{-}}f(x)=0=f(0)$ is clear.
Now we need only that $\lim_{x\rightarrow 0^{+}}f(x)=0$.
For the sequential characterisation for the right limit, one may assume $x_{n}>0$ and $x_{n}\rightarrow 0$, then the rest goes through.
Having assume $x_{n}>0$ and $x_{n}\rightarrow 0$, the only thing to deal with is to justify that $e^{-1/x_{n}}\rightarrow 0$.
This is by the spirit of composition. One may use the fact that $e^{u}\rightarrow 0$ as $u\rightarrow-\infty$. Given $\epsilon>0$, then there is some $M<0$ such that for all $u$ with $u<M$, then $e^{u}<\epsilon$.
Concentrating with this $-1/M>0$, since $x_{n}\rightarrow 0$, there exists some $N$ such that $n\geq N$ implies that $x_{n}<-1/M$, keeping in mind that $x_{n}>0$, then we are allowed to flip over to get $x_{n}^{-1}>-M$, and hence $-x_{n}^{-1}<M$.
Such an $-x_{n}^{-1}$ can be a candidate for such a $u$ just mentioned, so $e^{-1/x_{n}}<\epsilon$, this shows that $e^{-1/x_{n}}\rightarrow 0$, as expected.