Limits, Topic 6 of 8

Continuity

A function is continuous when you can draw it without lifting your pen. But calculus demands precision: and there are exactly three conditions that must hold simultaneously.

3 conditions 4 types of discontinuity 10 worked examples Intermediate Value Theorem
Share this page

§ 01The Intuition — Drawing Without Lifting Your Pen

Continuity is one of the most natural ideas in mathematics, yet it is also one of the most precisely defined. Understanding both sides (the intuition and the rigour) is what separates students who can merely calculate from those who genuinely understand calculus.

Imagine tracing the graph of a function with a pen. If you can draw the entire graph from left to right without ever lifting your pen from the paper, the function is continuous. The moment you are forced to lift your pen (to jump across a gap, to skip over a hole, or to leap from one branch to another) the function has a discontinuity at that point.

This informal description is powerful enough to guide intuition, but it is far too vague for mathematical proofs. A function with a gap at exactly one point still looks "nearly drawable" in most pictures, yet it is discontinuous there. Calculus requires a definition that captures every such case without ambiguity.

Why Continuity Matters Nearly every theorem in calculus — the Mean Value Theorem, the Fundamental Theorem of Calculus, the Extreme Value Theorem — requires the function to be continuous on some interval. Continuity is not a decorative assumption; it is the foundation on which calculus is built.

Before we can state the formal definition, we need one concept already in hand: the limit. If you need a refresher, the Introduction to Limits page covers everything you need. But if you are comfortable with the idea that limx→a f(x) describes the value a function approaches as x gets close to a (without necessarily reaching a), then you are ready.

§ 02The Three Conditions for Continuity at a Point

A function f is continuous at x = a if and only if all three of the following conditions hold simultaneously. All three. Not two out of three.

The Continuity Checklist at x = a

  1. f(a) is defined. The function must actually have a value at x = a. A function with a hole at x = a, where f(a) simply does not exist, fails here immediately.
  2. limx→a f(x) exists. The left-hand limit and right-hand limit must both exist and be equal. If the function jumps to different values from the left and the right, the two-sided limit does not exist, and continuity fails.
  3. limx→a f(x) = f(a). The value the function approaches must equal the value the function actually takes. Having both conditions 1 and 2 hold is not enough, the limit and the function value must agree.

Each condition independently can fail, and each type of failure produces a different kind of discontinuity. This is why the three-condition formulation is so useful: it gives you a diagnostic checklist. When you find that a function is discontinuous at a point, you can immediately ask which condition failed?: and the answer tells you exactly what type of discontinuity you are dealing with.

Formal Definition
f is continuous at x = a  ⟺  limx→a f(x) = f(a)

