Advanced level

Limit of a function

A limit says where the values of a function are heading as the argument closes in on a number — even when the function has no value at that number at all. It is the first idea of analysis and the ground the derivative stands on.

Before you start

This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:

Where this is used

Real situations where you count exactly the way this lesson teaches:

  • A coffee machine instead of the café
    The machine costs 1,200 and a cup made on it costs 1.10, so the cost per cup after n cups is f(n) = (1200 + 1.1n)/n = 1.1 + 1200/n. After a hundred cups that is 13.10, after a thousand 2.30, and the limit as n grows without bound is 1.10 — a floor you will never get under, not if you drink coffee daily for twenty years. The limit is what answers "how little can this possibly cost", and set against a café at 14 it puts the break-even at the 93rd cup.
  • Adding processor cores
    If 10% of the work cannot be parallelised, the speed-up on n cores is 1/(0.1 + 0.9/n). Eight cores give 4.7 times, eighty give 9.0 times, eight hundred give 9.9 times, and the limit as n grows without bound is exactly 10. An architect reads from it what no single benchmark shows: past a hundred cores you are buying hardware for fractions of a percent, and the only way forward is back to that 10% of the code.
  • A courier price list
    A courier charges 22 for a parcel up to 30 kg, and from 30.01 kg the pallet tariff of 68 applies. The left-hand limit of the price at 30 kg is 22, the right-hand limit is 68, so no limit exists there and the price function is discontinuous. The practical reading of that discontinuity: 100 g of excess weight costs 46, so it pays to repack rather than to squeeze one more item in.

All formulas

  • Limit of a function

    limxx0f(x)=g\lim_{x \to x_0} f(x) = g

    the values f(x) close in on g as x closes in on x₀

  • Continuous function

    limxx0f(x)=f(x0)\lim_{x \to x_0} f(x) = f(x_0)

    a polynomial is continuous, so the limit is plain substitution

  • The 0/0 indeterminate form

    limx2x24x2=limx2(x+2)=4\lim_{x \to 2} \frac{x^2 - 4}{x - 2} = \lim_{x \to 2} (x + 2) = 4

    cancel the common factor first, substitute afterwards

  • Equal degrees

    limxanxn+bnxn+=anbn\lim_{x \to \infty} \frac{a_n x^n + \ldots}{b_n x^n + \ldots} = \frac{a_n}{b_n}

    the ratio of the leading coefficients

  • Numerator of lower degree

    limxamxm+bnxn+=0(m<n)\lim_{x \to \infty} \frac{a_m x^m + \ldots}{b_n x^n + \ldots} = 0 \quad (m < n)

    the denominator grows faster, so the quotient dies away

  • One-sided limits

    limxx0f(x)=limxx0+f(x)=g    limxx0f(x)=g\lim_{x \to x_0^-} f(x) = \lim_{x \to x_0^+} f(x) = g \iff \lim_{x \to x_0} f(x) = g

    a limit exists only when both sides agree

  • Continuity at a point

    limxx0f(x)=limxx0+f(x)=f(x0)\lim_{x \to x_0^-} f(x) = \lim_{x \to x_0^+} f(x) = f(x_0)

    the value exists, the limit exists and the two agree

  • The intermediate value property

    f(a)f(b)<0    c(a;b):f(c)=0f(a) \cdot f(b) < 0 \implies \exists\, c \in (a; b): f(c) = 0

    a continuous function with opposite signs at the ends has a root

Quantities rarely interest us at a single point; what matters is the approach to it. That is what a limit describes: which number the values f(x)f(x) are heading for as the argument closes in on x0x_0 — while the point x0x_0 itself is never taken into account.

limxx0f(x)=g\lim_{x \to x_0} f(x) = g

Read it as "the limit of ff as xx tends to x0x_0 equals gg". Notice that the sentence never says "value" — and that is no accident.

When substitution is enough

For a continuous function — and a polynomial is continuous at every point — the limit simply is the value:

limxx0f(x)=f(x0)\lim_{x \to x_0} f(x) = f(x_0)

So limx3(x22x)=96=3\lim_{x \to 3} (x^2 - 2x) = 9 - 6 = 3, with no trickery involved: the graph has neither a hole nor a jump there, so "heading towards" and "being at" agree. Most limits you will meet work this way, which is why the first move is always to try substituting. The word "continuous" itself is defined later in this lesson, because the definition needs one-sided limits we do not have yet.

