Existence of limits of functions Do limit exist for the following functions:


*

*$\lim_{x\rightarrow 0} \cos(\frac{1}{x})$ 


I think it exists because the expression for Left Hand Limit & Right Hand Limit are same
i.e $\lim_{h\rightarrow 0} \cos(\frac{1}{h})$ for $x=0+h$ & $x=0-h$


*

*$\lim_{x\rightarrow 0} \sin(\frac{1}{x})$ 


I think the limit doesn't exist because the expression for Left Hand Limit & Right Hand Limit are different.
$LHL:-\lim_{h\rightarrow 0} \sin(\frac{1}{h})$ for $x=0-h$
and
$RHL:\lim_{h\rightarrow 0} \sin(\frac{1}{h})$ for $x=0+h$
Is my thought process correct?

If the above is correct, then can we say the following with similar arguments:
(i)Limit exists for  $RHL:\lim_{x\rightarrow 0} \dfrac{1}{| x |}$
(ii)Limit doesn't exist for  $RHL:\lim_{x\rightarrow 0} \dfrac{1}{x}$
 A: Actually, for both functions $\cos\left(\frac 1x\right)$ and $\sin \left(\frac 1x\right)$, the limits as $x\to 0$ do not exist, and for the same reasons, irregardless of whether we consider the limit as $x \to 0^+$ or $x\to 0^{-1}$.
Look, for example, of the behavior of $\cos \left(\frac 1x\right)$ on the interval $(-0.1, 0.1)$. 

For any function $f(x)$, for a limit $L$ to exist as $x \to a$, we have  $$\lim_{x\to a}f(x)=L\in \mathbb R\iff \forall(x_n)\to a,\; f(x_n)\to L$$
For both $f(x) = \cos \frac 1x$ and $f(x) = \sin \frac 1x$, there is no such $L$ to which $f(x)$ as $x \to 0$ from the right OR from the left.
A: Recall that 
$$\lim_{x\to a}f(x)=\ell\in\overline{\mathbb R}\iff \forall(x_n)\to a,\; f(x_n)\to\ell$$
so take
$$x_n=\frac{1}{n\pi}$$
to show that the limit doesn't exist.
A: You are correct in saying that since $\cos\left(\frac1x\right)$ is an even function: if the limit as $x\to0$ from one direction exists, it must be equal to the limit from the other direction.  However, neither $\lim_{x\to0^+}\cos\left(\frac1x\right)$ nor $\lim_{x\to0^-}\cos\left(\frac1x\right)$ exist. In fact, these limits don't exist for the same reason that $\lim_{x\to0^+}\sin\left(\frac1x\right)$ doesn't exist, and comparing the right-side and left-side limits doesn't give you the whole picture in any of these cases.

Here's another way of thinking about this question to hopefully put you on the right track: what is the limit $\lim_{x\to\infty}\sin(x)$?  Does it exist?  If so, what is it? If not, then why not?  Why is this limit the same as your limit?
