Continuity

Learn the three-part definition of continuity, where common functions are continuous, how to find a constant that makes a piecewise function continuous, and the Intermediate Value Theorem.

Advanced30 minLesson

Definition

A function ff is **continuous at x=ax = a** if its graph has no break there: you can draw through the point without lifting your pencil. In the language of limits, three conditions must all be true:
  1. 1.f(a)f(a) is defined (there is a point on the graph at x=ax = a)
  2. 2.lim⁡x→af(x)\lim_{x \to a} f(x) exists (the left-hand and right-hand limits are equal)
  3. 3.lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a) (the limit equals the function value)
f is continuous at a  ⟺  lim⁡x→af(x)=f(a)f \text{ is continuous at } a \iff \lim_{x \to a} f(x) = f(a)
If any one condition fails, ff has a discontinuity at x=ax = a. The different kinds of breaks (holes, jumps, vertical asymptotes) are sorted out in the lesson Types of Discontinuity.
Continuity on an interval: ff is continuous on an open interval (a,b)(a, b) if it is continuous at every point inside it. On a closed interval [a,b][a, b] we also need lim⁡x→a+f(x)=f(a)\lim_{x \to a^+} f(x) = f(a) and lim⁡x→b−f(x)=f(b)\lim_{x \to b^-} f(x) = f(b) at the endpoints.
Functions that are continuous on their whole domain:
  • polynomials (everywhere)
  • rational functions (everywhere except where the denominator is 00)
  • exponential functions bxb^x and exe^x (everywhere)
  • logarithms log⁡bx\log_b x and ln⁡x\ln x (for x>0x > 0)
  • x\sqrt{x} (for x≥0x \geq 0)
Sums, differences, products, quotients (where the denominator is not 00) and compositions of continuous functions are continuous too. This is exactly why direct substitution works: for a continuous function, lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a).

Try it now

Which of these is NOT one of the three conditions for ff to be continuous at x=ax = a?

Worked Examples

Is f(x)=x2−3x+1f(x) = x^2 - 3x + 1 continuous at x=2x = 2? Check all three conditions.

1

Condition 1: is f(2)f(2) defined?

f(2)=22−3⋅2+1=4−6+1f(2) = 2^2 - 3 \cdot 2 + 1 = 4 - 6 + 1 → f(2)=−1f(2) = -1

2

Condition 2: does the limit exist?

ff is a polynomial, so the limit can be found by direct substitution: lim⁡x→2(x2−3x+1)=−1\lim_{x \to 2} (x^2 - 3x + 1) = -1 → The limit exists and equals −1-1

3

Condition 3: compare the limit and the value

lim⁡x→2f(x)=−1=f(2)\lim_{x \to 2} f(x) = -1 = f(2) → All three conditions hold

Common Mistakes

Checking only that f(a)f(a) exists and concluding that ff is continuous

Why it's wrong: A function can have a value at aa and still jump there. For example f(x)=1f(x) = 1 for x<0x < 0 and f(x)=2f(x) = 2 for x≥0x \geq 0 has f(0)=2f(0) = 2, but the left-hand limit is 11.

Correct: Always check all three conditions: f(a)f(a) is defined, the limit exists, and the limit equals f(a)f(a).

Thinking that if the limit exists, the function must be continuous

Why it's wrong: The limit ignores what happens exactly at x=ax = a. In Example 2 the limit is 66, but the point sits at g(3)=5g(3) = 5.

Correct: After finding the limit, compare it with the actual value f(a)f(a). They must be equal.

Solving for kk by plugging the breakpoint into only one piece

Why it's wrong: Continuity at a breakpoint is about the two pieces meeting, so one piece alone gives no equation for kk.

Correct: Evaluate both pieces at the breakpoint (left-hand and right-hand limits) and set them equal: in Example 4, 22+1=2k−12^2 + 1 = 2k - 1.

