Extend $f(x )= \frac{|x^2-4|}{x^2-4}$ in a way that $f(x)$ is continuous  Problem 
What is domain of $f$ when:
$$ f(x)=\frac{|x^2-4|}{x^2-4} $$
Map $f: X \rightarrow Y$ where $X$ is domain (all values $x \in \mathbb{R}$ that are defined by $f$) of $f$ and $Y$ is codomain (all values of $f(x)$).
Is it possible to extend $\forall x \not\in X$ in a way that $f$ is continuous ?
 Attempt to solve 
I made plot of $f(x)$

It is quite easily visible that 
$$ \lim_{x \rightarrow -2} f(x)= \text{"non existent two sided limit"} $$
$$ \lim_{x \rightarrow 2} f(x)=\text{"non existent two sided limit"} $$
I can define $X$
$$ x^2-4 \neq 0 $$
$$ x^2 \neq 4 \iff x \neq \pm 2 $$
which makes $X = \mathbb{R}\setminus \{-2,2\}$
$$ f: \mathbb{R}\setminus \{-2,2\} \rightarrow \{-1,1\} $$
Is it possible to extend $\forall x \not\in X = \{-2,2\}$ in way that $f$ would become continuous ? I would say this is not possible if I can only redefine values for $f(-2)$ and $f(2)$. In order $f$ to be continuous is to redefine $f(x)$ when $x\in[-2,2]$ or $x\in(-\infty,2]\wedge x\in[2,\infty)$. Since I could only redefine $f(x)$ when $x\in \{-2,2\}$ this is not possible. 
 A: Yes, you are right, for it to be continuous, we require $$\lim_{x \to 2^-}f(x)= \lim_{x \to 2^-}f(x)=f(x)$$
but if we are only allowed to define $f(2)$ and $f(-2)$ while keeping the other value as it is then this can't be done since 
$$\lim_{x \to 2^-}f(x)=-1 \ne 1 = \lim_{x \to 2^+}f(x)$$
A: In my undergraduate course in analysis, limits were defined roughly as follows:

let $f$ be a function defined in a punctured neighborhood $U\setminus\{c\}$ of $c$; we say that the limit for $x\to c$ of $f(x)$ exists and has the value $l\in\mathbb{R}$, writing it
  $$
\lim_{x\to c}f(x)=l
$$
  if and only if the function $\tilde{f}$ defined over $U$ as
  $$
\tilde{f}(x)=\begin{cases}
f(x) & x\ne c \\[4px]
l & x=c
\end{cases}
$$
  is continuous at $c$

You can easily show that this definition is consistent with the one in terms of $\varepsilon$ and $\delta$.

Actually, the definition was a bit different.

Let $X,d$ be a metric space and $A$ a subset of $X$; suppose $c$ is an accumulation point of $A$, not belonging to $A$, and that the function $f$ is defined over $A$, with values in the metric space $Y,e$. We say that the limit for $x\to c$ of $f$ exists and has value $l\in Y$, writing it
  $$
\lim_{x\to c}f(x)=l
$$
  if and only if the function $\tilde{f}$ defined over $A\cup\{c\}$ as
  $$
\tilde{f}(x)=\begin{cases}
f(x) & x\ne c \\[4px]
l & x=c
\end{cases}
$$
  is continuous at $c$

Of course the text introduced the notion of metric space and of (local) continuity before defining the concept of limit. This encompasses all the classical cases:


*

*limit at infinity or infinite limits by defining a suitable metric over the extended line

*limits from the left or from the right, by considering suitable subsets of the real line


I'm not advocating that this should necessarily be inflicted to undergraduate students, but in my opinion this is very good for reviewing things after one has mastered the basics and wants to go to an upper level.
