• mathematics

Continuity and Theorems

Looking back at the first chapter in this section, we worked with various limits and found that some didn’t exist. With some graphs, holes appeared in otherwise smooth curves, while others had entire gaps.

The term continuous is used to describe a function without these features. For a function to be continuous at x=a,x = a\text{,} both f(a)f(a) and lim⁡x→af(x)\lim\limits_{x \to a} f(x) must exist and

lim⁡x→af(x)=f(a)\lim\limits_{x \to a} f(x) = f(a)

When mathematicians colloquially call a function continuous, they usually mean that this equation holds true for all real a.a\text{.} However, I’d encourage precise language and the use of expressions like “continuous on its domain” (which has to be continuous at every point of its domain) or “continuous everywhere on R\mathbb{R}” (which has to be continuous for all real a)a\text{)}. If you do stumble upon the use of “continuous” as a standalone term, just be aware of the context and make your best guess.

As with the example shown in Fig. 1, all polynomials are continuous everywhere on R.\mathbb{R}\text{.} For any real number inputted into a polynomial, a real number is outputted, and the output values have no strange gaps or undefined segments.

1980-01-01T00:00:00+00:00 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Fig. 1: Quintic polynomial

Regardless of the degree or coefficients, since we are only multiplying and adding, the entire graph behaves predictably. However, when the function includes division, edge cases complicate things.

Discontinuities

If the equation does not hold true for some a,a\text{,} it can be said that the function has a discontinuity at x=a.x = a\text{.} If there exists at least one point of discontinuity, the function is discontinuous. Discontinuities generally can be categorized into three types:

  • Removable discontinuities
  • Jump discontinuities
  • Infinite discontinuities

Starting with the removable discontinuity, this appears as a hole in the graph. The function f(x)f(x) provides an example in which the denominator becomes 00 for some xx (55 in this case), but the resulting factor is cancelled out by a factor in the numerator.

f(x)=x2(x−5)(x−5)f(x) = \frac{x^2 (x - 5)}{(x - 5)}

Fig. 2 illustrates the graph of f(x),f(x)\text{,} which resembles a regular parabola with an undefined point at x=5.x = 5\text{.}

1980-01-01T00:00:00+00:00 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Fig. 2: Removable discontinuity

Once you consider what the (x−5)(x - 5) factors in the numerator and denominator do as xx approaches 5,5\text{,} it becomes apparent the hole appears. Substituting x=4.9,x = 4.9\text{,} both of those factors evaluate to −0.1.-0.1\text{.} Then f(x)f(x) becomes

(4.9)2⋅−0.1−0.1=(4.9)2(4.9)^2 \cdot \frac{-0.1}{-0.1} = (4.9)^2

This means that at any input value that isn’t exactly 5,5\text{,} the output values behave identically to the parabola x2.x^2\text{.} However, once x=5,x = 5\text{,} the value 00 appears in the denominator, which means that the function isn’t defined at all, visually manifesting as a hole.

This can be defined algebraically as well. If f(x)f(x) is discontinuous at x=ax = a but lim⁡x→af(x)\lim\limits_{x \to a} f(x) still exists, it is a removable discontinuity.

The jump discontinuity is commonly seen in piecewise functions. Fig. 3 shows a function defined with two cases, each one linear.

1980-01-01T00:00:00+00:00 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Fig. 3: Jump discontinuity

As you can see, the graph has a clear disconnect at x=2.x = 2\text{.} A jump discontinuity can be defined as when the left hand and right hand limits independently exist but are unequal. This also means that the limit at a jump discontinuity does not exist.

Finally, the infinite discontinuity can happen when a value of xx results in division by zero. As xx nears 4,4\text{,} the denominator becomes miniscule, and depending on whether it’s to the left or right, the output can blow up to positive or negative infinity. Fig. 4 demonstrates this with an infinite discontinuity at x=4.x = 4\text{.}

1980-01-01T00:00:00+00:00 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Fig. 4: Infinite discontinuity

We can concretely define an infinite discontinuity as when at least one limit from either side tends to positive or negative infinity. In Fig. 4, we graphed

y=xx−4y = \frac{x}{x - 4}

and upon looking at a table of input/output pairs for xx approaching on either side of 4,4\text{,} it’s clear why the graph seems to shoot off infinitely upward or downward:

xy
3.99-399
3.999-3999
4.01401
4.0014001

The graph never intersects with the vertical line at x=4,x = 4\text{,} because no output exists at that input. We call x=4x = 4 an asymptote of the given function. A line x=ax = a is a vertical asymptote of ff if at least one of the following holds:

