Informally, a function is continuous if you can draw its graph without lifting your pen. Calculus needs a precise version of that idea, because derivatives, integrals and many famous theorems only work for continuous functions. In this lesson you will learn the three-part test for continuity, the four types of discontinuity, how to choose a constant that makes a piecewise function continuous, and the Intermediate Value Theorem, which proves that equations have solutions even when you cannot solve them exactly.
In this lesson you will learn
- The three conditions for continuity at a point
- Which common functions are continuous, and where
- Removable, jump, infinite and oscillating discontinuities
- How to make a piecewise function continuous
- The Intermediate Value Theorem and how to use it to locate roots
You should know one-sided limits and infinite limits.
The Definition of Continuity
A function f is continuous at x = a when all three of these are true:
- f(a) is defined. There is a point on the graph at x = a.
- limx→a f(x) exists. The left and right limits agree.
- limx→a f(x) = f(a). The point sits exactly where the graph is heading.
In one line: limx→a f(x) = f(a). This is why direct substitution works for continuous functions: the limit is simply the value.
A function is continuous on an interval if it is continuous at every point of that interval. At a closed end such as x = a in [a, b], we only need the one-sided limit from inside the interval.
Functions That Are Always Continuous
| Function type | Continuous on |
|---|---|
| Polynomials | All real numbers |
| Rational functions p(x)/q(x) | Everywhere except where q(x) = 0 |
| √x and other even roots | x ≥ 0 (inside ≥ 0) |
| eˣ, sin x, cos x | All real numbers |
| ln x | x > 0 |
| tan x | Everywhere except x = π/2 + nπ |
Sums, differences, products and compositions of continuous functions are continuous. Quotients are too, except where the denominator is zero. So a formula like esin x + x² is continuous everywhere, with no checking needed.
Four Types of Discontinuity
| Type | What fails | Example |
|---|---|---|
| Removable (a hole) | The limit exists, but f(a) is missing or wrong | (x² − 1)/(x − 1) at x = 1 |
| Jump | Left and right limits are different | Taxi fare by kilometre; |x|/x at 0 |
| Infinite | The function blows up | 1/(x − 2) at x = 2 |
| Oscillating | The function never settles | sin(1/x) at x = 0 |
A removable discontinuity is the friendly kind: redefine one value and it disappears. For (x² − 1)/(x − 1) the limit at 1 is 2, so setting f(1) = 2 fills the hole and makes the function continuous. The other three types cannot be fixed by changing a single value.
Making a Piecewise Function Continuous
A common exam question asks you to choose a constant so that the pieces join up. Inside each piece the function is a polynomial, so it is already continuous. The only place to check is the join.
⎧ kx + 1 if x < 2
f(x) = ⎨
⎩ x² − k if x ≥ 2
Left limit at 2: 2k + 1
Right limit at 2: 4 − k (this also equals f(2))
Continuity needs 2k + 1 = 4 − k
3k = 3, so k = 1
Check: left = 3, right = 3, f(2) = 3. ✓
Why checking only the join is enough
Away from x = 2, the formula near any point is a single polynomial, and polynomials are continuous everywhere. A problem can only occur where the rule changes. This “check the joins” idea also appears when you test whether a piecewise function is differentiable.
The Intermediate Value Theorem
Intermediate Value Theorem (IVT): If f is continuous on the closed interval [a, b], and N is any number between f(a) and f(b), then there is at least one c in (a, b) with f(c) = N.
In plain words: a continuous graph cannot get from one height to another without passing through every height in between. If the temperature in Rajshahi was 15 °C at 6 am and 28 °C at 2 pm, then at some moment it was exactly 20 °C.
The most useful special case is about roots. If f(a) and f(b) have opposite signs, then 0 lies between them, so f(c) = 0 for some c between a and b.
Show that x³ + x − 1 = 0 has a root between 0 and 1.
f(x) = x³ + x − 1 is a polynomial, so it is continuous on [0, 1].
f(0) = −1 (negative)
f(1) = 1 (positive)
By the IVT there is a c in (0, 1) with f(c) = 0.
Narrow it down by halving the interval (the bisection method):
f(0.5) = −0.375 root in (0.5, 1)
f(0.75) = 0.171875 root in (0.5, 0.75)
f(0.625) = −0.130859 root in (0.625, 0.75)
f(0.6875)= 0.012451 root in (0.625, 0.6875)
The root is about 0.6823.
The IVT tells you a root exists but not exactly where. Repeated halving like this is the bisection method, which computers use to solve equations.
Both conditions matter. f(x) = 1/x has f(−1) = −1 and f(1) = 1, but it is never 0, because it is not continuous on [−1, 1].
A Related Result: The Extreme Value Theorem
If f is continuous on a closed interval [a, b], then f has a highest value and a lowest value somewhere in that interval. This guarantee is the starting point for the optimisation problems you will solve with derivatives later in the course.
Common Mistakes
- Checking only that f(a) exists. All three conditions are needed.
- Using the IVT without checking continuity. Always state that f is continuous on [a, b] first.
- Thinking the IVT gives exactly one root. It promises at least one; there may be more.
- Calling 1/x “discontinuous everywhere”. It is continuous on its whole domain; it is only discontinuous at x = 0, where it is not defined.
- Forgetting f(a) in piecewise questions. Check which piece contains the join point itself (≤ or ≥).
Practice Exercises
Exercise 1. Find a so that f(x) = ax² when x ≤ 1 and f(x) = 3x + 2 when x > 1 is continuous everywhere.
Show answer
At x = 1: left gives a, right gives 5. Continuity needs a = 5.
Exercise 2. Show that cos x = x has a solution between 0 and π/2.
Show answer
Let g(x) = cos x − x, continuous everywhere. g(0) = 1 > 0 and g(π/2) = −π/2 < 0. By the IVT, g(c) = 0 for some c in (0, π/2), so cos c = c.
Exercise 3. Classify the discontinuity of f(x) = (x² − 9)/(x − 3) at x = 3, and say how to remove it.
Show answer
Removable: f(x) = x + 3 for x ≠ 3, so the limit is 6 but f(3) is undefined. Define f(3) = 6.
Frequently Asked Questions
What are the three conditions for continuity?
A function f is continuous at x = a if f(a) is defined, the limit of f(x) as x approaches a exists, and that limit equals f(a). If any one of these fails, the function has a discontinuity at a.
What does the Intermediate Value Theorem say?
If a function is continuous on a closed interval from a to b, it takes every value between f(a) and f(b) somewhere in that interval. In particular, if f(a) and f(b) have opposite signs, the equation f(x) = 0 has at least one root between a and b.
Summary
- f is continuous at a when limx→a f(x) = f(a).
- Polynomials, exponentials, sine and cosine are continuous everywhere; others are continuous on their domains.
- Discontinuities are removable, jump, infinite or oscillating; only removable ones can be fixed by redefining one value.
- For piecewise functions, check continuity at the joins.
- The IVT: a continuous function takes every value in between; a sign change means a root.
