Search

Search papers and lessons

Limit of a Function

Level 1 · 10 min read

A limit is the value a function's output approaches as its input gets close to a point, even when the function is not defined at that point.

On this page

TL;DR

A limit describes where the output of a function is heading as the input gets closer and closer to some value. It does not care what happens exactly at that value, and the function may not even be defined there. The formal version, the epsilon-delta definition, turns "gets as close as we like" into a test you can check with numbers.

Limits are the foundation under the derivative, the integral and the idea of a continuous function.

Where you'll see it: in the slope of a curve at a single point, in the area under a curve, and in deciding whether a formula has a sensible value at a point where direct substitution gives nonsense.

Intuition

Getting close without arriving

Take the function

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

Ask what happens at x=2x = 2. Substitute and you get 00\frac{0}{0}, which is not a number. The function is simply undefined there. But that does not stop us from asking what ff is doing near 22. Walk toward 22 from both sides and read off the heights:

xx1.91.91.991.991.9991.999222.0012.0012.012.012.12.1
f(x)f(x)3.93.93.993.993.9993.999undefined4.0014.0014.014.014.14.1

The heights settle toward 44 from both sides. We say the limit of f(x)f(x) as xx approaches 22 is 44, written lim⁡x→2f(x)=4\lim_{x \to 2} f(x) = 4. The function has a hole at x=2x = 2, and the limit is the height the curve is aiming for at that hole.

00.511.522.533.540123456xf(x)
  • y = x + 2 (same as f, except at x = 2)
The function equals the line y = x + 2 everywhere except x = 2, where it has a hole (the plot draws the line straight through). The marker shows the limit: the height the curve approaches there, which is 4.

Why the idea exists

Limits were invented to make sense of two problems that looked impossible. The first is the slope of a curve at one point. A slope needs two points, but at a single point there is only one. The usual fix is to take a second point close by and shrink the gap. That shrinking gap produces a fraction of the form 00\frac{0}{0} in the limit, and the limit is what gives the slope a precise meaning. This is the derivative of a function, and it is built entirely from limits.

The second is the value of a function at a point. Sometimes the value is missing, sometimes it is wrong by accident, and sometimes it is perfectly fine but still not the whole story. A limit asks about the neighbours of a point, not the point itself. That is why it is the right tool for "what does this function really want to do here?"

The math

The informal definition

We write lim⁡x→af(x)=L\lim_{x \to a} f(x) = L, read "the limit of f(x)f(x) as xx approaches aa is LL", when f(x)f(x) gets as close to LL as we like whenever xx is close enough to aa but not equal to aa. The clause "not equal to aa" is why the value f(a)f(a) never matters.

The epsilon-delta definition

The informal version hides a challenge. "As close as we like" has to be made precise. The standard way is to let an opponent name a tolerance on the output and then find a tolerance on the input that meets it.

Definition: Limit of a function

Let ff be defined on an open interval around aa, except possibly at aa itself. We say lim⁡x→af(x)=L\lim_{x \to a} f(x) = L if for every ε>0\varepsilon \gt 0 there exists a δ>0\delta \gt 0 such that whenever 0<∣x−a∣<δ0 \lt |x - a| \lt \delta, we have ∣f(x)−L∣<ε|f(x) - L| \lt \varepsilon.

Here ε\varepsilon (epsilon) is the output tolerance: how close f(x)f(x) must be to LL. The symbol δ\delta (delta) is the input tolerance: how close xx must be to aa. The quantity ∣x−a∣|x - a| is the distance between xx and aa, and the condition 0<∣x−a∣0 \lt |x - a| says that xx is not equal to aa. The order matters. The opponent picks ε\varepsilon first, and then δ\delta may depend on ε\varepsilon.

One-sided limits

Sometimes a function behaves differently on the two sides of aa. The limit from the left, lim⁡x→a−f(x)\lim_{x \to a^-} f(x), uses only x<ax \lt a. The limit from the right, lim⁡x→a+f(x)\lim_{x \to a^+} f(x), uses only x>ax \gt a. The two-sided limit exists exactly when both one-sided limits exist and are equal.

Limit laws

If lim⁡x→af(x)=L\lim_{x \to a} f(x) = L and lim⁡x→ag(x)=M\lim_{x \to a} g(x) = M both exist, then

