My colleague and I are stuck on the answer provided by our textbook for the following question.
Consider the functions $\begin{equation*}f(x) = \begin{cases} x+1 & x \neq 0\\ 0 & x = 0\\ \end{cases} \end{equation*}$ and $\begin{equation*}g(x) = \begin{cases} x & x \neq 1\\ 0 & x = 1\\ \end{cases} \end{equation*}$.
Show that $f$ is discontinuous at $x=0$ and $g$ is discontinuous at $x=1$ but $f \circ g$ is continuous at $x=0$ and $g \circ f$ is continuous at $x=1$.
We are stuck on:
$f \circ g$ is continuous at $x=0$
The answer simply provides:
$\lim_{x \to 0}f(g(x))=\lim_{x \to 0}f(0)=0=f(g(0))$
We can see that $\lim_{x \to 0}g(x)=0$ and the definition of $f$ gives us $f(0)=0$.
The important bit (and reason for posting this question) …
In every reference I can find, the following rule is only said to be true if $f$ is continuous at $\lim_{x \to c} g(x)$.
$$\lim_{x \to c}f \circ g(x) = f(\lim_{x \to c} g(x))$$
But in our question $c=0$ and $\lim_{x \to 0} g(x)=0$ and $f$ is not continuous at $0$, as seen in the definition of $f$ and stated in the question.
The limit for f(g(x)) is not 0 ... it is 1. By constructing the composite function manually, it is clear that f(g(x)) = x+1 everywhere except x=0 and x=1. One can then easily see that the limit must be 1. However, since f is not continuous at 0, the composite rule, as it is written in the form given, cannot be applied.