lim⁡x→a−f(x)=±∞,lim⁡x→a+f(x)=±∞\lim\limits_{x \to a^-} f(x) = \pm \infty, \quad \lim\limits_{x \to a^+} f(x) = \pm \infty

There are functions with a factor in the denominator that equals zero for some input, but this doesn’t necessarily mean that there’s an infinite discontinuity at that point. For example, recall the function used to illustrate the removable discontinuity at the beginning of this section:

f(x)=x2(x−5)(x−5)f(x) = \frac{x^2 (x - 5)}{(x - 5)}

Even though the denominator is zero at x=5,x = 5\text{,} the graph of ff has no signs of shooting off to infinity. This is because, as explained, the factor that approaches zero gets cancelled out to 11 everywhere except the actual point where it’s zero, resulting in a hole.

There is a useful heuristic you can use on rational functions in factored form to demarcate holes and vertical asymptotes: first, cancel out every equal factor in the numerator and denominator. If that factor still exists in the denominator, the function has an infinite discontinuity. If not, the function has a removable discontinuity.

As a final note in the discussion of discontinuities, I’d like to mention the rarest one: the oscillating discontinuity. In the introduction of chapter two, I asked the question of what happens when a function oscillates as xx approaches a value. It turns out that even if there is technically only a single point where the function is undefined, the limit can be nonexistent if infinite oscillation occurs. One of the most famous examples of this is illustrated in Fig. 5:

1980-01-01T00:00:00+00:00 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Fig. 5: Infinite oscillation

If you zoom out, you might note that the curve appears to be a sine wave that progressively becomes more compressed as xx approaches zero. This is a decently accurate description, as Fig. 5 portrays the graph of

y=sin⁡(1x)y = \sin\left(\frac{1}{x} \right)

Think about what happens when xx gets closer to zero. The argument of the sine function becomes larger and larger, such that the same distance between two input values creates a massive distance in the fraction 1/x.1 / x\text{.} For example, take the two input values x=5x = 5 and x=5.1.x = 5.1\text{.} Their corresponding 1/x1 / x values are 0.20.2 and 0.196,0.196\text{,} respectively. Now consider x=0.1x = 0.1 and x=0.2.x = 0.2\text{.} Their corresponding 1/x1 / x values are 1010 and 5.5\text{.}

Despite both pairs of input values having the same distance of 0.10.1 apart from each other, the distance of their 1/x1 / x values grows from a miniscule 0.0040.004 to an entire 5.5\text{.} Since the sine function is periodic, this means that the same distance in the xx runs through more cycles as xx approaches zero.

Although I won’t be rigorously proving that the limit of this function as xx approaches 00 doesn’t exist, you can use the delta-epsilon definition to grasp why this is. If you set a ε=0.5,\varepsilon = 0.5\text{,} for example, because the function oscillates “infinitely” around zero, there is no δ\delta small enough to exclude an xx value which reaches one of the y=1y = 1 peaks. The same argument disproves any other possible value for the limit, since the function will always be hitting these two peaks in any microscopic horizontal window.

The oscillating discontinuity usually appears at least once in most Calculus I courses, so pay attention to understand why the limit doesn’t exist. The mere appearance of a factor with an oscillating discontinuity does not mean that the limit of the overall function is nonexistent, as you will see later in this chapter.

Intermediate Value Theorem

With a definition of continuity, we can now understand the Intermediate Value Theorem. Intuitively, it simply states that if a function is continuous over a closed interval on the x-axis, it must pass through every height in between the heights of its endpoints. To illustrate through example, shown in Fig. 6 is a polynomial:

1980-01-01T00:00:00+00:00 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Fig. 6: Intermediate Value Theorem

Recall that all polynomials are continuous everywhere along R.\mathbb{R}\text{.} Marked in Fig. 6 are two horizontal lines, one at y=−2y = -2 and the other at y=2.y = 2\text{.} Notate the corresponding x-coordinates for these intersection points as aa and b,b\text{,} respectively. The Intermediate Value Theorem states that if a<ba < b and the function is continuous on [a,b],[a, b]\text{,} then for any real number N∈(−2,2),N \in (-2, 2)\text{,} there must be some c∈(a,b)c \in (a, b) such that f(c)=N.f(c) = N\text{.}

Although this sounds obvious, IVT lets us prove many things rigorously. For example, imagine you’re given a polynomial and you want to prove it has a root in some range. If you find that the function has a negative output at x=0x = 0 but a positive one at x=1,x = 1\text{,} IVT necessitates that the function has an output of zero for some x-value in x∈(0,1).x \in (0, 1)\text{.}

Extreme Value Theorem

In other calculus pedagogy, you might notice mentions of an “Extreme Value Theorem”. I don’t view it as incredibly important beyond justification for a specific type of question (optimization), so I’ll explain it briefly.

