Prove: If $\lim_{x\to a}f(x)=l$ then $\lim_{n\to\infty}f(x_n)=l$ for every sequence such that $\lim_{n\to\infty}x_n=a$ I've been working on this question for about 2 hours and haven't gotten far (I'm not the best at this area) I'm not really looking for a full answer just someone to put me in the right direction as I'd understand similair examples more in the future, unless you wanna write up a full answer no ones stopping you haha :) Anyway, here's the full question and my working up until now:
Question:
Consider a function $f:\mathbb{R}\rightarrow\mathbb{R}$ and a point $a\in\mathbb{R}$. Assume that $\lim_{x\to a}f(x)=l$ for some $l\in\mathbb{R}$. Prove that $\lim_{n\to\infty}f(x_n)=l$ for every sequence $(x_n)_{n=1}^{\infty} \subset (\mathbb{R}\backslash(a))$ such that $\lim_{n\to\infty}x_n=a$
Working:
Disclaimer: My working may be a bit jumbled because I usually take notes and right down ideas, then when I get a solution I re-write it and I haven't actually got a solution yet (evidently), so sorry if it's a bit confusing! :)
$\lim_{x\to a}f(x)=l \implies |x-a|<\epsilon$ and $|f(x)-l|<\delta$
Assume $\lim_{n\to\infty}f(x)=L$
Fix $\epsilon>0$ then $\exists\delta>0 : \forall x : 0<|x-a|<\delta$
Then $|f(x)-L|<\delta$
Fix $\epsilon$>0 for $(x_n)^{\infty}_{n=1}\implies\exists N : n>N\implies|x_n-a|<\epsilon$
Any help would greatly be appreciated! :)
 A: Let $\epsilon>0$. Since $$\lim_{x\to a}f(x)=l$$ we can find $\delta>0$ such that 
$$0<|x-a|<\delta\implies |f(x)-l|<\epsilon.$$ Since $$\lim_{n\to\infty}x_n=a$$
then corresponding to $\delta>0$, we can find $N\in\Bbb N$ such that for all $n\geq N$ we get $|x_n-a|<\delta$. We know that $x_n\neq a$ for all $n\in\Bbb N$. Thus, for all $n\geq N$, we get $0<|x_n-a|<\delta$ and hence $|f(x_n)-l|<\epsilon$ and we are done.
A: Definitions:
$\lim_{x\to a}f(x)=l \space $ by definition means 
$$1.\space\forall \epsilon>0\exists\delta>0s.t.|x-a|<\delta \implies |f(x)-l|<\epsilon$$ 
It seems that there is a certain mixup in the way you wrote the definition that is way the proof was not correct.
$\lim_{n\to\infty}x_n=a$ again by definition means
$$2.\space\forall\delta>0\exists N\space s.t.\space \forall n>N : |x_n-a|<\delta$$
Proof: Set $\epsilon>0$, We assume $\lim_{n\to\infty}x_n=a$ and $\lim_{x\to a}f(x)=l \space $, we would like to show $$\lim_{n\to\infty}f(x_n)=l$$
By definition $1.$ We get $\delta>0$ that suffices line $1$, for that $\delta\space$ by definition $2.$  $\exists N\space s.t.\space \forall n>N : |x_n-a|<\delta \implies |f(x_n)-l|<\epsilon$
Hence $$\space\forall\epsilon>0\exists N\space s.t.\space \forall n>N : |f(x_n)-l|<\epsilon$$
Q.E.D
A: It depends on how you define limits of function. In particular, it depends whether you include point $x=x_0$ at this definition or not.
Let's write out definition of limits of sequence first.
Definition 1. (Convergence of sequences) Sequence $(x_n)_{n=0}^{\infty}$ converges to $\ell$ if for every $\varepsilon>0$ there exists $M>0$ so that for all $n \ge M$ then $|x_n-\ell| < \varepsilon$.
Then if you define limits of function like below:
Definition 2. (Limits of function) $\displaystyle \lim_{x \to a}f(x)=\ell$ ... for any $\varepsilon>0$ there is $\delta>0$ so for all $\color{red}{0<}|x-a|<\delta$ then $|f(x)-\ell|<\varepsilon$.
your claim will be incorrect. Notice that definition 2 ignores value of $f$ at $x=a$  but definition 1 (limits of sequences) does include value of $f$ at $x=a$, which follows two things:


*

*$x_n$ can be equal to $a$ for infinitely many $n$.

*If we want to prove $(f(x_n))_{n=0}^{\infty}$ converges to $\ell$ as $x_n$ converges to $a$, then we also need to show $|f(a)-\ell|<\varepsilon$ for every $\varepsilon>0$ (this we assume that $x_n=a$ for infinitely many $n$).


The second claim can't be always true if we pick such $f$ so $f(a)$ is far away from $\ell$. Hence, we can't claim $(f(x_n))_{n=0}^{\infty}$ converges or diverges if we don't know any further information of $f(a)$.
Let's take one example to support this. 
$$f(x)= \begin{cases} x, \; x \ne 1, \\
2, \; x =1 \end{cases}.$$
According to definition 2, $\displaystyle \lim_{x \to 1}f(x)=1$. Consider arbitrary sequence of $(x_n)_{n=0}^{\infty}$ that converges to $1$, and then among them, say add more $x_n=1$ for infinitely many $n$. The new sequence still converges to $1$, but we see that $(f(x_n))_{n=0}^{\infty}$ does not converges to $1$ since there are infinitely many $n$ so $f(x_n)=f(1)=2$. So your claim is false if you follow definition 2.
However, if you defines limits of function like this 
Definition 3. $\displaystyle \lim_{x \to 1}f(x)=\ell$ ... for any $\varepsilon>0$ there is $\delta>0$ so for all $|x-a|<\delta$ then $|f(x)-\ell|<\varepsilon$.
then your claim is correct (and the proof is similar like above post). Note that with this definition, we include value at $x=a$ (no $\color{red}{0<}$ in $|x-a|$) which gives us information about $f(a)$ to prove.