Using the Intermediate Value Theorem on a function that is not continuous on the interval

Why it's wrong: f(x)=1xf(x) = \frac{1}{x} has f(−1)=−1f(-1) = -1 and f(1)=1f(1) = 1, but it is never 00. The IVT does not apply because ff is undefined at x=0x = 0.

Correct: Before using the IVT, confirm that ff is continuous on the whole closed interval [a,b][a, b].

Interactive Visual

Function graph

-3-2-10123450510xy

Tap or hover over the graph to read off values.

f
  • At x = 2: from the left f(x) → 5, from the right f(x) → 1. The values differ, so the limit does not exist (jump). f(2) = 5.

Function graph

-2-101234560246810xy

Tap or hover over the graph to read off values.

g
  • At x = 3: from the left and from the right g(x) → 6, so the limit is 6. g(3) = 5.

Function graph

-1.5-1-0.500.511.52-4-2024xy(0.68, 0)(0, -1)(1, 1)

Tap or hover over the graph to read off values.

f(x) = x³ + x - 1
  • Zero (x-intercept): (0.68, 0)

Interactive Sandbox

Interactive Grapher

-10-50510-10-50510xy

Tap or hover over the graph to read off values.

Try these examples:

y = 2x + 1

m=2, b=1

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

18 problems
Problem 1 of 18
Easy

Which of these is NOT one of the three conditions for ff to be continuous at x=ax = a?

Why It Matters

Continuity is the property that makes most of calculus work:
  • Direct substitution is only allowed because polynomials, exponentials and logarithms are continuous: the limit is just the function value.
  • Root finding: the Intermediate Value Theorem guarantees that a continuous function that changes sign must cross zero. Calculators and computers use this to locate solutions of equations.
  • Modelling: temperature, height, distance and the volume of water in a tank change continuously with time. Prices, tax brackets and parking fees often do not, and a designer has to choose constants so there is no sudden jump.
  • Engineering: two pieces of road, rail or pipe must meet at the same height, which is exactly the condition that a piecewise function is continuous at the joint.
Knowing where a function is continuous tells you where you can trust its graph, where you can substitute, and where something dramatic (a hole, a jump, an asymptote) happens.

Real World Applications

Fair Parking Fees

A parking garage uses one rate for short stays and another for long stays. If the formulas do not agree at the switch point, the price jumps and a driver who stays one minute longer pays much more or much less.

Example:

A fee of C(t)=5tC(t) = 5t dollars for up to 2 hours and C(t)=3t+4C(t) = 3t + 4 dollars after that gives C(2)=10C(2) = 10 dollars from both formulas, so the fee has no jump.

1Try It Yourself

Parking costs C(t)=4tC(t) = 4t dollars for 0≤t≤30 \leq t \leq 3 hours and C(t)=2t+kC(t) = 2t + k dollars for t>3t > 3.

Which value of kk makes the fee continuous at t=3t = 3?

Step 1: Write the mathematical expression

Solve 4⋅3=2⋅3+k4 \cdot 3 = 2 \cdot 3 + k for kk:

Hiking Altitude and the IVT

Your altitude on a hike changes continuously with time: you cannot teleport from one height to another. The Intermediate Value Theorem then guarantees that you passed through every height between your start and your finish.

Example:

If you start at 800 m and reach a summit at 2000 m, at some moment you were at exactly 1500 m, even if you did not look at your watch then.

2Try It Yourself

A hiker is at 800 m at 8:00 and at the 2000 m summit at 13:00. Altitude is a continuous function of time.

How many of the altitudes 500 m, 1200 m, 1900 m and 2100 m is the hiker guaranteed by the IVT to pass between 8:00 and 13:00?

Step 1: Write the mathematical expression

Count the values between 800 and 2000:

Joining Two Pieces of Road

Road and railway designers describe a track with different formulas on different sections. At every joint the heights must match, which is the condition for a piecewise function to be continuous.

Example:

