Continuity of $f(x)=\frac{x^2-9}{x+3}$ Let $f(x)=\frac{x^2-9}{x+3}$.

Determine the domain of $f$. Is $f$ continuous?

My answer: The domain of $f$ is $A:=\mathbb{R}\setminus \{-3\}$. Yes, $f$ is continuous in $A$, but not in $\mathbb{R}$. The solution in the book says that it is continuous in $\mathbb{R}$. Is this an error? Though, we can agree that the fraction can be reduced into $f(x)=x-3$, and the domain of the right-hand side is $\mathbb{R}$. But $f$ is still discontinuous at $-3$. Is my understanding correct?
 A: Your understanding is correct.  The point $(-3, -6)$ is what's called a removable discontinuity: one that can be “removed” by defining a new function
$$g(x) := \begin{cases} f(x) & \text{ if }x \in A \\ \lim_{t \to x} f(t) & \text{ if } x \notin A\end{cases}$$
where $A$ is the subset of $\mathbb{R}$ on which $f$ is defined and continuous.
A: Yes and no. Notice that $x^2-9=(x-3)(x+3)$ so simplifying the fraction you have $f(x)=x-3$ which is continuous. But if you don't simplify, there is a discontinuity at the value $x=-3$. So your right for claiming it isn’t in the real set.
A: Continuity is defined pointwise.  That function is only defined on $\mathbb{R} \setminus \{-3\}$,  so technically it does not make sense to talk about its continuity at $x=-3$.   It is continuous at every point in its domain.
You could extend this function to a function on $\mathbb{R}$ that would be continuous by plugging the removable discontinuity that is in the other answers,  but there is no way of saying this function as is is continuous or discontinuous on $\mathbb{R}$ as that's not a possible domain
