This question arises from one of the Berkeley Problems in Mathematics, fall 1981. It asks me to find a counterexample to the following claim:
Suppose $\lim\limits_{x\rightarrow x_{0}}f(x)=a$, $\lim\limits_{t\rightarrow a}g(t)=b$, prove or find a counterexample for the claim $\lim\limits_{x\rightarrow x_{0}}g(f(x))=b$.
I feel this should not be true, for we can select functions with infinite 'singularities' near the origin like $x\sin[1/x]$. Then for each value $x=\frac{2}{k\pi}$ we should have the value to be equal to $x$. But this is not a counterexample. Looking up the book the authors give the following example:
$f=g=1$ when $t\not=0$, $f=g=0$ when $t=0$.
The authors then claimed that $\lim_{x\rightarrow 0}g(f(x))=1$ while $\lim_{t\rightarrow 0}g=0$. Unless I am confused with the definition of the limit, that there exists $\lambda$ such that for any $\epsilon$, if $|x-x_{0}|\le \lambda$, then $f(x)-A|\le \epsilon$, I do not see why $\lim_{t\rightarrow 0}g=0$ since $t=0$ is a removable singularity for $g$. So assuming I am wrong somewhere, I want to ask:
1): why the limit of $g$ at 0 is 0?
2): is there better counterexamples?