A ramp with height y=0.5xy = 0.5x for x≤2x \leq 2 followed by y=−0.25x+1.5y = -0.25x + 1.5 for x>2x > 2 (in meters) meets at y=1y = 1 m, so there is no step.

3Try It Yourself

A road profile (in meters) is y=0.5xy = 0.5x for 0≤x≤40 \leq x \leq 4 and y=−0.25x+by = -0.25x + b for x>4x > 4.

Which value of bb makes the road continuous at x=4x = 4?

Step 1: Write the mathematical expression

Solve 0.5⋅4=−0.25⋅4+b0.5 \cdot 4 = -0.25 \cdot 4 + b for bb:

Key Takeaways

  • 1ff is continuous at x=ax = a when f(a)f(a) is defined, lim⁡x→af(x)\lim_{x \to a} f(x) exists, and lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a)
  • 2If any of the three conditions fails, ff has a discontinuity at aa (the kinds are covered in Types of Discontinuity)
  • 3Polynomials, exponentials, sin⁡\sin and cos⁡\cos are continuous everywhere; rational functions, logarithms and roots are continuous on their domains
  • 4On a closed interval [a,b][a, b], continuity at the endpoints uses one-sided limits
  • 5To make a piecewise function continuous, set the left-hand limit, the right-hand limit and the value at each breakpoint equal and solve for the constant
  • 6Intermediate Value Theorem: if ff is continuous on [a,b][a, b] and NN is between f(a)f(a) and f(b)f(b), then f(c)=Nf(c) = N for some cc in (a,b)(a, b)

Frequently Asked Questions

It is continuous on its domain, that is, at every x≠0x \neq 0. At x=0x = 0 it is not defined, so it is not continuous there. When someone says a function is continuous without naming a point, they usually mean continuous on its whole domain.
It is continuous on its domain, that is, at every x≠0x \neq 0. At x=0x = 0 it is not defined, so it is not continuous there. When someone says a function is continuous without naming a point, they usually mean continuous on its whole domain.
Because polynomials are continuous everywhere, and continuity means exactly lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a). So the limit is the function value. If substitution gives 00\frac{0}{0}, the function is not continuous at that point, and you have to simplify first.
No. It only guarantees that at least one cc exists in (a,b)(a, b). To narrow it down, you can halve the interval again and again and keep the half where the sign changes (the bisection method).
Yes. f(x)=∣x∣f(x) = |x| has a corner at x=0x = 0, but you can draw it without lifting your pencil, and lim⁡x→0∣x∣=0=f(0)\lim_{x \to 0} |x| = 0 = f(0). Corners matter for derivatives, not for continuity.

Glossary

Continuous at a point
ff is continuous at aa if f(a)f(a) is defined, lim⁡x→af(x)\lim_{x \to a} f(x) exists and the two are equal
Continuous on an interval
Continuous at every point of the interval, using one-sided limits at the endpoints of a closed interval
Discontinuity
A point where at least one of the three conditions of continuity fails
Piecewise function
A function defined by different formulas on different intervals; it can only break at the breakpoints or where a piece itself breaks
Intermediate Value Theorem (IVT)
A continuous function on [a,b][a, b] takes every value between f(a)f(a) and f(b)f(b)

Formula Card

Continuity at a point

lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a)

Contains all three conditions: $f(a)$ defined, the limit exists, and they are equal

Piecewise breakpoint condition

lim⁡x→a−f(x)=lim⁡x→a+f(x)=f(a)\lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x) = f(a)

Evaluate both pieces at the breakpoint, set them equal and solve for the unknown constant

Intermediate Value Theorem

f(a)<N<f(b)⇒f(c)=N for some c∈(a,b)f(a) < N < f(b) \Rightarrow f(c) = N \text{ for some } c \in (a, b)

Only for $f$ continuous on $[a, b]$; with $N = 0$ it proves that a root exists

More in This Topic