Check whether the function is continuous at 0 - what went wrong? I have to check the whether the following function is continuous:
$$   \
     f:\mathbb{R}\rightarrow \mathbb{R},~f(x)=\left\{
     \begin{array}{lll} 
         e^{1/x} &\text{if} & x < 0,
         \\
         0 & \text{if}& x \ge 0.
     \end{array}\right. 
     \
$$
Now it is obvious that the function is continuous in $(-\infty, 0)$ as a combination of 2 continuous functions as well as in $(0, \infty)$ as a constant function. 
To prove continuity at $0$, I took a sequence that approaches $0$, such as $a_n = \frac{1}{n}$.
Now if $g(x) = e^\frac{1}{x}$ is continuous in $0$ it must be possible to get $\lim_{n\rightarrow \infty}~ g(a_n)) = g(0)$. So:
$$e^\frac{1}{x} = \exp\frac{1}{x} \rightarrow g(a_n) = \exp(1/\frac{1}{n}) = \exp(n)$$
$$\rightarrow \lim_{n\rightarrow \infty}~ g(a_n)) = \lim_{n\rightarrow \infty}~ \exp(n) = \exp(\infty) \ne g(0)$$
Note: I am approaching $0$ from negative n - I just couldn't find a propper visualisation for that in Latex. 
Now my question is: why is this proof is wrong? The solution should be that the function $f$ is continuous at $0$, but I don't see what went wrong. Also because the function is not defined at $0$, I am not sure whether I could perform the limit to $0$.
Thank you for advice!
FunkyPeanut 

If $x_n \to 0$ and $x_n<0$ then $\frac{1}{x_n} \to -\infty$ and $e^{1/x_n} \to 0$.
So the left limit is 0. The right limit at 0 is evidently 0. Therefore the function iscontinuous at 0.
