Limits and Continuity

☰ Contents

The gradient of a straight line is rise over run between two points. A curve has a different gradient at every point, so that formula cannot give the gradient at one point. A limit answers that question: it asks what a calculation approaches as its input approaches a value, without calculating at that value.

What problem is calculus actually solving?

Calculus measures change that does not happen at a steady rate, where rise over run stops working. A straight line has one gradient everywhere, but a curve such as y = x² steepens as you move along it, so no single number describes it. Calculus asks for the gradient at one point, the steepness of the tangent there. A chord gives an estimate: from (1, 1) to (3, 9) on y = x², the gradient is 8 ÷ 2 = 4. Moving the second point closer improves the estimate, and the value it approaches is the gradient at x = 1. That value is a limit, which is why limits come first. Area is the second question: a region with a curved edge has no area formula, and integration answers it with the same idea of ever closer approximations. Check the chord: the rise is 9 − 1 = 8 and the run is 3 − 1 = 2.

xy
A curve is flat near the bottom and steep further out. So what is its gradient? Full lesson: The Gradient of a Curve

Drawing the tangent by eye gives only a rough value.

xy
Ask instead for the gradient at one point, and draw the line that just touches the curve there: the tangent. Full lesson: The Gradient of a Curve

With the second point at (2, 4) the chord gradient is 3, and with (3/2, 9/4) it is 5/2, closing in on 2. See The Gradient of a Curve and Limits.

xy
Slide the two points together and the chord settles onto the tangent. Full lesson: Limits

What is a limit?

A limit is the value a function approaches as its input approaches a point. Saying that f(x) has limit L as x → c means f(x) can be made as close to L as you like by taking x close enough to c. For f(x) = 2x + 1, as x approaches 3 the outputs approach 7: at x = 3 itself, 2 × 3 + 1 = 7. The value at c is ignored, so f need not be defined there. The function (x² − 1)/(x − 1) gives 0/0 at x = 1, but everywhere else it equals x + 1, so its limit there is 2. A limit can also fail to exist, when the function jumps or grows without bound near c. Check with inputs on both sides: a little either side of x = 1, x + 1 is just above or below 2, and 1 + 1 = 2 is what both sides approach.

12345510152025xyh = 1.5(3.5, 12.25)(2, 4)

the chord’s gradient exceeds f ′(2) by exactly h

Drag the upper point along the curve

xy
A limit at x = 2 asks what happens near 2, never what happens exactly at 2. Full lesson: The Idea of a Limit

(x² − 4)/(x − 2) is undefined at x = 2, and its limit there is 4. Factor the numerator as (x + 2)(x − 2) and cancel the common factor. Away from x = 2 the function is x + 2, which is near 4 when x is near 2.

23.93.994.14.014, with no value at 2
This function is undefined at x = 2, yet it approaches 4. The hole does not stop the limit. Full lesson: The Idea of a Limit
This is what makes the derivative possible. The chord gradient (f(x + h) − f(x))/h is 0/0 at h = 0, but its limit as h approaches 0 exists, and that limit is the derivative. See The Idea of a Limit.

Does a limit have to agree from both sides?

Yes: a limit exists only when the function approaches the same value from both sides. The left-hand limit, x → c⁻, uses inputs below c only, and the right-hand limit, x → c⁺, uses inputs above c only. Take f(x) = x + 1 for x < 2 and f(x) = x + 2 for x ≥ 2. From the left the outputs approach 2 + 1 = 3, and from the right they approach 2 + 2 = 4, so the limit at 2 does not exist, even though f(2) = 4. Both sides are required because the definition asks f(x) to be close to one number for every x near c, and here the two sides stay near different numbers. The steps change at the end of a domain: √x has no inputs below 0, so only the right-hand limit is used there. Check the gap from the two values: 4 − 3 = 1, the height of the jump.

2L⁻ = 1 f(1.2) = 0.6L⁺ = 4 f(3) = 5no two-sided limit

L⁻ = 1 but L⁺ = 4: the probes land 3 apart however close they come, so lim f(x) as x → 2 does not exist, even though each one-sided limit does

Bring both probes to x = 2, then close the jump

xy
Approaching from the left, the values settle on −1. From the right, they settle on +1. Full lesson: One Sided Limits

Every step function behaves this way at each of its steps. See One Sided Limits.

−2−1012left −1right +1
The two sides give different answers, so there is no single value to approach. Full lesson: One Sided Limits

Now you

xy

The left limit is 0 and the right limit is 0. Does the limit exist?

xy

The left limit is 3 and the right limit is 3. Does the limit exist?

How do you actually calculate a limit?

