Continuity and Discontinuity

The standard definition of continuity usually presented in elementary mathematics texts describes a function as continuous if its graph can be traced “without lifting the pencil from the paper”. Although this idea provides an intuitive starting point from absolute beginners, it is neither precise nor reliable for more advanced or non-elementary functions. Therefore, in this guide, we will examine continuous functions from both analytical and topological perspectives. We will also explore how to handle points or regions in the domain where a function ceases to be continuous.

Definition using limits

The first definition of continuity relies on the $\epsilon$-$\delta$ definition of limits. Formally:

Let $f : A \subseteq \mathbb{R} \to \mathbb{R}$ be a function and let $x_0 \in A$ an accumulation point for $A$. The function $f$ is continuous at $x_0$ if $$ \lim_{x \to x_0} f(x) = f(x_0) $$

In other words, a function is continuous at $x_0$ if the limit of $f(x)$ as $x$ tends to $x_0$ is equal to the value of the function at that point. From this definition, we obtain that:

A function $f : A \subseteq \mathbb{R} \to \mathbb{R}$ is continuous on $A$ if it is continuous $\forall x \in A$.

Let’s look at a simple example. Given the function:

$$ f(x) = \cos(x) $$

and the point $x_0 = 0$, we have that:

$$ \lim_{x \to 0} \cos(x) = 1 = \cos(0) $$

Thus, $\cos(x)$ is continuous on $x = 0$ (and, in fact, $\forall x \in \mathbb{R}$).

Topological definition

Another way to define continuity is from a topological perspective, where instead of defining it in terms of a metric concept such as distance, we formalize it using open sets.

Let $(X, \tau_X)$ and $(Y, \tau_Y)$ two topological spaces. A function $f : X \to Y$ is continuous if the preimage of every open subsets in the codomain is also an open subset in the domain.

In other words, $f$ is continuous if, for all $V \subseteq Y$, the preimage: $$ f^{-1}(V) := \{ x \in X : f(x) \in V \} $$ is also an open subsets in $X$. That is:

$$ \forall V \in \tau_Y \implies f^{-1}(V) \in \tau_X $$

In the Euclidean space $\mathbb{R}$ equipped with the standard topology, open sets can be expressed as unions of open intervals. Thus, if we take an open neighborhood $$ V = (f(x_0) - \epsilon, f(x_0) + \epsilon) $$

of $f(x_0)$ in the codomain, then its preimage $f^{-1}(V)$ will contain an open neighborhood $$ U = (x_0 - \delta, x_0 + \delta) $$ of $x_0$ in the domain.

Let’s look at a practical example. Let $f : \mathbb{R} \to \mathbb{R}$ be the function defined by $f(x) = x^2$ and let $V = (1,4)$ be an open interval in the codomain $\mathbb{R}$. Its preimage is the set defined by: by the set:

$$ \begin{aligned} f^{-1}((1,4)) &= \{ x \in \mathbb{R} : 1 < x^2 < 4 \}\\ &= (-2, -1) \cup (1,4) \end{aligned} $$

Which is the union of two open intervals and is therefore an open set in $\mathbb{R}$.

Discontinuities

A point $x_0$ is called a point of discontinuity of a function $f$ if the function is defined at $x_0$ but it is not continuous there. The types of discontinuities that we will study in this guides are:

Let’s see them in details.

Jump discontinuities

A jump discontinuity is a type of discontinuity where both the left-hand and right-hand limits exist but they are not equal. That is:

$$ \lim_{x \to x_0^-} f(x) = L_1, \ \ \lim_{x \to x_0^+} f(x) = L_2 $$

where: $$ L_1, L_2 \in \mathbb{R}, L_1 \neq L_2 $$

For example, given:

$$ f(x) = \begin{cases} x + 1, & x < 1\\ \frac{x}{2}, & x \geq 1 \end{cases} $$

We have the following jump at $x=1$:

In fact, if we evaluate the left-hand and the right-hand limits at $x=1$, we obtain: $$ \lim_{x \to 1^-} f(x) = \lim_{x \to 1^-} (x + 1) = 2 $$

On the other hand, from the right:

$$ \lim_{x \to 1^+} f(x) = \lim_{x \to 1^+} \frac{x}{2} = \frac{1}{2} $$

As you can see from the previous picture, the graph “jumps” from $2$ down to $\frac{1}{2}$. The size of the jump is therefore:

$$ | L_2 - L_1 | = \left|\frac{1}{2} - 2\right| = \frac{3}{2} $$

Infinite discontinuities

An infinity discontinuity is a type of discontinuity where at least one of the one-sided limits as $x \to x_0$ diverges to $\pm \infty$. That is:

$$ \lim_{x \to x_0^-} f(x) = \pm \infty \ \ \vee \ \ \lim_{x \to x_0^+} f(x) = \pm \infty $$

For example, let’s consider the following function, which represents a rectangular hyperbola:

$$ f(x) = \frac{1}{x} $$

has a discontinuity at $x=0$. In fact:

As you can see from the previous graph, from the right, the function rises to $+\infty$, while from the left, it decreases to $-\infty$. Let’s prove this analytically:

$$ \lim_{x \to 0^-} \frac{1}{0^-} = -\infty $$

On the other hand:

$$ \lim_{x \to 0^+} \frac{1}{0^+} = +\infty $$

Removable discontinuity

The last type of discontinuity we will study on this lesson is called removable discontinuity. It occurs when both the left-hand and the right-hand limits of a function as $x \to x_0$ exist, are finite and are equal, but the function is either undefined at $x_0$ or its value differs from the common limit. In other words:

$$ \lim_{x \to x_0^-} f(x) = \lim_{x \to x_0^+} f(x) = \ell \in \mathbb{R} $$

and either:

$$ f(x_0) \neq \ell $$

or $f(x_0)$ is undefined.

This type of discontinuity is called removable since the function can be made continuous at $x_0$ by redefining its value at that point. We do this by defining a new function:

$$ \hat{f}(x) = \begin{cases} f(x) &\iff x \neq x_0\\ \ell &\iff x = x_0 \end{cases} $$

Where:

$$ \ell = \lim_{x \to x_0^-} f(x) = \lim_{x \to x_0^+} f(x) $$

Let’s look at an example. Consider the following piecewise function:

$$ f(x) = \begin{cases} x + 3 &\iff x \neq 4\\ -1 &\iff x = 4 \end{cases} $$

We notice that:

$$ \lim_{x \to 4^-} (x + 3) = \lim_{x \to 4^+} (x + 3) = 7 $$

However, if we evaluate the function on $x_0 = 4$, we obtain, by definition:

$$ f(4) = -1 $$

Since the left-hand and right-hand limits are equal and finite but differ from the actual function value, we have a removable discontinuity at $x = 4$. As mentioned earlier, we can easily fix this discontinuity by redefining the function as follows:

$$ \hat{f}(x) = \begin{cases} x + 3 &\iff x \neq 4\\ 7 &\iff x = 4 \end{cases} $$

Notice that $\hat{f}$ is now continuous at $x = 4$, since:

$$ \lim_{x \to 4} \hat{f}(x) = \hat{f}(4) = 7 $$