Skip to content
Family Table Math

Continuity

Informally, a function is continuous if you can draw its graph without lifting your pencil: no holes, no jumps, no asymptotes. Calculus needs a precise version of this idea, because big theorems like the Intermediate Value Theorem only work for continuous functions. The definition uses limits, and on the AP exam you’ll need to check it step by step.

A function ff is continuous at x=ax = a when all three conditions hold:

  1. f(a)f(a) is defined.
  2. lim⁡x→af(x)\displaystyle\lim_{x \to a} f(x) exists.
  3. lim⁡x→af(x)=f(a)\displaystyle\lim_{x \to a} f(x) = f(a).

If any condition fails, ff is discontinuous at aa. Which condition fails tells you what kind of break it is (see types of discontinuities).

Condition 3 is the heart of it: the value the function approaches is the value it has. That’s also why, for continuous functions, you can find limits by substituting.

Graph of f: a parabola-shaped piece with a hole at (-2, 1) and a separate filled dot at (-2, 3), passing smoothly through (0, 2) and rising to an open dot at (2, 5); then a filled dot at (2, 1) starting a line y = x - 1 that has a hole at (4, 3) −4 −3 −2 −1 1 2 3 4 5 −1 1 2 3 4 5 6 y = f(x)
The graph of ff for Example 1: check continuity at x=−2x = -2, 00, 22, and 44.
  • ff is continuous on an open interval (a,b)(a, b) if it is continuous at every point inside.
  • ff is continuous on a closed interval [a,b][a, b] if it is continuous on (a,b)(a, b), and at the endpoints the one-sided limits match: lim⁡x→a+f(x)=f(a)\displaystyle\lim_{x \to a^+} f(x) = f(a) and lim⁡x→b−f(x)=f(b)\displaystyle\lim_{x \to b^-} f(x) = f(b).

Functions that are continuous on their domains

Section titled “Functions that are continuous on their domains”

These families are continuous at every point of their domain:

Function typeWhere it’s continuous
Polynomialsall real numbers
Rational functions p(x)q(x)\dfrac{p(x)}{q(x)}everywhere except where q(x)=0q(x) = 0
x\sqrt{x} (even roots)x≥0x \ge 0
x3\sqrt[3]{x} (odd roots)all real numbers
exe^x, bxb^xall real numbers
ln⁡x\ln xx>0x \gt 0
sin⁡x\sin x, cos⁡x\cos xall real numbers
tan⁡x\tan xeverywhere except x=π2+kπx = \dfrac{\pi}{2} + k\pi (where cos⁡x=0\cos x = 0)

Sums, differences, products, and compositions of continuous functions are continuous, and so are quotients wherever the denominator isn’t 00. So to find where a formula is continuous, find its domain.

Piecewise functions are the exception: each piece may be continuous, but you have to check the boundary points with the three conditions.

To show ff is continuous at aa, show all three: ”f(2)=3f(2) = 3. lim⁡x→2−f(x)=3\displaystyle\lim_{x \to 2^-} f(x) = 3 and lim⁡x→2+f(x)=3\displaystyle\lim_{x \to 2^+} f(x) = 3, so lim⁡x→2f(x)=3\displaystyle\lim_{x \to 2} f(x) = 3. Since lim⁡x→2f(x)=f(2)\displaystyle\lim_{x \to 2} f(x) = f(2), ff is continuous at x=2x = 2.”

Example 1: Reading continuity from a graph

Section titled “Example 1: Reading continuity from a graph”

Use the graph of ff above. At each of x=−2x = -2, 00, 22, and 44, decide whether ff is continuous. If not, say which condition fails.

Solution.

  • x=−2x = -2: f(−2)=3f(-2) = 3 (filled dot), and lim⁡x→−2f(x)=1\displaystyle\lim_{x \to -2} f(x) = 1 (the hole). The limit exists but doesn’t equal f(−2)f(-2). Not continuous: condition 3 fails.
  • x=0x = 0: the curve passes smoothly through (0,2)(0, 2). f(0)=2=lim⁡x→0f(x)f(0) = 2 = \displaystyle\lim_{x \to 0} f(x). Continuous.
  • x=2x = 2: the left-hand limit is 55 and the right-hand limit is 11, so the limit doesn’t exist. Not continuous: condition 2 fails.
  • x=4x = 4: there’s a hole and no dot, so f(4)f(4) is undefined. Not continuous: condition 1 fails. (The limit does exist; it’s 33.)

