I need your help in solving this limits problem.
Let $f$ and $g$ be two functions defined everywhere. If $\lim_{u\to b} f(u) = c$ and $\lim_{x\to a} g(x) = b$, then you may believe that $\lim_{x\to a} f(g(x)) = c$. This problem shows that this is not always true.
Consider functions $f$ and $g$ defined as follows: $g(x) = 0$ for all $x \in\mathbb R$ and $$ f(u) = \begin{cases} 0, \quad & \text{ if } u \ne 0, \\ 1, &\text{ if } u = 0\end{cases}$$
(a) Compute $\lim_{u\to 0} f(u)$
(b) Compute $f(g(x))$ for $x \in\mathbb R$ and hence compute $\lim_{x\to 0} f(g(x))$.
(c) Can you redefine $f(0)$ so that $\lim_{x\to 0} f(g(x)) = f(\lim_{x\to 0} g(x))$ ?
I tried solving and was getting my solution but it's confusing and I am not able to confirm it. So I need your answer to help me out.
First of all, think about it. What is this question asking you?
You should expect that if $$\lim_{x \to 0}g(x) = a$$ and $$\lim_{x \to a} f(x) = c$$
then $$\lim_{x \to 0}f(g(x)) = f(\lim_{x \to 0}g(x))= c$$
because if $g(x)$ is approaching $a$, and we're evaluating $f$ at $g(x)$, then this should be the same thing as $\lim_{x \to a} f(x) = c$
This isn't always the case, however. Let's look at the functions we're given:
$$\lim_{x \to 0} g(x) = 0$$ $$\lim_{x \to 0} f(x) = 0$$
So we see that $$\lim_{x \to 0}f(g(x)) = 0$$ but $$\lim_{x \to 0}f(g(x)) \neq f(\lim_{x \to 0}g(x))$$, because $$f(\lim_{x \to 0}g(x)) = f(0) = 1$$
In fact, it's possible for this to happen as $x \to a$ if $f$ is not continuous at $x = a$
Notice that if $f(0) = 0$, then the equality does hold, so $$\lim_{x \to 0}f(g(x)) = f(\lim_{x \to 0}g(x))$$
because $$\lim_{x \to 0}f(g(x)) = 0$$ and $$f(\lim_{x \to 0}g(x)) = f(0) = 0$$