lim⁡x→a(f(x)+g(x))=L+M,lim⁡x→a(f(x) g(x))=L M,lim⁡x→af(x)g(x)=LMif M≠0.\begin{aligned} \lim_{x \to a} \big(f(x) + g(x)\big) &= L + M, \\ \lim_{x \to a} \big(f(x)\, g(x)\big) &= L\, M, \\ \lim_{x \to a} \frac{f(x)}{g(x)} &= \frac{L}{M} \quad \text{if } M \ne 0. \end{aligned}

Constants and the identity pass straight through: lim⁡x→ac=c\lim_{x \to a} c = c and lim⁡x→ax=a\lim_{x \to a} x = a. These rules let you build limits of complicated formulas from simple pieces, which is why most limits in practice are computed by algebra rather than by ε\varepsilon and δ\delta.

Limits at infinity

The same idea works when the input grows without bound. We write lim⁡x→∞f(x)=L\lim_{x \to \infty} f(x) = L when f(x)f(x) gets as close to LL as we like once xx is large enough. For example, lim⁡x→∞1x=0\lim_{x \to \infty} \frac{1}{x} = 0, because 1x\frac{1}{x} shrinks toward 00 as xx grows.

Worked examples

Example
A removable hole

Find lim⁡x→2x2−4x−2\lim_{x \to 2} \dfrac{x^2 - 4}{x - 2}.

  1. Substitute x=2x = 2 directly: 22−42−2=00\dfrac{2^2 - 4}{2 - 2} = \dfrac{0}{0}. This tells us nothing, so we simplify first.
  2. Factor the numerator: x2−4=(x−2)(x+2)x^2 - 4 = (x - 2)(x + 2).
  3. For every x≠2x \ne 2, the factor x−2x - 2 cancels: x2−4x−2=x+2\dfrac{x^2 - 4}{x - 2} = x + 2.
  4. The limit of x+2x + 2 as x→2x \to 2 is 2+2=42 + 2 = 4, by the limit laws.

Interpretation: the function has a hole at x=2x = 2, but the curve is heading to height 44 there. This matches the table in the Intuition section, where f(1.999)=3.999f(1.999) = 3.999 and f(2.001)=4.001f(2.001) = 4.001.

Example
Choosing a delta for a given epsilon

Show that lim⁡x→3(2x+1)=7\lim_{x \to 3} (2x + 1) = 7 using the definition. Here a=3a = 3, L=7L = 7 and f(x)=2x+1f(x) = 2x + 1.

  1. Take the output tolerance ε=0.1\varepsilon = 0.1. We need ∣(2x+1)−7∣<0.1|(2x + 1) - 7| \lt 0.1.
  2. Simplify the left side: ∣2x−6∣=2 ∣x−3∣|2x - 6| = 2\,|x - 3|. So the requirement is 2 ∣x−3∣<0.12\,|x - 3| \lt 0.1, which means ∣x−3∣<0.05|x - 3| \lt 0.05.
  3. Choose δ=0.05\delta = 0.05. If 0<∣x−3∣<0.050 \lt |x - 3| \lt 0.05, then ∣f(x)−7∣=2 ∣x−3∣<2(0.05)=0.1|f(x) - 7| = 2\,|x - 3| \lt 2(0.05) = 0.1. The test passes.
  4. For a general ε>0\varepsilon \gt 0, the choice δ=ε/2\delta = \varepsilon / 2 works, because 2 ∣x−3∣<2(ε/2)=ε2\,|x - 3| \lt 2(\varepsilon / 2) = \varepsilon.

Interpretation: a tighter output tolerance forces a tighter input window. The ratio 22 appears because the function stretches distances by a factor of 22. Since a δ\delta exists for every ε\varepsilon, the limit is 77.

Example
An average rate becoming an instant rate

Let g(t)=t2g(t) = t^2, a position that grows over time. Find the limit of the average rate of change over [3, 3+h][3,\ 3 + h] as h→0h \to 0.

  1. The average rate is g(3+h)−g(3)h=(9+6h+h2)−9h\dfrac{g(3 + h) - g(3)}{h} = \dfrac{(9 + 6h + h^2) - 9}{h}.
  2. Simplify: 6h+h2h=6+h\dfrac{6h + h^2}{h} = 6 + h for every h≠0h \ne 0.
  3. As h→0h \to 0, the expression 6+h6 + h approaches 66.
  4. Numerical check: at h=0.1h = 0.1 the average rate is 3.12−90.1=0.610.1=6.1\dfrac{3.1^2 - 9}{0.1} = \dfrac{0.61}{0.1} = 6.1, and at h=0.01h = 0.01 it is 6.016.01.

