How to show a function is continuous everywhere? We have the following function: 
$f(x) = \left\{ 
  \begin{array}{l l}
    x^2 \cos\left(\dfrac{1}{x}\right) & \quad \text{if $x \neq 0$}\\
    0 & \quad \text{if $x=0$}
  \end{array} \right.$
We want to show it's continuous everywhere. How does one do this? For $x=0$ I know you can use the squeeze theorem, but for all other points in the domain, how can you show that the function is continuous? 
 A: The following are theorems, which you should have seen proved, and should perhaps prove yourself:


*

*Constant functions are continuous everywhere.

*The identity function is continuous everywhere.

*The cosine function is continuous everywhere.

*If $f(x)$ and $g(x)$ are continuous at some point $p$, $f(g(x))$ is also continuous at that point.

*If $f(x)$ and $g(x)$ are continuous at some point $p$, then $f(x)g(x)$ is continuous at that point.

*If $f(x)$ and $g(x)$ are continuous at some point $p$, and $g(p)\ne 0$, then $\frac{f(x)}{g(x)}$ is continuous at $p$.


Then you put together the parts.  For example, $\frac 1x$ is continuous everywhere except perhaps at $x=0$, by point 6, because it is a quotient of a constant function (point 1) and the identity function (point 2).  Then by point 4, $\cos \frac 1x$ is continuous everywhere except perhaps at $x=0$, because it is a composition of the cosine function, which is continuous for all $x\ne 0$, and the function $\frac 1x$.  You can fill in the rest.
A: Hint: For rest of the points use the fact that  $fg$ is continious if $f,g$ is continious.
A: You see how to handle $x=0.$  For the rest:


*

*Is $y=x^2$ continuous?

*Aside from $x=0$, is $y=\cos(1/x)$ continuous?

*Given the answers to these two questions, is $y=x^2 \cos(1/x)$ continuous?

