Continuity
A function is continuous at x = a when its graph has no break there. In calculus, continuity at a requires three conditions: f(a) is defined, \lim_{x \to a} f(x) exists, and the limit equals f(a). If any condition fails, f has a discontinuity at a: removable, jump or infinite.
Before this lesson: One-Sided Limits, Evaluating Limits Algebraically, Infinite Limits and Piecewise Functions
What continuity means
Informally, a continuous function is one you can draw without lifting your pencil. The formal definition turns that picture into something you can check with limits: the value the graph is heading toward must be the value it actually takes.
Most familiar functions are continuous everywhere they are defined: polynomials, rational functions (except where the denominator is 0), roots, exponentials, logarithms, sine and cosine. Breaks usually happen where a denominator is 0 or where a piecewise function changes rules.
Continuity matters because many calculus theorems, such as the intermediate value theorem in the next lesson, only work for continuous functions.
The definition of continuity
A function f is continuous at x = a when all three conditions hold:
- f(a) is defined.
- \lim_{x \to a} f(x) exists (the left- and right-hand limits are equal).
- \lim_{x \to a} f(x) = f(a).
| Type of discontinuity | What fails | How it looks |
|---|---|---|
| Removable | The limit exists, but f(a) is undefined or not equal to it | A hole, possibly with a dot elsewhere |
| Jump | The one-sided limits exist but are different | The graph breaks and restarts at a new height |
| Infinite | A one-sided limit is \infty or -\infty | A vertical asymptote |
A function is continuous on an interval if it is continuous at every point in it. At a closed endpoint, only the one-sided limit from inside the interval is needed.
Continuity examples
Example 1: A removable discontinuity
Is f(x) = \frac{x^2 - 1}{x - 1} continuous at x = 1? If not, classify the discontinuity.
f(1) = \frac{0}{0}Condition 1: substituting gives 0/0, so f(1) is undefined. f is not continuous at 1.
\lim_{x \to 1} \frac{x^2 - 1}{x - 1} = \lim_{x \to 1} \frac{(x + 1)(x - 1)}{x - 1}Check whether the limit exists: factor the top.
\lim_{x \to 1} \frac{x^2 - 1}{x - 1} = \lim_{x \to 1} (x + 1) = 2Cancel and substitute (see evaluating limits algebraically).
Answer: not continuous at x = 1, but the limit exists, so the discontinuity is removable. Defining f(1) = 2 would make f continuous there.
Example 2: A piecewise function that is continuous
Let f(x) = x^2 + 1 for x \lt 2 and f(x) = 3x - 1 for x \ge 2. Is f continuous at x = 2?
f(2) = 3(2) - 1 = 5
Condition 1: x = 2 uses the second piece. f(2) is defined.
\lim_{x \to 2^-} f(x) = 2^2 + 1 = 5Left-hand limit: use the first piece.
\lim_{x \to 2^+} f(x) = 3(2) - 1 = 5Right-hand limit: use the second piece.
\lim_{x \to 2} f(x) = 5 = f(2)Conditions 2 and 3: the limit exists and equals f(2).
Answer: yes, f is continuous at x = 2. The two pieces meet at (2, 5).
Example 3: Classify every discontinuity
Find and classify the discontinuities of g(x) = \frac{x + 3}{x^2 - 9}.
x^2 - 9 = (x - 3)(x + 3)
Factor the denominator. g is undefined at x = 3 and x = −3.
g(x) = \frac{1}{x - 3}Cancel x + 3, for x \ne -3.
\lim_{x \to -3} g(x) = \frac{1}{-3 - 3} = -\frac{1}{6}At x = −3 the limit exists, so this discontinuity is removable.
\lim_{x \to 3^+} g(x) = \inftyAt x = 3, 1 over a tiny positive number blows up (see infinite limits).
Answer: a removable discontinuity at x = −3 (a hole at \left(-3, -\frac{1}{6}\right)) and an infinite discontinuity at x = 3 (a vertical asymptote). g is continuous everywhere else.
Example 4: Find a constant that makes a function continuous
Find k so that f(x) = kx^2 for x \le 3 and f(x) = 2x + k for x \gt 3 is continuous everywhere.
\lim_{x \to 3^-} f(x) = k(3)^2 = 9kThe left-hand limit (and f(3)) comes from the first piece.
\lim_{x \to 3^+} f(x) = 2(3) + k = 6 + kThe right-hand limit comes from the second piece.
9k = 6 + k
For continuity at 3, the two must be equal.
8k = 6
Subtract k from both sides (see equations with variables on both sides).
k = \frac{3}{4}Divide both sides by 8 and simplify.
Answer: k = \frac{3}{4}. Check: \frac{3}{4}(9) = 6.75 and 6 + 0.75 = 6.75. Both pieces are polynomials, so f is continuous at every other x as well.
Example 5: Word problem with a phone plan
A phone plan costs $40 per month for up to 10 GB of data. Above 10 GB it costs 55 + 5(g - 10) dollars for g GB. Let C(g) be the monthly cost. Is C continuous at g = 10?
C(10) = 40
Exactly 10 GB is in the first tier.
\lim_{g \to 10^-} C(g) = 40Just under 10 GB, the cost is $40.
\lim_{g \to 10^+} C(g) = 55 + 5(10 - 10) = 55Just over 10 GB, use the second rule.
40 \ne 55
The one-sided limits are different.
Answer: no. C has a jump discontinuity at 10 GB: using a tiny bit more data than 10 GB raises the bill by $15 all at once.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Checking only that f(a) exists | Calling the phone plan continuous because C(10) = 40 | All three conditions are needed; here the one-sided limits differ. |
| Calling every hole an asymptote | Saying g has an asymptote at x = −3 in Example 3 | If the factor cancels and the limit exists, it is removable. |
| Using the wrong piece at the boundary | Using x^2 + 1 for f(2) in Example 2 | Check the inequality: x \ge 2 means x = 2 uses the second piece. |
| Thinking a limit that exists means continuous | \lim_{x \to 1} \frac{x^2 - 1}{x - 1} = 2, so “continuous” | f(1) must also be defined and equal 2. |
| Setting the pieces equal to each other instead of their limits | Solving kx^2 = 2x + k for x | Substitute the boundary value x = 3 into both pieces first. |
| Forgetting domain limits | Calling \sqrt{x - 3} discontinuous at 3 | At an endpoint, only the one-sided limit from inside the domain matters; it is continuous on [3, \infty). |
Related methods
Continuity of combinations
Sums, differences, products and compositions of continuous functions are continuous. A quotient is continuous wherever its denominator is not 0. So to find where a formula is continuous, find where it is undefined.
Limits of continuous functions
For a continuous function, direct substitution always gives the limit. That is why the limit laws let you substitute into polynomials, and why \lim_{x \to 0} \cos x = \cos 0 = 1.
Practice problems
- Is f(x) = x^3 - 4x + 1 continuous at x = 2? Explain.
- Where is f(x) = \frac{1}{x - 5} discontinuous, and what type is it?
- Classify the discontinuity of h(x) = \frac{x^2 - 4}{x + 2} at x = −2.
- Is f(x) = 2x + 1 for x \lt 1 and f(x) = 4 − x for x \ge 1 continuous at x = 1?
- Classify the discontinuity of f(x) = x^2 for x \lt 0 and f(x) = x + 1 for x \ge 0 at x = 0.
- Find a so that f(x) = ax + 3 for x \lt 2 and f(x) = x^2 + a for x \ge 2 is continuous.
- On what interval is f(x) = \sqrt{x - 3} continuous?
- Where is g(x) = \frac{x + 1}{x^2 - 5x + 6} continuous?
- What value should f(3) have so that f(x) = \frac{x^2 - 7x + 12}{x - 3} is continuous at 3?
- A ride costs C(m) = 4 + 1.5m dollars for m ≤ 20 miles and C(m) = 34 + 1.25(m − 20) for m > 20. Is C continuous at m = 20?
Show answers
1.
f(2) = 8 - 8 + 1 = 1
Find f(2).
\lim_{x \to 2} f(x) = 1A polynomial’s limit is found by substitution.
Answer: yes; f(2) = 1 equals the limit. Polynomials are continuous everywhere.
2.
x - 5 = 0
The denominator is 0 at x = 5, and the numerator is 1, not 0.
\lim_{x \to 5^+} \frac{1}{x - 5} = \infty1 over a tiny positive number.
Answer: discontinuous at x = 5; an infinite discontinuity (vertical asymptote).
3.
\lim_{x \to -2} \frac{(x + 2)(x - 2)}{x + 2} = \lim_{x \to -2} (x - 2) = -4Factor, cancel and substitute.
Answer: h(−2) is undefined but the limit is −4, so it is a removable discontinuity (a hole at (−2, −4)).
4.
f(1) = 4 - 1 = 3
x = 1 uses the second piece.
\lim_{x \to 1^-} f(x) = 2(1) + 1 = 3Left-hand limit.
\lim_{x \to 1^+} f(x) = 4 - 1 = 3Right-hand limit.
Answer: yes; all three equal 3.
5.
\lim_{x \to 0^-} f(x) = 0^2 = 0Left-hand limit.
\lim_{x \to 0^+} f(x) = 0 + 1 = 1Right-hand limit.
Answer: a jump discontinuity, since the one-sided limits (0 and 1) differ.
6.
2a + 3 = 2^2 + a
Set the left-hand limit equal to the value from the second piece at x = 2.
2a + 3 = 4 + a
Simplify.
a = 1
Subtract a and 3 from both sides.
Answer: a = 1
7.
x - 3 \ge 0
The root is defined when the inside is not negative.
x \ge 3
Add 3 to both sides.
Answer: continuous on [3, \infty).
8.
x^2 - 5x + 6 = (x - 2)(x - 3)
Factor the denominator to find where g is undefined.
Answer: continuous for all real numbers except x = 2 and x = 3.
9.
\frac{x^2 - 7x + 12}{x - 3} = \frac{(x - 3)(x - 4)}{x - 3} = x - 4Factor and cancel, for x \ne 3.
\lim_{x \to 3} (x - 4) = -1Substitute.
Answer: define f(3) = −1.
10.
C(20) = 4 + 1.5(20) = 34
m = 20 uses the first rule.
\lim_{m \to 20^+} C(m) = 34 + 1.25(0) = 34Right-hand limit from the second rule.
Answer: yes. The left-hand limit, the right-hand limit and C(20) are all $34, so C is continuous at 20 miles.
Continuity FAQ
What are the three conditions for continuity?
f(a) must be defined, \lim_{x \to a} f(x) must exist, and the limit must equal f(a).
What are the types of discontinuity?
Removable (a hole, where the limit exists), jump (the one-sided limits differ) and infinite (a vertical asymptote).
How do you make a piecewise function continuous?
Set the left-hand and right-hand limits at the boundary equal to each other (and to the function value) and solve for the unknown constant.
Is a function with a hole continuous?
No. At the hole, f(a) is either undefined or not equal to the limit, so condition 1 or 3 fails. Filling the hole with the limit value makes it continuous.
Summary
- Continuous at a: f(a) is defined, the limit exists, and the limit equals f(a).
- Removable: the limit exists but is not f(a). Jump: the sides differ. Infinite: a side goes to \pm\infty.
- Polynomials, roots, exponentials, logs, sine and cosine are continuous on their domains; rational functions break where the denominator is 0.
- For piecewise functions, compare both one-sided limits with the value at the boundary.
- To find a constant that makes a function continuous, set the pieces’ values at the boundary equal.
Previous lesson: Squeeze Theorem
Next lesson: Intermediate Value Theorem
Back to the Calculus 1 Index