The trouble starts only when substitution returns nonsense.

The 0/0 indeterminate form

Look at the function

f(x)=x24x2f(x) = \frac{x^2 - 4}{x - 2}

At x=2x = 2 the denominator is zero, so the function has no value there — its domain is every number except two. Substituting gives 00\tfrac{0}{0}, which is nothing at all. And yet the graph looks like this:

−101234501234567xyx = 2y = x + 2
Everywhere except x = 2 our function is the plain line y = x + 2. At x = 2 the graph has a one-point hole — and that is precisely where we ask for the limit.

Because for every x2x \neq 2 the shared factor may be cancelled:

x24x2=(x2)(x+2)x2=x+2\frac{x^2 - 4}{x - 2} = \frac{(x - 2)(x + 2)}{x - 2} = x + 2

A limit never looks inside the point x0x_0, so the cancelling is entirely legitimate:

limx2x24x2=limx2(x+2)=4\lim_{x \to 2} \frac{x^2 - 4}{x - 2} = \lim_{x \to 2} (x + 2) = 4

The symbol 00\tfrac{0}{0} is called indeterminate for exactly this reason: on its own it means nothing. Two other functions landing on 00\tfrac{0}{0} at a point may have limit 00, limit 7-7, or none. It is not a result but a note that the computation has to go another way.

Compute lim(x → 3) (x² − 9)/(x − 3) and lim(x → 1) (x² − 5x + 4)/(x − 1).

Limits at infinity

The second question we put to a function is what happens to it as the argument grows without end. For a rational function the answer is decided by comparing degrees.

0246810120123456xyy = 3f(x) = (3x² + 2)/(x² − 1)
The curve never touches the line y = 3, yet it gets arbitrarily close to it. Such a line is called a horizontal asymptote.

Asymptotes — vertical, horizontal and oblique — are taught in rational functions; here we look at one from the side of the limit, because a horizontal asymptote is nothing other than the limit of a function at infinity.

With equal degrees only the ratio of the leading coefficients counts — the remaining terms grow too slowly to change anything:

limx3x2+2x21=31=3\lim_{x \to \infty} \frac{3x^2 + 2}{x^2 - 1} = \frac{3}{1} = 3

When the numerator's degree is lower, the denominator grows faster and the quotient dies away:

limx2x+5x2+1=0\lim_{x \to \infty} \frac{2x + 5}{x^2 + 1} = 0

Formally both cases are one move: divide the numerator and the denominator by the highest power of the denominator and use the fact that 1x0\tfrac{1}{x} \to 0.

Compute lim(x → ∞) (6x² − x)/(2x² + 7) and lim(x → ∞) (4x + 1)/(x² − 3).

One-sided limits

A point can be approached from two sides — and sometimes that makes a difference. The left-hand limit takes only arguments smaller than x0x_0, the right-hand limit only larger ones:

limxx0f(x),limxx0+f(x)\lim_{x \to x_0^-} f(x), \qquad \lim_{x \to x_0^+} f(x)

The ordinary limit exists exactly when both one-sided limits exist and agree:

limxx0f(x)=limxx0+f(x)=g    limxx0f(x)=g\lim_{x \to x_0^-} f(x) = \lim_{x \to x_0^+} f(x) = g \iff \lim_{x \to x_0} f(x) = g

When there is no limit

The cleanest example is f(x)=1xf(x) = \tfrac{1}{x} at zero:

−5−4−3−2−1012345−5−4−3−2−1012345xyf(x) = 1/x
The two branches of the hyperbola 1/x. Approaching zero from the right the values grow without end; from the left they fall without end. There is no common limit.

From the right the values grow without bound, from the left they fall without bound:

limx0+1x=+,limx01x=\lim_{x \to 0^+} \frac{1}{x} = +\infty, \qquad \lim_{x \to 0^-} \frac{1}{x} = -\infty

Limits like these are called improper. Writing \infty does not claim that the limit is some number — it is shorthand for "grows without bound". And since the two sides escape in opposite directions, the limit limx01x\lim_{x \to 0} \tfrac{1}{x} does not exist.

