# Is continuity at a point only defined for points in the domain?

I'm using Michael Spivak's Calculus, 3rd edition textbook. Without ado, I'll state the definition given for continuity at a point:

DEFINITION$\;\;\;\;$The function $f$ is continuous at $a$ if: $$\lim_{x\to a}f(x) = f(a)$$

And I might as well give the definition for the limit at a point:

DEFINITION$\;\;\;\;$The function $f$ approaches the limit $l$ near $a$ means: for every $\epsilon>0$ there is some $\delta>0$ such that, for all $x$, if $0<|x-a|<\delta$, then $|f(x)-l|<\epsilon$.

It is clear, then, that in order to verify whether a function is continuous at a point $a$, we need to compute $f(a)$, and this is only possible if $a$ is in the domain of $f$. So, what happens when a point $a$ is not in the domain of $f$?

On this matter, I've had some people telling me that statements about continuity only make for points in the domain of $f$. Spivak himself also mentions in the Continuity chapter of his textbook that "We also often simply say that a function is continuous if it is continuous at $x$ for all $x$ in its domain."

But that means functions like $f(x) = \frac{1}{x}$, $f(x) = \frac{1}{x^2-1}$ and $f(x) = \sin{\frac{1}{x}}$ can all be said to be continuous. It just doesn't seem right, in fact I always thought these were textbook examples of discontinuous functions. It also means that we can't say that $f(x) = \frac{1}{x}$ is discontinuous at $0$, because we don't even know the value of $f(0)$ in order to decide whether it's continuous or not.

Are all of these conclusions correct, or did I misinterpret the definitions? I'd love if someone could shed some light on this, I'm having a hard time wrapping my head around it.

• The textbook that tells you that $1/x$ is discontinuous is wrong. To pretend that a function is discontinuous at points of non-definition would be to say that $\sqrt x$ was discontinuous at all negative numbers. – Lubin May 22 '16 at 22:14
• One good way to think about those examples you give is that, regardless of what you define $f$ to be at those points, they will never be continuous there with your new definition. – Ravi May 22 '16 at 22:14
• Whether the function $1/t$ is discontinuous at the origin is a point on which mathematicians and calculus books often disagree. Spivak's calculus book is unusual in various ways, including this one. – David C. Ullrich May 22 '16 at 22:16
• You can extend the real numbers to include $\infty$ and then extend $f(x)=1/x$ to take the value $\infty$ at $x=0$ and then it's continuous at $0$. Otherwise it doesn't make sense to ask about continuity of a function where it isn't defined. Also note that a continuous function is continuous on its domain. When $1/x$ is called discontinuous, one could take it to mean its domain isn't continuous. – jdods May 22 '16 at 22:21
• @jdods Reading your comment again, maybe you're totally misunderstanding my point. Nobody ever says that $1/x$ is continuous at the origin. – David C. Ullrich May 23 '16 at 2:09

## 2 Answers

There are two different definitions of continuity. One is used at the elementary calculus level, and the other in more advanced texts. I am assuming that you are familiar with the first definition and therefore will skip the epsilon, delta quantifiers to simplify the presentation:

(1) a function $f$ is continuous at $c$ for all $x$, if $|x-c|<\delta$ then $|f(x)-f(c)<\epsilon$.

(2) a function $f$ with domain $D$ is continuous at a point $c\in D$ if for all $x\in D$, if $|x-c|<\delta$ then $|f(x)-f(c)<\epsilon$.

The second definition is more complicated because it speaks explicitly about the domain of the function, and limits $x$ to this domain. The advantage of the second approach is that you don't need to deal with special cases such as one-sided continuity when you want to define what it means for a function to be continuous on a closed interval.

The existence of two slightly different definitions is a constant source of confusion and your question is well taken.

When a function is called continuous, it is often the case that it is continuous on all real numbers. It is reasonable to call a function continuous the set of points where it satisfies the definition of continuity is understood.

Personally, for undergraduate calculus, I prefer to call a function $f:D\rightarrow\mathbb{R}$ (where $D$ is a subset of, or is equal to, $\mathbb{R}$) discontinuous if its graph cannot be drawn with a single penstroke. In which case $f(x)=1/x$ would be called discontinuous. However, $f(x)=1/x$ is definitely continuous on its domain ($x\neq0$). It's not continuous on $\mathbb{R}$ $-$ it's not even defined on all of $\mathbb{R}$.

The examples $f(x)=1/x$ and $g(x)=1/x^2$ are not continuous at $x=0$! They do not satisfy the definition of continuity there, so we call it discontinuous at the origin. Anyone who calls it continuous at the origin is wrong, in general.

However, we can define the extended real numbers: $\overline{\mathbb{R}}=\{-\infty\}\cup \mathbb{R}\cup \{\infty\}$ and define: $$g(x)=\begin{cases} \frac{1}{x^2} \text{ if } x\neq 0, \pm\infty \\ \infty \text{ if } x = 0 \\ 0 \text{ if } x=\pm\infty, \end{cases}$$ and $g:\overline{\mathbb{R}}\rightarrow \overline{\mathbb{R}}$ can be said to be continuous on the extended reals. Of course, you have to carefully consider how to define continuity in this context.