This compact single-line definition silently requires all three conditions above: for limx→a f(x) = f(a) to hold, f(a) must be defined (otherwise the right-hand side has no meaning), the limit must exist (otherwise the left-hand side has no value), and the two must be equal (that's what the equals sign demands).

Continuity on an Interval

We say f is continuous on an open interval (a, b) if it is continuous at every point within that interval. For a closed interval [a, b], we additionally require:

  • Right-hand continuity at the left endpoint: limx→a⁺ f(x) = f(a)
  • Left-hand continuity at the right endpoint: limx→b⁻ f(x) = f(b)

This is a natural adjustment: at the endpoints of a closed interval, there is only one side to approach from, so we only demand one-sided continuity there.

§ 03The Four Types of Discontinuity

Not all discontinuities are the same. The type of discontinuity tells you which of the three conditions failed, and whether or not the discontinuity can be "fixed."

Type 1
Removable

The limit exists, but either f(a) is undefined or f(a) ≠ lim f(x). There is a "hole" in the graph. You can patch it by redefining f(a).

Type 2
Jump

The left-hand and right-hand limits both exist but are unequal. The function literally "jumps" from one value to another. Cannot be removed.

Type 3
Infinite

The function grows without bound near x = a (a vertical asymptote). At least one one-sided limit is ±∞. Cannot be removed.

Type 4
Oscillating

The function oscillates increasingly rapidly near x = a, so the limit simply doesn't exist. Example: sin(1/x) near x = 0. Cannot be removed.

Visualising the Four Types

REMOVABLE JUMP INFINITE OSCILLATING

The four types of discontinuity: removable (hole), jump, infinite (asymptote), oscillating

Continuous Functions You Already Know

Certain families of functions are continuous everywhere on their natural domains, and this fact is worth knowing by heart:

  • All polynomials: continuous on (−∞, ∞)
  • All rational functions: continuous everywhere except where the denominator is zero
  • sin x, cos x: continuous on (−∞, ∞)
  • tan x, sec x, csc x, cot x: continuous everywhere they are defined
  • eˣ, aˣ (a > 0), continuous on (−∞, ∞)
  • ln x, loga x: continuous on (0, ∞)
  • ⁿ√x: continuous on (0, ∞), or (−∞, ∞) when n is odd

Furthermore, sums, differences, products, quotients (where defined), and compositions of continuous functions are continuous. This means that most functions you encounter in calculus are continuous almost everywhere, and discontinuities tend to occur only at isolated "problem points."

§ 04Ten Worked Examples

Apply the three-condition checklist to functions ranging from simple polynomials to piecewise definitions and rational functions. Each example identifies the discontinuity type where relevant.

Example 01 Is f(x) = x² + 3x − 1 continuous at x = 2?

This is a polynomial, so we know theoretically it must be continuous everywhere. Let's verify with the checklist.

Condition 1 — f(a) defined
f(2) = 4 + 6 − 1 = 9 ✓
Condition 2 — limit exists
limx→2 (x² + 3x − 1) = 4 + 6 − 1 = 9 ✓
Condition 3 — limit equals f(a)
9 = 9 ✓
Continuous at x = 2 ✓
Example 02 Is g(x) = (x² − 4)/(x − 2) continuous at x = 2?

This is a rational function. Discontinuities can only occur where the denominator is zero, so x = 2 is suspicious.

Condition 1 — g(2) defined?
g(2) = (4 − 4)/(2 − 2) = 0/0 — undefined ✗

Condition 1 fails immediately. But let's check the limit, because this tells us the type of discontinuity:

Factor and simplify
g(x) = (x−2)(x+2)/(x−2) = x + 2,  for x ≠ 2
Limit exists!
limx→2 g(x) = 4

The limit exists (equals 4) but g(2) is undefined. This is a removable discontinuity. We can patch it by defining g(2) = 4.

Removable discontinuity at x = 2
Example 03 Analyse f(x) = { x + 1 if x < 2,  x² − 1 if x ≥ 2 } at x = 2

Piecewise functions are prime candidates for jump discontinuities. Always check left and right limits separately.

Condition 1 — f(2) defined
f(2) = 2² − 1 = 3 ✓ (use the x ≥ 2 branch)
Left-hand limit
limx→2⁻ f(x) = limx→2⁻ (x+1) = 3
Right-hand limit
limx→2⁺ f(x) = limx→2⁺ (x²−1) = 3
Condition 2 — limit exists
LHL = RHL = 3, so limx→2 f(x) = 3 ✓
Condition 3
3 = 3 ✓
Continuous at x = 2 ✓
Example 04 Analyse h(x) = { 2x if x < 1,  x + 3 if x ≥ 1 } at x = 1
f(1) defined
h(1) = 1 + 3 = 4 ✓
Left-hand limit
limx→1⁻ 2x = 2
Right-hand limit
limx→1⁺ (x+3) = 4

LHL = 2 ≠ RHL = 4, so the two-sided limit does not exist. Condition 2 fails.

Jump discontinuity at x = 1
Example 05 Is f(x) = 1/(x − 3) continuous at x = 3?

The denominator is zero at x = 3, so f(3) is undefined, condition 1 fails. Checking the limit reveals:

Left-hand limit
limx→3⁻ 1/(x−3) = −∞
Right-hand limit
limx→3⁺ 1/(x−3) = +∞

The function blows up on both sides (in opposite directions). This is a vertical asymptote, an infinite discontinuity. There is no way to define f(3) to make this function continuous here.

Infinite discontinuity at x = 3
Example 06 Patching a removable discontinuity: define f to be continuous

Let f(x) = (x³ − 8)/(x − 2). Find the value of f(2) that makes f continuous at x = 2.

Factor using difference of cubes
x³ − 8 = (x−2)(x² + 2x + 4)
Simplify (for x ≠ 2)
f(x) = x² + 2x + 4
Compute the limit
limx→2 f(x) = 4 + 4 + 4 = 12

Define f(2) = 12. Then all three conditions hold and f is continuous at x = 2.

Define f(2) = 12 to patch the discontinuity
Example 07 Find all discontinuities of f(x) = (x + 1)/((x−2)(x+3))

This rational function is undefined wherever the denominator equals zero.

Find zeros of denominator
(x−2)(x+3) = 0  ⟹  x = 2, x = −3

At each point, check whether the numerator is also zero (removable) or non-zero (infinite):

At x = 2: numerator = 3 ≠ 0
Infinite discontinuity at x = 2
At x = −3: numerator = −2 ≠ 0
Infinite discontinuity at x = −3

Everywhere else, f is a ratio of continuous functions with non-zero denominator, so f is continuous.

Infinite discontinuities at x = 2 and x = −3
Example 08 Find k so that f(x) = { kx² + 1 if x ≤ 1,  3x − k if x > 1 } is continuous everywhere

Since both pieces are polynomials, continuity can only break at the join point x = 1. We need the left and right limits to agree with the function value.

Left-hand limit (and f(1))
limx→1⁻ f(x) = k(1)² + 1 = k + 1
Right-hand limit
limx→1⁺ f(x) = 3(1) − k = 3 − k
Set equal for continuity
k + 1 = 3 − k  ⟹  2k = 2  ⟹  k = 1
k = 1 makes f continuous everywhere
Example 09 Is f(x) = sin(1/x) continuous at x = 0?

This is the classic oscillating discontinuity example.

Condition 1 — f(0) defined?
sin(1/0) is undefined — condition 1 fails ✗

Even if we tried to assign a value at x = 0, the limit doesn't exist. As x → 0, the argument 1/x grows without bound, causing sin(1/x) to oscillate infinitely rapidly between −1 and +1. No single value is approached.

Limit
limx→0 sin(1/x) does not exist

This is an oscillating discontinuity: the most exotic type, and not removable by any assignment of f(0).

Oscillating discontinuity at x = 0 — not removable
Example 10 Where is f(x) = √(x − 4) continuous?

The square root function requires a non-negative argument. We need x − 4 ≥ 0, so the natural domain is [4, ∞).

For x > 4
f is a composition of continuous functions — continuous ✓
At x = 4 (left endpoint)
f(4) = 0,  limx→4⁺ √(x−4) = 0 ✓

We only need right-hand continuity at x = 4 because it is the left endpoint of the domain. Both conditions are satisfied.

Continuous on [4, ∞)

§ 05The Intermediate Value Theorem

Continuity on a closed interval guarantees something remarkable: the function must pass through every value between its endpoints. This seemingly obvious statement has profound consequences.

Intermediate Value Theorem (IVT)
If f is continuous on [a, b] and N is any number between f(a) and f(b),
then there exists at least one c ∈ (a, b) such that f(c) = N.

In plain English: a continuous function cannot jump over a value. If a function starts at height f(a) and ends at height f(b), it must at some point have been at every height in between. The theorem guarantees existence, it does not tell you where c is, only that it exists.

Why Continuity Is Essential The IVT can fail completely if f is discontinuous. Consider f(x) = sign(x) on [−1, 1], which jumps from −1 to +1 at x = 0. There is no value c where f(c) = 0.5, even though 0.5 is between f(−1) = −1 and f(1) = 1. Continuity is the key ingredient.

Application: Proving a Root Exists

One of the most powerful uses of the IVT is proving that equations have solutions, even when you cannot find the solution explicitly. The method is:

  • Show f is continuous on some interval [a, b].
  • Compute f(a) and f(b).
  • If f(a) and f(b) have opposite signs, then 0 is between them, so f(c) = 0 for some c ∈ (a, b).
IVT Example Show that x³ − x − 1 = 0 has a solution in (1, 2)
Define and check continuity
f(x) = x³ − x − 1 is a polynomial — continuous everywhere
Evaluate endpoints
f(1) = 1 − 1 − 1 = −1  <  0
Evaluate at x = 2
f(2) = 8 − 2 − 1 = 5  >  0
Apply IVT
f(1) < 0 < f(2), so ∃ c ∈ (1,2) with f(c) = 0
Root guaranteed in (1, 2) by the IVT ✓

§ 06Common Mistakes

Mistake 1 — Confusing f(a) existing with continuity Just because f(a) is defined does not mean f is continuous at a. You still need the limit to exist AND equal f(a). The function f(x) = { x² if x ≠ 0, 5 if x = 0 } is defined at x = 0, but limx→0 f(x) = 0 ≠ 5 = f(0). It is discontinuous there.
Mistake 2 — Assuming the limit equalling something implies the function equals that thing limx→a f(x) = L does NOT mean f(a) = L. The limit describes what f approaches, not what f does at the point itself. Continuity is the extra condition that forces these to agree.
Mistake 3 — Assuming all discontinuities are removable A removable discontinuity requires the limit to exist. Jump, infinite, and oscillating discontinuities have limits that fail to exist (or are infinite) — they cannot be "fixed" by redefining the function at the point.
Mistake 4 — Misapplying the IVT The IVT guarantees at least one c — there could be many. Also, the IVT only guarantees a root between a and b if f(a) and f(b) have opposite signs. If f(a) and f(b) have the same sign, the IVT says nothing — there might still be a root, but the theorem cannot confirm it.

§ 07Practice Quiz — 10 Questions

Test your understanding of continuity with this interactive quiz. Mixed multiple-choice and fill-in-the-blank questions.

Score: 0 / 10
Question 1 of 10 — Multiple Choice

Which condition is NOT required for f to be continuous at x = a?

The correct answer is C — differentiability. Continuity only requires conditions 1, 2, and 3 from our checklist. A function can be continuous at a point without being differentiable there (think of |x| at x = 0: continuous, but not differentiable).
Question 2 of 10 — Multiple Choice

What type of discontinuity does f(x) = (x² − 9)/(x − 3) have at x = 3?

C — Removable. Factor: (x²−9)/(x−3) = (x+3)(x−3)/(x−3) = x + 3 for x ≠ 3. The limit exists (= 6) but f(3) is undefined. Defining f(3) = 6 patches the hole.
Question 3 of 10 — Fill in the Blank

If f(x) = x³ − 2x + 1 (a polynomial), what is limx→−1 f(x)?

Answer:

For polynomials, just substitute: f(−1) = (−1)³ − 2(−1) + 1.
f(−1) = −1 + 2 + 1 = 2. Since polynomials are continuous everywhere, lim = f(−1) = 2.
Question 4 of 10 — Multiple Choice

Consider f(x) = { 2x + 1 if x < 3,  x² − 2 if x ≥ 3 }. Is f continuous at x = 3?

A — Yes, continuous. LHL: 2(3)+1 = 7. RHL: 3²−2 = 7. f(3) = 9−2 = 7. All equal 7, so all three conditions hold.
Question 5 of 10 — Fill in the Blank

Find the value of k that makes f(x) = { kx + 2 if x ≤ 1,  3x − k if x > 1 } continuous at x = 1.

Answer: k =

Set the left-hand limit equal to the right-hand limit at x = 1: k(1)+2 = 3(1)−k.
LHL = k+2, RHL = 3−k. Setting equal: k+2 = 3−k → 2k = 1 → k = 0.5.
Question 6 of 10 — Multiple Choice

The Intermediate Value Theorem guarantees that f(x) = x² − 3 has a root in (1, 2). Which fact directly enables this conclusion?

A. The IVT requires: (1) f is continuous on [a,b], and (2) the target value (0) lies between f(a) and f(b). Here f(1) = −2 < 0 < 1 = f(2), so 0 is between them, and f being a polynomial guarantees continuity.
Question 7 of 10 — Multiple Choice

What type of discontinuity does f(x) = 1/(x−1)² have at x = 1?

C — Infinite. As x → 1 from either side, (x−1)² → 0⁺, so 1/(x−1)² → +∞. Both one-sided limits are +∞. This is a vertical asymptote, i.e. an infinite discontinuity.
Question 8 of 10 — Fill in the Blank

For f(x) = (x² − 16)/(x − 4), what value should f(4) be defined as to make f continuous at x = 4?

f(4) =

Factor: x²−16 = (x−4)(x+4). Cancel (x−4), then take the limit.
(x²−16)/(x−4) = (x+4) for x ≠ 4. So limx→4 = 4+4 = 8. Define f(4) = 8.
Question 9 of 10 — Multiple Choice

Which of the following is always continuous on (−∞, ∞)?

C — eˣ. The exponential function eˣ is defined and continuous for all real x. By contrast: 1/x is discontinuous at x=0; tan(x) is discontinuous at x = π/2 + nπ; ln(x) is only defined for x > 0.
Question 10 of 10 — Multiple Choice

f is continuous on [0, 4] with f(0) = −3 and f(4) = 7. What does the IVT guarantee?

B. Since f(0) = −3 < 0 < 7 = f(4) and f is continuous, the IVT guarantees at least one c in (0,4) where f(c) = 0. Note: it says at least one, not exactly one — so A is too strong. And it says nothing about the value at x = 2.

Next StepsContinue the Limits Series

Now that you can classify and analyse continuity with precision, the next pages build on it directly:

Cookie Settings