Three typical situations in which there is no limit:

  • different one-sided limits — the function jumps, the way a tariff changes at midnight;
  • escape to opposite infinities — the case of 1x\tfrac{1}{x} above;
  • oscillation — the values keep swinging and never settle on a direction.
A car park charges £5 for the first hour and £9 for every further hour started. Does the cost have a limit as the time tends to 1 hour?

Continuity at a point

At the start of the lesson a sentence went past: "for a continuous function, substitution is enough". We now have everything needed to say what it means — because continuity is defined through the limit, not the other way round.

A function ff is continuous at a point x0x_0 when it meets three conditions at once:

  1. it has a value at x0x_0, that is, x0x_0 is in the domain;
  2. it has a limit at x0x_0, that is, both one-sided limits exist and agree;
  3. that limit equals the value.

In one line:

limxx0f(x)=limxx0+f(x)=f(x0)\lim_{x \to x_0^-} f(x) = \lim_{x \to x_0^+} f(x) = f(x_0)

There are three conditions because each can fail on its own — and every one of those failures has already appeared in this lesson:

  • x24x2\tfrac{x^2 - 4}{x - 2} at x0=2x_0 = 2 breaks the first: the limit is 44, but there is no value at all;
  • the courier's price list at 3030 kg breaks the second: there is a value, but the one-sided limits differ;
  • a function equal to x+2x + 2 everywhere except at 22, where it stubbornly returns 100100, breaks the third only: limit and value both exist, they simply disagree.

A function is continuous on an interval when it is continuous at each of its points. Polynomials are continuous on the whole of R\mathbb{R}, rational functions everywhere except the zeros of the denominator, sine and cosine everywhere. And that is the entire content of the sentence we started from: for such functions the limit is substitution, because the third condition says exactly that.

For which value of the parameter a is the function f(x) = x² for x ≤ 1 and f(x) = ax + 3 for x > 1 continuous at x₀ = 1?

Kinds of discontinuity

Since the conditions can fail in three ways, discontinuities are not all alike either. In each case the name says what can be done about it.

A removable discontinuity — the limit at the point exists, only the value is missing or different. Writing in or correcting a single number makes the function continuous, which is where the name comes from. The graph shows a hole: one missing point, as in x24x2\tfrac{x^2 - 4}{x - 2} at 22.

A jump discontinuity — both one-sided limits exist but differ. No value written in at the point repairs that, because two sides would have to be repaired at once. The graph jumps, the way the courier's tariff does at thirty kilograms.

A discontinuity of the second kind — at least one one-sided limit fails to exist at all: the values escape to infinity, as 1x\tfrac{1}{x} does at zero, or oscillate without settling on a direction.

The first and third cases are exactly the pair that rational functions tells apart as a hole and a pole: when a common factor of numerator and denominator cancels, what is left is a removable discontinuity; when there is nothing to cancel, a vertical asymptote stands there.

The intermediate value property

Continuity is not merely a label that makes arithmetic easier — it carries a theorem no single substitution could reveal.

The intermediate value property (Darboux). If ff is continuous on the closed interval a;b\langle a; b \rangle, then it takes every value between f(a)f(a) and f(b)f(b).

The intuition is literally about the picture: the graph of a continuous function is drawn without lifting the pencil, so in travelling from height f(a)f(a) to height f(b)f(b) no height along the way can be skipped.

What we use most often is the consequence about one intermediate value — zero:

f(a)f(b)<0    c(a;b):f(c)=0f(a) \cdot f(b) < 0 \implies \exists\, c \in (a; b): f(c) = 0

The product is negative exactly when the values at the ends have opposite signs — and then zero lies between them.

0123−3−2−1012345xyf(1) = −1f(2) = 2f(x) = x² − 2values at the ends
At the ends of ⟨1; 2⟩ the values have opposite signs and the graph is continuous — so somewhere between them it has to cross the axis. That place is √2, but the theorem does not say so: it guarantees existence and nothing more.

Notice what the theorem does not say. It names no cc, it does not say how many such cc there are — there may be many — and it does not hold without continuity: the courier's price list jumps from 22 to 68 and takes no value in between.

Show that the equation x³ + x = 3 has a solution, and narrow it down to an interval of length 0.25.

What limits are for

