Computing $\lim _{x\to 0}\left(x^2\cos\left(\frac{1}{x}\right)\right)$, why is it still defined? Now I know the $\lim _{x\to 0}\left(x^2\cos\left(\frac{1}{x}\right)\right)$ is equal to $0$ by the squeeze theorem  of functions or just $0$ multiply by something else. But what about the $\frac{1}{x}$ ? as $x$ approaches $0$ isn't $\cos$ still undefined? Can someone explain we can bypass this?
 A: $\cos$ is defined for all real numbers, and because we are taking a limit as $x$ goes to 0, not just plugging 0 into the equation, this doesn't cause any problems.
A: To comment on $\lim _{x\to 0}\left(x^2\cos\left(\frac{1}{x}\right)\right)$, let's first recall definition of limit of a function at a point. 

Let $A$ be a non-empty subset of $\mathbb R$ and $f:A\to \mathbb R$ be a function defined on $A$. Let $p$ be a limit point of $A$, then $\lim_{x\to p}f(x)$ is said to exist if there exists $L\in \mathbb R$ such that for every $\epsilon\gt 0$, there exists a $\delta\gt 0$ such that $0\lt |x-p|\lt \delta\implies |f(x)-L|\lt \epsilon$. It is denoted by $\lim_{x\to p} f(x)=L$.

So limit is defined at a limit point $p$ of $A$, which by its definition may or may not belong to $A$.
In you case, $f(x)=x^2\cos\frac{1}{x}$ and its domain of definition is $A=\mathbb R-\{0\}$. Note that $x=0$ is a limit point of $\mathbb R-\{0\}$ so limit of $f(x)$ can be defined at $x=0$. In this case, as it so happens $\lim _{x\to 0}\left(x^2\cos\left(\frac{1}{x}\right)\right)$ exists as you have mentioned.
A: As $x$ approaches $0$, $\frac1x$ approaches infinity, so we can't exactly determine $\cos \frac1x$
However, $\cos \frac1x$ will always lie between $-1$ and $1$ and the product of something that lies between $-1$ and $1$ with $0$ will still be $0$
There would have been a problem if $\cos \frac1x$ itself approached infinity and it would have been a $0 \times \infty$ indeterminate form, but as we all know, $\cos \frac1x$ cannot approach infinity.
A: Well for all $x>0$ and less than $0$ ,$\cos(1/x)$  is well defined . While $\lim_{x\to0}\cos(1/x)$ does not exist since it keeps oscillating between $-1$ and $1$ .
$\lim_{x\to0} x^2\cos(1/x)$ exists because the $x^2$ term makes the function approach $0$ .One can intuitively reason this because  while the function $cos(1/x)$ keeps oscillating it between $ 1 $ and $-1$ the $x^2$ term makes it approach $0$ because $x^2$ approaches $0$ as $x$ approaches $0$ .
A: The maximum value of the absolute value of cosine is 1. I think it can be proven that the limit of  $x^2$ times any bounded function as $x$ approaches 0 is 0 using delta-epsilon proof.