Substitute first: if putting x = c into the expression gives a number, that number is the limit. For x² + 3x as x approaches 2, substitution gives 4 + 6 = 10, so the limit is 10. See The Limit Laws. The limit laws allow this: the limit of a sum is the sum of the limits, and the same holds for products, and for quotients whose denominator does not tend to 0. The steps change when substitution gives 0/0, which says the expression must be rewritten, not that the limit is missing. For (x² − 16)/(x − 4) at x = 4, factor the top as (x + 4)(x − 4), cancel, and substitute into x + 4 to get 8. A nonzero number over 0, such as 1/0, signals that the function grows without bound. Check with an input close to c: at an input just above 2, x² + 3x gives just over 10.

sin 2xxwindow ±0.1×10f/g = 1.987f′(0)/g′(0) = 2

near 0, sin 2x ≈ 2x and x ≈ x: the ratio is 1.987 in this window and is heading for f′(0)/g′(0) = 2

Zoom past ×50 and read the ratio of the two lines

only when the limit of g is not 0
Quotients carry one condition: the limit of the denominator must not be zero. Full lesson: The Limit Laws

The same holds for ∞/∞, the other indeterminate form.

23.93.994.14.01(x² − 4) ÷ (x − 2) at x = 2 is 0 ÷ 0
Substitute x = 2 into (x² − 4) / (x − 2) and you get 0 over 0 — a signal, not an answer. Full lesson: Indeterminate Forms
  1. Substitute. A number means you are done.
  2. If you get 0/0, rewrite the expression: factor and cancel, rationalize a surd, or combine the fractions.
  3. Substitute again into the new expression.

lim (x² − 9)/(x − 3) as x → 3: factor the numerator to get (x + 3)(x − 3)/(x − 3), cancel the (x − 3), then substitute x = 3 into x + 3. The limit is 6. See Indeterminate Forms.

factor the numerator
cancel — valid everywhere except x = 2
x + 2
Factor the numerator and the (x − 2) cancels, because x is near 2 and never equal to 2. Full lesson: Indeterminate Forms

Now you

what does this come to?

What is the limit of (x² − 9) / (x − 3) as x → 3?

what does this come to?

What is the limit of (x² − 16) / (x − 4) as x → 4?

What happens to a function far out?

A limit at infinity is the value a function approaches as x grows without bound. For a fraction of two polynomials, only the highest powers matter when x is large, so divide every term by the highest power of x in the denominator. For (4x + 1)/(2x − 3), dividing by x gives (4 + 1/x)/(2 − 3/x). As x grows, 1/x and 3/x shrink to 0, leaving 4/2 = 2, so the limit is 2 and y = 2 is a horizontal asymptote. The lower terms fade because they grow more slowly: at x = 1,000, the 4x term is 4,000 and the 1 adds only one part in 4,000. When the numerator has the higher degree, there is no finite limit, and when the denominator does, the limit is 0. Check with a large input: at x = 1,000 the fraction is 4,001 ÷ 1,997, just above 2, since 2 × 1,997 = 3,994.

y = 216−16window ±16f(16) = 2.341share of 5x − 3 in the numerator: 13.18%zoom

at x = 16 the terms 5x − 3 still make 13.2% of the numerator and f = 2.341: zoom out and the lower powers lose their share, so f → 2x²/x² = 2

Zoom out until the lower terms are under 0.5% of the numerator at the edge

divide numerator and denominator by x
the 1/x terms vanish as x grows
2 ÷ 1 = 2
Divide numerator and denominator by the highest power of x present. Full lesson: Limits at Infinity

(3x² + 5)/(x² − 1) → 3 as x → ∞. Divide the numerator and the denominator by x² to get (3 + 5/x²)/(1 − 1/x²). As x grows, 5/x² and 1/x² both approach 0, leaving 3. The line y = 3 is a horizontal asymptote.

∞1.911.99heading for 2
Every 1/x term shrinks to 0, leaving the ratio of the leading coefficients. Full lesson: Limits at Infinity

In short, compare the degrees. See Limits at Infinity.

Now you

what does this come to?

What is the limit of (2x + 3) / (3x + 5) as x → ∞?

what does this come to?

What is the limit of (9x + 3) / (8x + 5) as x → ∞?

How do you find a limit you cannot compute directly?

When a limit cannot be computed directly, trap the function between two simpler ones whose limits are known. If g(x) ≤ f(x) ≤ h(x) near c, and g and h both approach L, then f must approach L too: this is the squeeze theorem. See The Squeeze Theorem. Take f(x) = x² sin(1/x) as x approaches 0. Substitution fails, and sin(1/x) swings between −1 and 1 forever, but that gives −x² ≤ f(x) ≤ x². Both outer functions approach 0, so f(x) approaches 0 as well. The theorem holds because f has nowhere else to go: every value lies between two numbers that close in on L together. The bound needs care. It must hold for all x near c, and both sides must approach the same limit, since bounds with different limits prove nothing. Check with a number: at x = 1/10, the bounds are ±1/100, since 1/10 × 1/10 = 1/100, and f lies between them.