They are the only tool that answers the question "how big is the change at a point". The difference quotient — the expression the derivative is about to be built from — heads towards 00\tfrac{0}{0} as the gap shrinks, so without a limit it cannot be evaluated at all.

The same mechanism lets the region under a curve be sliced into ever thinner strips and pushed to a limit, at which moment the sum of rectangle areas becomes an integral. Both of the lessons that follow rest on this one idea.

Exercises

The exercises cover the three situations of this lesson: the limit of a polynomial (plain substitution), the 00\tfrac{0}{0} form that needs cancelling, and a limit at infinity. All of them are finite, so the answer is always a number — the cases with \infty and "no limit" are settled by reasoning, not by typing.

Practice

Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.

Exercise 1 of 8Score: 0
lim(x → 4) (3x² + 5x + 9) =

Common mistakes

  • Treating 0/0 as a result — it is an indeterminate form, an instruction to compute differently, not a number.
  • Confusing the limit with the value — a function may have no value at a point and still have a limit there.
  • Substituting ∞ into the formula — infinity is not a number; compare degrees or divide by the highest power.
  • Declaring a limit to exist after checking one side — both one-sided limits must agree.
  • Cancelling without factoring — in x24x2\tfrac{x^2 - 4}{x - 2} you may not cancel the bare "x"; factor first, cancel second.
  • Writing an improper limit as a number++\infty describes a behaviour, it is not an answer to type in.
  • Confusing the existence of a limit with continuity — a limit may exist where the function has no value; continuity needs both, and needs them equal.
  • Applying the intermediate value property to a discontinuous function — the theorem assumes continuity across the interval; without it the graph may jump the axis and have no root at all.

Formula card

Topic: Limit of a function

  • Limit of a function

    limxx0f(x)=g\lim_{x \to x_0} f(x) = g

    the values f(x) close in on g as x closes in on x₀

  • Continuous function

    limxx0f(x)=f(x0)\lim_{x \to x_0} f(x) = f(x_0)

    a polynomial is continuous, so the limit is plain substitution

  • The 0/0 indeterminate form

    limx2x24x2=limx2(x+2)=4\lim_{x \to 2} \frac{x^2 - 4}{x - 2} = \lim_{x \to 2} (x + 2) = 4

    cancel the common factor first, substitute afterwards

  • Equal degrees

    limxanxn+bnxn+=anbn\lim_{x \to \infty} \frac{a_n x^n + \ldots}{b_n x^n + \ldots} = \frac{a_n}{b_n}

    the ratio of the leading coefficients

  • Numerator of lower degree

    limxamxm+bnxn+=0(m<n)\lim_{x \to \infty} \frac{a_m x^m + \ldots}{b_n x^n + \ldots} = 0 \quad (m < n)

    the denominator grows faster, so the quotient dies away

  • One-sided limits

    limxx0f(x)=limxx0+f(x)=g    limxx0f(x)=g\lim_{x \to x_0^-} f(x) = \lim_{x \to x_0^+} f(x) = g \iff \lim_{x \to x_0} f(x) = g

    a limit exists only when both sides agree

  • Continuity at a point

    limxx0f(x)=limxx0+f(x)=f(x0)\lim_{x \to x_0^-} f(x) = \lim_{x \to x_0^+} f(x) = f(x_0)

    the value exists, the limit exists and the two agree

  • The intermediate value property

    f(a)f(b)<0    c(a;b):f(c)=0f(a) \cdot f(b) < 0 \implies \exists\, c \in (a; b): f(c) = 0

    a continuous function with opposite signs at the ends has a root

−101234501234567xyx = 2y = x + 2
After cancelling, (x² − 4)/(x − 2) is the same line y = x + 2 everywhere except at x = 2. The function has no value there, yet the limit is 4.
0246810120123456xyy = 3f(x) = (3x² + 2)/(x² − 1)
For large x the graph of f(x) = (3x² + 2)/(x² − 1) hugs the horizontal line y = 3 — that line is the limit at infinity.
0123−3−2−1012345xyf(1) = −1f(2) = 2f(x) = x² − 2values at the ends
The continuous function f(x) = x² − 2 takes values of opposite sign at the ends of ⟨1; 2⟩: −1 and 2. The graph cannot be drawn without lifting the pencil and without crossing the axis, so the root lies inside the interval.

Frequently asked questions

Related articles