How to prove a limit of a function does not exist? I am looking at the function
$$f(x) = \begin{cases}
\dfrac{x^2-1}{x^2-x} & x \ne  0,1\\
0 & x=0\\
2 &x=1
\end{cases}$$
and am trying to show that $\lim_{x \to 0} f(x)$ DNE. This makes sense to me because $f$ goes towards $+\infty$ from the left and $-\infty$ from the right. However, in my analysis class we do not have a definition for when a limit does not exist. My first instinct was to negate the definition of when a limit exists, but this means that the limit would not exist for any number I chose, and I want to prove that the limit doesn't exist for any numbers.
I don't understand why there needs to be cases for this type of problem as detailed here.
How can I go about proving this rigorously?
 A: Here is the formal proof based on $\epsilon-\delta.$
Note $f(x)=\begin{cases}1+\dfrac{1}{x} \ &\mathrm{if} \ x\neq 0\\ 0 \ &\mathrm{if}\ x=0 \end{cases}$.

Suppose $\lim_{x\to 0}f(x)$ exists. Let $\lim_{x\to 0}f(x)=\alpha.$
Then, there exists $\delta\in(0,1)$ s.t. $0<|x|<\delta \Rightarrow |f(x)-\alpha|<2$.
From this, $|f(\frac{\delta}{2})-\alpha|<2$ and $|f(-\frac{\delta}{2})-\alpha|<2$ must hold.
From $|f(\frac{\delta}{2})-\alpha|<2$, we get $-2<1+\frac{2}{\delta}-\alpha<2$ ・・・(i)
From $|f(-\frac{\delta}{2})-\alpha|<2$, we get $-2<1-\frac{2}{\delta}-\alpha<2$, i.e., $-2<-1+\frac{2}{\delta}+\alpha<2$ ・・・(ii)
Consider (i)+(ii). We get $-4<\frac{4}{\delta}<4$, thus $1<\delta.$
However, this contradicts $\delta\in(0,1)$.
Thus, the supposition "$\lim_{x\to 0}f(x)$ exists" is false.
Therefore, $\lim_{x\to 0} f(x)$ doesn't exist.
A: Drawing a picture helps. With a picture, you observe that the graph approaches $-\infty$ from the left and it approaches $\infty$ from the right. This is because  $\frac{x^2-1}{x^2-x}=\frac{x+1}{x}=1+\frac{1}{x}$ for $x \neq 1$ (the parent function of hyperbolas shifted up by $1$ unit), and all we care about is what happens near $x=0$.