δ = 0.6−δ² ≤ f(x) ≤ δ² for |x| ≤ δgap 2δ² = 0.72

δ = 0.6: −x² ≤ f(x) ≤ x², so inside the clamp f is within 0.72 of 0; closing the clamp closes the gap, and a function held between two things that meet must meet them too

Close the clamp to δ = 0.1 and read the gap

xy
If the upper and lower functions approach the same value, the middle one has nowhere else to go. Full lesson: The Squeeze Theorem

The most important use is the limit of sin x over x as x approaches 0. Substituting x = 0 gives 0/0. Near 0 the ratio is trapped between cos x and 1, and both approach 1, so the limit is exactly 1 when x is in radians. See The Limit of sin x over x.

xy
As x approaches 0 the curve approaches height 1, but the point at x = 0 is missing. Full lesson: The Limit of sin x over x
This limit is why the derivative of sin x is cos x. In degrees it is π/180, not 1, and that factor would appear in every later result. That is why calculus uses radians.

For small x in radians, sin x ≈ x, tan x ≈ x and cos x ≈ 1 − x²/2. These are the small-angle approximations. See Small-Angle Approximations.

xy
Near 0, sin x is close to x. Drawn together, the curve and the line almost coincide. Full lesson: Small-Angle Approximations

Now you

xy

For small x, cos x ≈ ?

xy

The approximations hold only when x is measured in which unit?

What does continuity mean?

A function f is continuous at x = c when three conditions hold: f(c) is defined, the limit as x approaches c exists, and the two are equal. Informally, the graph can be drawn through that point without lifting the pencil. See Continuity at a Point. Test f(x) = x² − 1 at x = 2: f(2) is 4 − 1 = 3, and the limit from either side is also 3. All three are needed because a value and a limit can both exist and still differ, as when one point is lifted off a curve. A piecewise function needs the test at each join. If g(x) = 2x for x < 1 and g(x) = x + k for x ≥ 1, continuity at 1 requires 2 × 1 = 1 + k, so k = 1. Check the join: the left gives 2 × 1 = 2 and the right gives 1 + 1 = 2.

L = 2c = 2L + εc + δcontinuouswith a jump

some x with |x − 2| < δ has |f(x) − 2| ≥ ε, so this δ does not answer this ε — shrink δ

Shrink ε to 0.2, then find a δ that keeps the curve inside the band

affffboth sides arrive where f(a) already is
Formally: the value the function approaches must equal the value it actually takes. Full lesson: Continuity at a Point

A discontinuity is one of three types. A removable discontinuity is one missing or misplaced point: the limit exists, but the value does not equal it. At a jump discontinuity the left and right limits differ. At an infinite discontinuity the curve runs off along a vertical asymptote, so there is no limit. See Types of Discontinuity.

xy
A jump discontinuity has two different one-sided limits, and no single point can mend it. Full lesson: Types of Discontinuity

The intermediate value theorem says that a function continuous on an interval takes every value between its values at the two ends. So a continuous function that is negative at one end and positive at the other must equal zero somewhere between: only a jump could cross the axis without touching it, and continuity rules out the jump.

xy
To get from below to above without lifting the pencil, it must cross zero. Full lesson: The Intermediate Value Theorem

This is the guarantee behind every numerical root-finder, including the iteration methods in the applications of differentiation: a sign change between two points traps a root between them. See The Intermediate Value Theorem.

What can you do once you have a derivative?

A derivative gives the gradient of a curve at every point, so it measures steepness and rates of change. It comes from first principles: write the chord gradient (f(x + h) − f(x))/h, simplify, and let h approach 0. For f(x) = x², the chord gradient is 2x + h, so the derivative is 2x. See From First Principles. The gradient at x = 3 is then 2 × 3 = 6, and the tangent there passes through (3, 9) with gradient 6, so its equation is y = 6x − 9. The derivative also finds turning points, where it is zero, and rates such as speed. It works because the limit removes the chord's error term, h, leaving the exact gradient. A zero derivative can mark a maximum, a minimum or a point of inflection, so test the gradient on each side. Check the tangent at x = 3: 6 × 3 − 9 = 9, the height of the curve.

x = 820 − x = 12A = 96 m²xA510152050100

A = 20x − x² and A′ = 20 − 2x = 4: the area is still 4 m² per meter of extra width away from its peak

Slide x to the width that gives the biggest area

