Ok dumb questions given all the questions I've asked before on this account, but here goes:
(Context is this.)
- Am I correct to say it's wrong to argue $\lim_{\substack{x \to 0}}\cos(\frac{1}{x})$ doesn't exist because $\lim_{\substack{x \to 0}}\cos(\frac{1}{x})$ $= \cos(\lim_{\substack{x \to 0}}\frac{1}{x})$ $ = \cos (\text{does not exist})$ $= \text{does not exist}$ (where we justify the 1st equality like '$\cos$ is continuous on $\mathbb R$')?
Sure we can define $g$ to have range all of $\mathbb R$ like $g(x)=\frac 1 x, g: \mathbb R \ \setminus \ 0 \to \mathbb R$ and thus $g$'s range includes $0$. So we might use the fact that $g$'s range includes $0$ to combine with the fact that $\cos: \mathbb R \to \mathbb R$ is (defined and) continuous at $x=0$. But technically $g$'s image doesn't include $0$. So I think it's nonsensical to say that we can put the limit inside because the outer function $\cos$ is continuous at a value that is in the range of the inner function because the inner function can have anything in its range.
If yes to (1) (i.e. I'm correct that it's wrong), then how again do we argue $\lim_{\substack{x \to 0}}\cos(\frac{1}{x})$ doesn't exist? Really from scratch/definition or something?
If yes to (1) (i.e. I'm correct that it's wrong), then what about in general when we have
$\lim_{x \to a}f(g(x))$ where $\lim_{x \to a}g(x)$ doesn't exist (but I guess $f$ is say...defined and continuous on all of $\mathbb R$)?
Wait I just realised:
I don't think we can say like
$\lim_{x \to a}f(g(x))$ doesn't exist just because $\lim_{x \to a}g(x)$ doesn't exist.
I think of $a=0, f(x) = \frac 1 x = g(x), f,g: \mathbb R \ \setminus 0 \to \mathbb R \ \setminus 0$.