Interpretation: the speed at the instant t=3t = 3 is 66 units per time unit. This is exactly the limit that defines a derivative.

Tradeoffs and failure modes

Limits are simple to state and easy to get wrong in practice. The table lists the usual traps.

SituationWhat goes wrongBetter choice
Direct substitution gives 00\frac{0}{0}The answer looks undefined, which says nothing about the limitSimplify algebraically, as in the first example
Using a calculator at a very small xxRounding can give a wrong answer. For 1−cos⁡xx2\frac{1 - \cos x}{x^2} with x=10−8x = 10^{-8}, a double-precision computer often returns 00, but the true limit is 12\frac{1}{2}Trust the algebra, not the floating-point output
The two one-sided limits differThere is no two-sided limit. The sign function sgn⁡(x)\operatorname{sgn}(x) tends to −1-1 from the left and +1+1 from the right at 00Check both sides separately
The function oscillatessin⁡(1/x)\sin(1/x) keeps swinging between −1-1 and 11 as x→0x \to 0, so no limit existsLook for a bound instead, such as squeezing between two curves
Limits in several variables along one pathThe function xyx2+y2\frac{xy}{x^2 + y^2} tends to 00 along the xx-axis but to 12\frac{1}{2} along the line y=xy = x, so the limit does not existTest many paths, and use the rules in [[multivariable-function

The ε\varepsilon-δ\delta definition is the most reliable check, but it is slow. In most problems the limit laws plus algebra are faster, and the definition is reserved for proofs and tricky cases.

History

Isaac Newton and Gottfried Leibniz developed calculus in the late 1600s. They reasoned with quantities that were vanishingly small, and their arguments about slopes and areas worked, but the foundations were shaky. Newton spoke of "ultimate ratios" of quantities that vanish, and Leibniz used infinitesimals. Critics such as George Berkeley pointed out that these ideas were not clearly defined.

In the 1700s, Jean le Rond d'Alembert described a limit as a quantity that another quantity can approach more closely than any given amount. Bernard Bolzano wrote a definition close to the modern one in 1817. Augustin-Louis Cauchy, in his 1821 textbook Cours d'analyse, gave a definition in words that is recognisably the one used today. The precise symbolic form with ε\varepsilon and δ\delta is usually credited to Karl Weierstrass, whose lectures in the second half of the 1800s made it standard.

The problem these people were solving was simple to state: how do you make sense of slopes and rates of change without pretending that infinitely small things are real numbers? The limit was the answer that held up under scrutiny, and that is why it caught on.

Check yourself

QuestionIn the definition of lim⁡x→af(x)=L\lim_{x \to a} f(x) = L, does the value f(a)f(a) affect the limit?Show answer

No. The definition only looks at values of xx with 0<∣x−a∣<δ0 \lt |x - a| \lt \delta, so it excludes x=ax = a. The function can be undefined at aa, or have a different value there, and the limit is unchanged. This is what allows the hole in the first example to have a limit of 44.

QuestionFind lim⁡x→1x3−1x−1\lim_{x \to 1} \dfrac{x^3 - 1}{x - 1}.Show answer

Factor the numerator: x3−1=(x−1)(x2+x+1)x^3 - 1 = (x - 1)(x^2 + x + 1). For x≠1x \ne 1 the factor x−1x - 1 cancels, leaving x2+x+1x^2 + x + 1. As x→1x \to 1 this tends to 1+1+1=31 + 1 + 1 = 3. The answer is 33.

QuestionWhy does the sign function have no limit at 00, even though it is defined on both sides of 00?Show answer

The sign function equals −1-1 for every negative xx and +1+1 for every positive xx. The left limit at 00 is −1-1 and the right limit is +1+1. A two-sided limit requires both one-sided limits to exist and be equal, so it fails. The function jumps, and a jump has no single value to approach.

QuestionA car's position is p(t)=t2p(t) = t^2 metres at time tt seconds. The average speed over [2, 2+h][2,\ 2 + h] tends to a limit as h→0h \to 0. What does that limit represent, and what is its value?Show answer

It is the instantaneous speed at t=2t = 2. The average speed is (2+h)2−4h=4h+h2h=4+h\dfrac{(2 + h)^2 - 4}{h} = \dfrac{4h + h^2}{h} = 4 + h for h≠0h \ne 0, which tends to 44. So the car's speed at exactly two seconds is 44 metres per second. The limit turns an average over a shrinking interval into a value at a single instant.

Sources