[Math] How to show a function is continuous everywhere

calculuscontinuity

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?

Best Answer

The following are theorems, which you should have seen proved, and should perhaps prove yourself:

  1. Constant functions are continuous everywhere.
  2. The identity function is continuous everywhere.
  3. The cosine function is continuous everywhere.
  4. If $f(x)$ and $g(x)$ are continuous at some point $p$, $f(g(x))$ is also continuous at that point.
  5. If $f(x)$ and $g(x)$ are continuous at some point $p$, then $f(x)g(x)$ is continuous at that point.
  6. 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.