How should I denote "undefined" in a functions definition While solving some limits, I thought this might be a nice strategy.
$$
 \lim_{x \to -2} \frac{x^2-4}{x^2+3x+2} = \lim_{x \to -2} f(x) \\
 f(x) = \frac{(x-2)(x+2)}{(x+2)(x+1)} =
  \begin{cases}
   \frac{x-2}{x+1},& x \neq -2 \\
   \varnothing,& x = -2
  \end{cases} \\
 \lim_{x \to -2} f(x) = \frac{-2-2}{-2+1}=\frac{-4}{-1}=4
$$
First, you define an equivalent function to the one given, isolating the any undefined points/ranges and then finding the limits for the defined parts.
My question is - how should I mathematically denote the value for undefined points/ranges in the equivalent function? Here, I wrote $\varnothing$ as in there is no result, the result is an empty set, but I'm not sure this is appropriate.
Edit 1
I do realise this comes naturally
$$f(x)=\frac{x-2}{x+1}\;,\;\;x\neq -2$$
But isn't there a loss of information as a result? Whereby you can't determine just by this definition, whether it has a value at $-2$. That's just my intuition.

You don't have to.  This is all you need to write.
$$\lim_{x \to -2} \frac{x^2 - 4}{x^2 + 3x + 2} = \lim_{x \to -2} \frac{(x-2)(x+2)}{(x+1)(x+2)} = \lim_{x \to -2} \frac{x-2}{x+1} = \frac{-4}{-1}=4.$$
The point is, the functions $\frac{x^2 - 4}{x^2 + 3x + 2}$ and $\frac{x-2}{x+1}$ are not the same function, as the first is undefined at $-2$ and the second is not.  But, the limits of the two functions are the same so what I wrote is perfectly correct.