Now shrink h. Each chord lies closer to the tangent than the one before. Full lesson: From First Principles

The same working on x³ gives 3x², and the pattern is the rule for powers: multiply by the power, then take one off the power. So x⁵ differentiates to 5x⁴. See Differentiating Powers.

The normal is perpendicular to the tangent, and perpendicular gradients multiply to −1, so the gradient of the normal is −1 / m. See Tangents and Normals.

xy
The normal crosses the tangent at a right angle, with gradient −1/4. Full lesson: Tangents and Normals

To find a stationary point, set the derivative equal to zero and solve. See Stationary Points.

xy
At the very bottom of this curve the tangent is horizontal, so its gradient is zero. Full lesson: Stationary Points

Now you

differentiate it

Differentiate 3x^4

differentiate it

Differentiate 2x^7

What is integration, and why is it the reverse?

Integration is the reverse of differentiation: to integrate a function, find a function whose derivative it is. Differentiating x³ gives 3x², so integrating 3x² gives x³ + c. See Integration. The constant c appears because differentiation removes constant terms, so x³ + 5 and x³ − 2 have the same derivative. For powers, add one to the power and divide by the new power: x⁴ integrates to x⁵/5 + c. Integration also measures area, and the reverse is why: as the right edge of the region under a curve moves, the area grows at a rate equal to the curve's height there. So a definite integral is the antiderivative at the upper end minus its value at the lower end, with no c. The area under y = 3x² from 0 to 2 is 2³ − 0³ = 8. The power rule fails for x⁻¹, whose integral is ln |x| + c. Check by differentiating: x⁵/5 gives 5x⁴/5, which is x⁴.

12xyn = 5leftrightmidpoint

n = 5, so the error is 0.853

Increase n until the Riemann sum converges on the exact area

3x32
put one back on the power, then divide by it
Add one to the power, then divide by the new power — the rule run in reverse. Full lesson: Integration

Slice the region under a curve into thin rectangles and add their areas; the total improves as the rectangles get thinner. See Area Under a Curve.

xy
As the rectangles get thinner without limit, the sum becomes the integral, and that gives the area exactly. Full lesson: Area Under a Curve

The sum 1/2 + 1/4 + 1/8 + … approaches 1. The sum 1 + 1/2 + 1/3 + 1/4 + … grows past every bound, although its terms also shrink to 0. Shrinking terms are not enough for a sum to converge. See Two Infinite Sums, Opposite Fates.

00.40.81.2
Halve the gap each time and the total closes in on exactly 1. Full lesson: Two Infinite Sums, Opposite Fates

The mistakes worth naming

The functions and graphs this guide assumes are in functions and rational functions, the differentiation rules that replace first principles are in the rules of differentiation, and convergence is covered in sequences and series.

Your turn

Three to try — tap what you get.

lim as x→2 of (x² − 4)/(x − 2)

lim as x→∞ of 1/x

A function continuous at a point has

Questions and answers

What is a limit in calculus?
A limit is the value a function approaches as its input approaches some point, whether or not the function is actually defined there. The distinction is the whole idea: a function can have a hole at x = 2 and still have a perfectly good limit at x = 2, because a limit describes the journey toward a point and ignores what happens at the point itself.
What does it mean when a limit gives 0/0?
It means the substitution failed, not that the limit does not exist. 0/0 is called an indeterminate form because different functions of that shape approach different values, so the expression by itself decides nothing. The fix is to change the form of the function first, usually by factoring and canceling, then substitute again into the simplified version.
What is the limit of sin x over x as x approaches 0?
It is exactly 1, provided x is measured in radians. Substituting gives 0/0, so the result is proved by squeezing sin x over x between two functions that both approach 1. It matters because it is the limit that makes the derivative of sin x come out as cos x, and it is the reason calculus insists on radians rather than degrees.
What does it mean for a function to be continuous?
A function is continuous at a point when three things all hold: the function is defined there, the limit exists there, and the two are equal. Informally it means the graph can be drawn through that point without lifting the pen. Each of the three conditions can fail on its own, which is why there is more than one kind of discontinuity.
What is a one-sided limit?
It is the value a function approaches from one direction only — from the left, or from the right. They matter because a two-sided limit exists only when both one-sided limits exist and agree. A step function has perfectly good one-sided limits at the jump and no limit at all there, because the two sides disagree about where the function is heading.
What does the intermediate value theorem say?
If a function is continuous on an interval, it takes every value between its endpoint values somewhere inside that interval. So if a continuous function is negative at one end and positive at the other, it must be zero somewhere between. That is why sign-change tests locate roots, and it is a guarantee that fails immediately if the function is allowed to jump.
Mr. Chalk