If you have a function continuous on a closed finite interval [a,b],[a, b]\text{,} the function must reach both an absolute maximum and absolute minimum at least once in [a,b].[a, b]\text{.} In most Calculus I courses, the EVT is only used to show that absolute extrema exist in problems where you’re asked to find them, so you may have only limited use for it.

Squeeze Theorem

In some cases where a limit is difficult to find, squeezing it between two functions may be a valid solution. Take a look at Fig. 7, specifically the function in blue. What is the limit of the function as xx approaches 0?0\text{?} As we get closer to the origin, the oscillation just gets denser and denser. However, the parabolas in red and green allow us to prove the limit does exist.

1980-01-01T00:00:00+00:00 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Fig. 7: Squeeze Theorem

First, we need to understand the conditions that allow us to apply the Squeeze Theorem here. The upwards and downwards facing parabolas are g(x)=x2g(x) = x^2 and h(x)=−x2,h(x) = -x^2\text{,} respectively. The curve in the middle is

f(x)=x2sin⁡(1x)f(x) = x^2 \sin\left(\frac{1}{x}\right)

We know that the sine function is limited from −1-1 to 1,1\text{,} therefore we can write the following inequality (excluding x=0x = 0 from its domain):

−1≤sin⁡(1x)≤1-1 \leq \sin\left(\frac{1}{x}\right) \leq 1

Multiplying the inequalities by x2x^2 (which is nonnegative) yields

−x2≤x2sin⁡(1x)≤x2-x^2 \leq x^2 \sin\left(\frac{1}{x}\right) \leq x^2

The parabolas are both graphs of polynomials, therefore are continuous at x=0.x = 0\text{.} By directly substituting, we know

lim⁡x→0x2=lim⁡x→0−x2=0\lim\limits_{x \to 0} x^2 = \lim\limits_{x \to 0} -x^2 = 0

The Squeeze Theorem states that because h(x)≤f(x)≤g(x)h(x) \leq f(x) \leq g(x) everywhere except zero and the limits of the outer parabolas are equal as xx approaches 0,0\text{,} lim⁡x→0f(x)=0\lim\limits_{x \to 0} f(x) = 0 as well. Think of the limit as being “squeezed” in between two known limits, hence the name.

The proof is very straightforward with delta-epsilon. To generalize, take h(x)≤f(x)≤g(x)h(x) \leq f(x) \leq g(x) and lim⁡x→ah(x)=lim⁡x→ag(x)=L.\lim\limits_{x \to a} h(x) = \lim\limits_{x \to a} g(x) = L\text{.} For any ε>0,\varepsilon > 0\text{,} the limit statements of the squeezers imply

0<∣x−a∣<δ1  ⟹  ∣h(x)−L∣<ε0<∣x−a∣<δ2  ⟹  ∣g(x)−L∣<ε\begin{gathered} 0 < |x - a| < \delta_1 \implies |h(x) - L| < \varepsilon \\[1em] 0 < |x - a| < \delta_2 \implies |g(x) - L| < \varepsilon \end{gathered}

Since ∣h(x)−L∣<ε|h(x) - L| < \varepsilon means that the distance of h(x)h(x) from LL is less than ε,\varepsilon\text{,} h(x)h(x) must be in between L−εL - \varepsilon and L+ε,L + \varepsilon\text{,} which can be notated as

L−ε<h(x)<L+ε,L−ε<g(x)<L+εL - \varepsilon < h(x) < L + \varepsilon, \quad L - \varepsilon < g(x) < L + \varepsilon

Recalling that h(x)≤f(x)≤g(x),h(x) \leq f(x) \leq g(x)\text{,} we can now combine the inequalities into

L−ε<h(x)≤f(x)≤g(x)<L+ε  ⟹  L−ε<f(x)<L+εL - \varepsilon < h(x) \leq f(x) \leq g(x) < L + \varepsilon \implies L - \varepsilon < f(x) < L + \varepsilon

Therefore, if we set δ=min⁡(δ1,δ2),\delta = \min(\delta_1, \delta_2)\text{,} both conditions are satisfied and ∣f(x)−L∣<ε.|f(x) - L| < \varepsilon\text{.} Since this satisfies the definition of lim⁡x→af(x)=L,\lim\limits_{x \to a} f(x) = L\text{,} the Squeeze Theorem is proved. □\square

This concludes our chapter on continuity (as well as several related theorems). With these definitions in mind, later calculus topics will become much easier to understand. If you’re still taking the effort to keep up with the delta-epsilon proofs, I applaud the effort and encourage you as this series moves into its next section. That’s all for limits and continuity. Zai jian.