• mathematics

Defining a Limit Formally

After building the intuitive idea of what a limit is, you may be dissatisfied with the lack of rigor in how the concept is defined. Guessing the value of a limit like

limx2(x+5)(x2)(x2)=7\lim\limits_{x \to 2} \frac{(x +5 )(x - 2)}{(x - 2)} = 7

is straightforward if you have an image of its graph, but how could you prove it? You could say “as xx approaches 2,2\text{,} output values get closer to 77”, but what does “closer” mean here? Do output values have to be strictly closing distance toward 7?7\text{?} What if the output values trend towards 77 but oscillate back and forth as xx approaches 2?2\text{?}

Formalizing intuition

In order to prove that the limit equals 7,7\text{,} we need to specify what a limit is. In the previous chapter, we looked at tables of xx and yy values, and if from both sides, as the xx value approached some given constant, the yy values appeared to converge somewhere, we concluded that the limit was at that point of convergence. The question that naturally appears is “How close to our posited point of convergence do we have to get in order to define the limit there?”

Let’s think back to our intuitive idea of the limit and see how we can apply it. Take f(x)f(x) as the signum function, which returns an output of 1-1 for all negative inputs, 00 for an input of 0,0\text{,} and 11 for all positive inputs. Defined piecewise, it looks like:

f(x)={1x<00x=01x>0f(x) = \begin{cases} -1 & x < 0 \\ 0 & x = 0 \\ 1 & x > 0 \end{cases}

We want to test if limx0f(x)=0\lim_{x \to 0} f(x) = 0 is true. As shown in Fig. 1, if you go any distance left or right of x=0,x = 0\text{,} you jump to y=1y = -1 or y=1.y = 1\text{.} Even just by looking, this is uncontroversially a limit that does not exist, because the y-values are never “approaching” y=0.y = 0\text{.}

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

What would make this limit exist? It might look like the hyperbolic tangent function, where we smoothly curve the breakpoints into each other. By making it possible to go left/right of (0,0)(0, 0) by some infinitesimally small distance and not jump directly to y=±1,y = \pm 1\text{,} the function becomes continuous.

Therefore, in order to weed out these jumps, let’s create tiny distances from y=0.y = 0\text{.} If the limit exists, there should be a small window around the value our xx approaches where every single corresponding output is within that distance to y=0.y = 0\text{.} Otherwise, there would be a clear jump of output values immediately to the left or right of x=0,x = 0\text{,} as shown in the signum function.

Since we’re still using the phrase “tiny distances”, let’s formalize that into a symmetric window around y=0,y = 0\text{,} as shown in Fig. 2 by the dashed lines. Call ε\varepsilon (pronounced “epsilon”) the distance from the center to the top/bottom line, so in our case, we’d have a window created by the lines y=0εy = 0 - \varepsilon and y=0+ε.y = 0 + \varepsilon\text{.}

Next, we need to make an appropriate window on the x-axis for any ε\varepsilon value. Use the variable δ\delta (pronounced “delta”) to make a window from x=0δx = 0 - \delta to x=0+δ.x = 0 + \delta\text{.} The criteria for a valid δ\delta is that any xx you choose within that window will correspond to a yy within the window on the y-axis.

For an existent limit, there’s a maximum δ\delta value you could choose, as illustrated by the vertical lines in Fig. 2. If you try going higher than this value, one of the x-values near the edge of the window will correspond to a y-value outside our defined ϵ\epsilon window. Anything lower will be valid, since it’d correspond to an output interval that’s a subset of our ϵ\epsilon defined one.

However, δ\delta is never zero. Since the point of a limit is to see what the value approaches without actually taking into account the value itself, we exclude the x-value we’re approaching from the horizontal window test.

1980-01-01T00:00:00+00:00 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/
Fig. 2: Epsilon and maximum delta

Let’s try to generalize this process for any function. We’ll use the generic form of limxaf(x)=L.\lim_{x \to a} f(x) = L\text{.} Given a ε>0\varepsilon > 0 for the vertical window, we need to find a corresponding δ>0\delta > 0 such that

0<xa<δ    f(x)L<ε0 < |x - a| < \delta \implies |f(x) - L| < \varepsilon

If we can show that a valid δ\delta exists for any ε>0,\varepsilon > 0\text{,} then limxaf(x)=L\lim_{x \to a} f(x) = L would be proven true.

Proving a limit statement

With our rigorous definition of a limit, let’s try proving limit statements. Remember that the goal is simply to prove that if 0<xa<δ,0 < |x - a| < \delta\text{,} then f(x)L<ε.|f(x) - L| < \varepsilon\text{.} If we can express δ\delta in terms of ε,\varepsilon\text{,} we can translate the right side of xa<δ|x - a| < \delta to something involving ε.\varepsilon\text{.}

We’ll try to prove limx22x=4.\lim_{x \to 2} 2x = 4\text{.} Although 2x2x is defined at x=2,x = 2\text{,} we’ll use this to get familiar with the structure of what an epsilon-delta proof looks like. First orient ourselves with the goal: If ε\varepsilon is a given positive number, find a δ>0\delta > 0 such that

0<x2<δ    2x4<ε0 < |x - 2| < \delta \implies |2x - 4| < \varepsilon

To start, we can factor:

2x4=2x2|2x - 4| = 2|x - 2|

The target inequality is 2x4<ε,|2x - 4| < \varepsilon\text{,} which we now change to x2<ε/2.|x - 2| < \varepsilon / 2\text{.} Since we are the ones controlling δ,\delta\text{,} we can set it to anything we want. We know that 0<x2<δ,0 < |x - 2| < \delta\text{,} so let’s set δ=ε/2\delta = \varepsilon / 2 and verify the target inequality holds.

2x4=2x2<2δ|2x - 4| = 2|x - 2| < 2\delta

And since we know 2δ=ε,2\delta = \varepsilon\text{,} substitution yields

2x4<ε|2x - 4| < \varepsilon

which is what we needed to show. \square

If you were wondering why we set δ=ε/2,\delta = \varepsilon / 2\text{,} it’s because we were reverse-engineering the desired result. We wanted 2x4<ε,|2x - 4| < \varepsilon\text{,} which algebraically can be manipulated to x2<ε/2.|x - 2| < \varepsilon / 2\text{.} Since we already had x2<δ|x - 2| < \delta from the original given, we wanted to make δ\delta (a variable which we control) equal to ε/2,\varepsilon / 2\text{,} since the proof becomes trivial after that.

Since δ\delta can be made smaller and still satisfy being in the ε\varepsilon window (just a smaller subset of it), our proof still works if we tried setting δ=ε/3.\delta = \varepsilon / 3\text{.}

Start with

x2<δ=ε3|x - 2| < \delta = \frac{\varepsilon}{3}

then we have x2<ε/3,|x - 2| < \varepsilon / 3\text{,} so

2x2=2x4<2ε32|x - 2| = |2x - 4| < \frac{2\varepsilon}{3}

which still satisfies our requirement of being less than ε.\varepsilon\text{.} \square

Higher complexity

I designed the limit we just proved to be as straightforward as possible with delta-epsilon. We started by working backwards from the inequality we wanted to prove, then got the left side to be the same as the given inequality. After expressing δ\delta in some form of ε,\varepsilon\text{,} the proof could be finished simply by manipulating our given inequality into the desired inequality with clever substitution.

This is the extent of delta-epsilon you’d probably encounter in an introductory calculus course, but non-contrived limits are still provable. To finish off this chapter, let’s work through limx2x3=8\lim_{x \to 2} x^3 = 8 and find a more general pattern. We want to prove for every positive ε,\varepsilon\text{,} there is a δ\delta such that

0<x2<δ    x38<ε0 < |x - 2| < \delta \implies |x^3 - 8| < \varepsilon

Start by factoring

x38=(x2)(x2+2x+4)x^3 - 8 = (x - 2)(x^2 + 2x + 4)

which gets us

x38=x2x2+2x+4|x^3 - 8| = |x - 2| \cdot |x^2 + 2x + 4|

This is where we branch off from the previous example, because x2+2x+4|x^2 + 2x + 4| has a variable inside it, so we can’t divide ε\varepsilon by it. We’re going to try to constrain δ\delta two different ways.

First, set δ1\delta \leq 1 which makes the quadratic reach its maximum at x=3,x = 3\text{,} giving us x2+2x+4<19.|x^2 + 2x + 4| < 19\text{.}

x2x2+2x+4<x219|x - 2| \cdot |x^2 + 2x + 4| < |x - 2| \cdot 19

and our desired inequality needs this to be less than ε,\varepsilon\text{,} so we can write

x2<ε19|x - 2| < \frac{\varepsilon}{19}

In order for this to work, we needed both δ1\delta \leq 1 for x2+2x+4<19|x^2 + 2x + 4| < 19 and δε/19\delta \leq \varepsilon / 19 to get us to our desired inequality. Both will be satisfied if we just choose the smaller one, so use δ=min(1,ε/19).\delta = \min(1, \varepsilon / 19)\text{.}

To finish off, we started with a given ε>0\varepsilon > 0 and we’ve defined δ=min(1,ε/19).\delta = \min(1, \varepsilon / 19)\text{.} We have x2<1,|x - 2| < 1\text{,} and the δ1\delta \leq 1 gives us x2+2x+4<19.|x^2 + 2x + 4| < 19\text{.} With our definition of δ,\delta\text{,} we also get x2<ε/19.|x - 2| < \varepsilon / 19\text{.} Now we can substitute

x2x2+2x+4<ε1919|x - 2| \cdot |x^2 + 2x + 4| < \frac{\varepsilon}{19} \cdot 19

proving the limit. \square

Now that we’ve formalized the limit, we can start becoming comfortable manipulating and composing limits, which is exactly what we’ll do in the next chapter. That is all for the epsilon-delta definition of limits, and until next time, I am out.