Answer
$f(x)$ is continuous over the interval $(-\infty, 0)$U$(0, \infty).$
Work Step by Step
Using Theorem $1.12$ with $f(x)=h(g(x))\to h(x)=\cos{x}$ and $g(x)=\dfrac{1}{x}.$
$g(x)$ is continuous for all values of $x$ such that $x\ne0.$
$h(x)$ is continuous for all values of $x.$
Hence, $f(x)=h(g(x))$ is continuous for all values of $x$ such that $x\ne0\to f(x)$ is continuous over the interval $(-\infty, 0)$U$(0, \infty).$