TITLE: How to prove that if the one sided limits are equal the general limit is that value?
QUESTION [5 upvotes]: My teacher proposed this question as a challenge proof to do on our own and I can't seem to get it. Was Wondering if anyone could give me a hint or help me on the process to completing it.
Let $a \in \mathbb{R}$. Let $f$ be a function defined, at least, on an interval 
centred at $a$, except possibly at $a$. Let $L \in \mathbb{R}$.

If $\lim\limits_{ x→a-} f(x) = \lim\limits_{ x→a+} f(x) = L$
  then $\lim\limits_{ x→a} f(x) $ = $L$. 

We are supposed to prove this using the "delta-epsilon" proof style. Thanks in advance!!

REPLY [3 votes]: Start by writing your hypothesis in terms of delta-epsilon, and what you want to prove, that is
$$
\lim_{x\to a^{-}}f(x)=\lim_{x\to a^{+}}f(x)=L
$$
Implies that given $\epsilon >0$ there exist $\delta_1,\delta_2 >0$ such that if:
$x \in (a-\delta_1,a)$ then $|f(x)-f(a)| < \epsilon$ (which is the formal definition of $\lim_{x\to a^{-}}f(x)=L$)
and if
$x \in (a,a+\delta_2)$ then $|f(x)-f(a)| < \epsilon$ (which is the formal definition of $\lim_{x\to a^{+}}f(x)=L$)
You want to find a $\delta >0$ such that for any $x \in (a-\delta,a+\delta)$ you have that $|f(x)-f(a)|<\epsilon$
What $\delta>0$ are you going to choose to ensure that the last statement is true?