Is g(x)={x2−1,x<22x−1,x≥2g(x) = \begin{cases} x^2 - 1, & x \lt 2 \\ 2x - 1, & x \ge 2 \end{cases} continuous at x=2x = 2? Justify your answer.

Solution. Check all three conditions.

  1. g(2)=2(2)−1=3g(2) = 2(2) - 1 = 3, so g(2)g(2) is defined.
  2. lim⁡x→2−(x2−1)=3\displaystyle\lim_{x \to 2^-} (x^2 - 1) = 3 and lim⁡x→2+(2x−1)=3\displaystyle\lim_{x \to 2^+} (2x - 1) = 3. Both sides agree, so lim⁡x→2g(x)=3\displaystyle\lim_{x \to 2} g(x) = 3.
  3. lim⁡x→2g(x)=3=g(2)\displaystyle\lim_{x \to 2} g(x) = 3 = g(2).

All three conditions hold, so gg is continuous at x=2x = 2.

Example 3: Where is a function continuous?

Section titled “Example 3: Where is a function continuous?”

Where is f(x)=x+1x2−9f(x) = \dfrac{x + 1}{x^2 - 9} continuous? Where is h(x)=x−2h(x) = \sqrt{x - 2} continuous?

Solution. ff is a rational function, so it’s continuous everywhere except where the denominator is 00: x2−9=0x^2 - 9 = 0 at x=±3x = \pm 3. So ff is continuous on {x∈R∣x≠±3}\{x \in \mathbb{R} \mid x \ne \pm 3\}.

hh is a square root, continuous wherever x−2≥0x - 2 \ge 0. So hh is continuous on {x∈R∣x≥2}\{x \in \mathbb{R} \mid x \ge 2\}. At x=2x = 2 it’s continuous from the right only, which is all we need at an endpoint.

Where is k(x)=ln⁡(x−1)+5−xk(x) = \ln(x - 1) + \sqrt{5 - x} continuous?

Solution. Each piece is continuous on its domain:

  • ln⁡(x−1)\ln(x - 1) needs x−1>0x - 1 \gt 0, so x>1x \gt 1.
  • 5−x\sqrt{5 - x} needs 5−x≥05 - x \ge 0, so x≤5x \le 5.

The sum is continuous where both parts are: {x∈R∣1<x≤5}\{x \in \mathbb{R} \mid 1 \lt x \le 5\}.

Checking only one or two conditions. Showing the limit exists is not enough; you must also show it equals f(a)f(a). On the AP exam, a continuity justification needs all three conditions, with numbers.

Assuming “defined” means “continuous”. At x=−2x = -2 in Example 1, f(−2)f(-2) is defined, yet ff is not continuous there.

Forgetting the boundary points of piecewise functions. Each piece of gg in Example 2 is a polynomial, but that doesn’t guarantee continuity at x=2x = 2. Check the boundary every time.

Mixing up domain and continuity for rational functions. A function like x2−9x−3\dfrac{x^2 - 9}{x - 3} is not continuous at x=3x = 3, even though it simplifies to x+3x + 3. It isn’t defined there.

Using degrees for trig. Write the discontinuities of tan⁡x\tan x as x=π2+kπx = \dfrac{\pi}{2} + k\pi in radians, not 90∘+180∘k90^\circ + 180^\circ k.

1. (Warm-up) Suppose f(3)=4f(3) = 4 and lim⁡x→3f(x)=4\displaystyle\lim_{x \to 3} f(x) = 4. Is ff continuous at x=3x = 3?

Solution

Yes. f(3)f(3) is defined, the limit exists, and they are equal, so all three conditions hold.

2. (Warm-up) Suppose lim⁡x→1f(x)=2\displaystyle\lim_{x \to 1} f(x) = 2 and f(1)=5f(1) = 5. Is ff continuous at x=1x = 1? If not, which condition fails?

Solution

No. f(1)f(1) is defined and the limit exists, but 2≠52 \ne 5, so condition 3 fails.

3. (Warm-up) Where is p(x)=x3−4x+1p(x) = x^3 - 4x + 1 continuous?

Solution

pp is a polynomial, so it’s continuous for all real numbers.

4. (Core) Where is r(x)=x−2x2−5x+6r(x) = \dfrac{x - 2}{x^2 - 5x + 6} continuous?

Solution

The denominator factors as (x−2)(x−3)(x - 2)(x - 3), which is 00 at x=2x = 2 and x=3x = 3. So rr is continuous on {x∈R∣x≠2,3}\{x \in \mathbb{R} \mid x \ne 2, 3\}.

(Even though the factor x−2x - 2 cancels, r(2)r(2) is undefined, so rr is not continuous at 22.)

5. (Core) Is g(x)={3x+1,x≤1x2+3,x>1g(x) = \begin{cases} 3x + 1, & x \le 1 \\ x^2 + 3, & x \gt 1 \end{cases} continuous at x=1x = 1? Justify your answer.

Solution
  1. g(1)=3(1)+1=4g(1) = 3(1) + 1 = 4.
  2. lim⁡x→1−(3x+1)=4\displaystyle\lim_{x \to 1^-} (3x + 1) = 4 and lim⁡x→1+(x2+3)=4\displaystyle\lim_{x \to 1^+} (x^2 + 3) = 4, so lim⁡x→1g(x)=4\displaystyle\lim_{x \to 1} g(x) = 4.
  3. lim⁡x→1g(x)=g(1)\displaystyle\lim_{x \to 1} g(x) = g(1).

So gg is continuous at x=1x = 1.

6. (Core) Is h(x)={x2,x<0cos⁡x,x≥0h(x) = \begin{cases} x^2, & x \lt 0 \\ \cos x, & x \ge 0 \end{cases} continuous at x=0x = 0? (Radians.)

Solution

lim⁡x→0−x2=0\displaystyle\lim_{x \to 0^-} x^2 = 0 and lim⁡x→0+cos⁡x=cos⁡0=1\displaystyle\lim_{x \to 0^+} \cos x = \cos 0 = 1. The one-sided limits differ, so lim⁡x→0h(x)\displaystyle\lim_{x \to 0} h(x) does not exist. hh is not continuous at 00 (condition 2 fails).

7. (Core) Where is f(x)=x+3x−1f(x) = \dfrac{\sqrt{x + 3}}{x - 1} continuous?

Solution

The square root needs x+3≥0x + 3 \ge 0, so x≥−3x \ge -3. The denominator needs x≠1x \ne 1.

So ff is continuous on {x∈R∣x≥−3, x≠1}\{x \in \mathbb{R} \mid x \ge -3,\ x \ne 1\}.

8. (Challenge) Show that f(x)={x2,x≤−12x+3,−1<x<29−x,x≥2f(x) = \begin{cases} x^2, & x \le -1 \\ 2x + 3, & -1 \lt x \lt 2 \\ 9 - x, & x \ge 2 \end{cases} is continuous for all real numbers.

Solution

Each piece is a polynomial, so ff is continuous everywhere except possibly at the boundaries x=−1x = -1 and x=2x = 2.

At x=−1x = -1: f(−1)=(−1)2=1f(-1) = (-1)^2 = 1. lim⁡x→−1−x2=1\displaystyle\lim_{x \to -1^-} x^2 = 1 and lim⁡x→−1+(2x+3)=1\displaystyle\lim_{x \to -1^+} (2x + 3) = 1. The limit is 1=f(−1)1 = f(-1), so ff is continuous at −1-1.

At x=2x = 2: f(2)=9−2=7f(2) = 9 - 2 = 7. lim⁡x→2−(2x+3)=7\displaystyle\lim_{x \to 2^-} (2x + 3) = 7 and lim⁡x→2+(9−x)=7\displaystyle\lim_{x \to 2^+} (9 - x) = 7. The limit is 7=f(2)7 = f(2), so ff is continuous at 22.

So ff is continuous for all real numbers.

9. (Challenge) Let h(x)={xsin⁡(1x),x≠00,x=0h(x) = \begin{cases} x\sin\left(\dfrac{1}{x}\right), & x \ne 0 \\ 0, & x = 0 \end{cases}. Show that hh is continuous at x=0x = 0.

Solution

h(0)=0h(0) = 0 is defined. For the limit, use the squeeze theorem: since ∣sin⁡(1x)∣≤1\left|\sin\left(\dfrac{1}{x}\right)\right| \le 1,

−∣x∣≤xsin⁡(1x)≤∣x∣-|x| \le x\sin\left(\frac{1}{x}\right) \le |x|

Both bounds approach 00 as x→0x \to 0, so lim⁡x→0h(x)=0\displaystyle\lim_{x \to 0} h(x) = 0.

Since lim⁡x→0h(x)=0=h(0)\displaystyle\lim_{x \to 0} h(x) = 0 = h(0), hh is continuous at 00.