Math Core

Lesson 1.6 · Limits and Continuity

Continuity

Informally, a function is continuous if you can draw its graph without lifting your pencil. That picture is a good start, but calculus needs a definition you can check with algebra, because the biggest theorems in the course (the intermediate value theorem, the extreme value theorem, the mean value theorem, the fundamental theorem of calculus) only apply to continuous functions.

Continuity at a point

A function is continuous at x=cx = c when its limit there matches its value there: where the graph is heading is exactly where the graph is.

Definition

Continuity at a point

A function ff is continuous at x=cx = c if all three of the following are true:

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

If any condition fails, ff is discontinuous at cc.

Condition 3 is the heart of the definition; conditions 1 and 2 just make sure both sides of that equation mean something. On the AP exam, a justification of continuity or discontinuity should check the conditions explicitly, with the actual values.

Recall that condition 2 requires the one-sided limits to agree. So in practice, to check continuity at a point where a function changes formula, you compute three numbers and compare them:

lim⁡x→c−f(x),lim⁡x→c+f(x),f(c).\lim_{x \to c^-} f(x), \qquad \lim_{x \to c^+} f(x), \qquad f(c).

The function is continuous at cc exactly when all three are equal.

Worked example: Checking a piecewise function

Is ff continuous at x=2x = 2?

f(x)={x2−1,x<23,x=22x−1,x>2f(x) = \begin{cases} x^2 - 1, & x < 2 \\ 3, & x = 2 \\ 2x - 1, & x > 2 \end{cases}

Solution. Check the three conditions.

  1. f(2)=3f(2) = 3, so f(2)f(2) is defined.
  2. lim⁡x→2−f(x)=22−1=3\displaystyle \lim_{x \to 2^-} f(x) = 2^2 - 1 = 3 and lim⁡x→2+f(x)=2(2)−1=3\displaystyle \lim_{x \to 2^+} f(x) = 2(2) - 1 = 3. They agree, so lim⁡x→2f(x)=3\displaystyle \lim_{x \to 2} f(x) = 3.
  3. lim⁡x→2f(x)=3=f(2)\displaystyle \lim_{x \to 2} f(x) = 3 = f(2).

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

Continuity on an interval

A function is continuous on an open interval (a,b)(a, b) if it is continuous at every point of the interval.

At the endpoints of a closed interval we only care about one side. We say ff is continuous from the right at aa if lim⁡x→a+f(x)=f(a)\displaystyle \lim_{x \to a^+} f(x) = f(a), and continuous from the left at bb if lim⁡x→b−f(x)=f(b)\displaystyle \lim_{x \to b^-} f(x) = f(b). Then ff is continuous on the closed interval [a,b][a, b] if it is continuous on (a,b)(a, b), continuous from the right at aa, and continuous from the left at bb.

For example, f(x)=4−xf(x) = \sqrt{4 - x} is defined only for x≤4x \le 4. It is continuous on (−∞,4)(-\infty, 4) and continuous from the left at 44, so it is continuous on its entire domain (−∞,4](-\infty, 4].

Which functions are continuous?

You rarely need to check the definition point by point, thanks to the following facts.

Continuous functions

These functions are continuous at every point of their domains:

  • polynomials, and rational functions (everywhere except where the denominator is 00)
  • xn\sqrt[n]{x} and other root functions
  • sin⁡x\sin x, cos⁡x\cos x, tan⁡x\tan x and the other trigonometric functions
  • exponential functions bxb^x, including exe^x, and logarithmic functions such as ln⁡x\ln x

Moreover, if ff and gg are continuous at cc, then so are f+gf + g, f−gf - g, kfkf, fgfg, and fg\dfrac{f}{g} (provided g(c)≠0g(c) \ne 0). If gg is continuous at cc and ff is continuous at g(c)g(c), then f∘gf \circ g is continuous at cc.

So for a function built from these pieces, the only places to worry about are points outside the domain (zero denominators, negative numbers under even roots, nonpositive inputs to logarithms) and points where a piecewise function changes formula.

Worked example: Finding where a function is continuous

On what intervals is g(x)=x+1x2−4g(x) = \dfrac{x + 1}{x^2 - 4} continuous?

Solution. gg is a rational function, so it is continuous wherever its denominator is nonzero. Since x2−4=0x^2 - 4 = 0 when x=±2x = \pm 2, gg is continuous on (−∞,−2)(-\infty, -2), (−2,2)(-2, 2), and (2,∞)(2, \infty).

Making a piecewise function continuous

A common AP question asks you to choose a constant so that a piecewise function is continuous. Each piece is a continuous function on its own, so the only question is whether the pieces meet where the formula changes. Set the one-sided limits (and the function value) equal and solve.

Worked example: Solving for a constant

Find kk so that ff is continuous for all real numbers.

f(x)={kx+3,x≤2x2−k,x>2f(x) = \begin{cases} kx + 3, & x \le 2 \\ x^2 - k, & x > 2 \end{cases}

Solution. Both pieces are polynomials, so ff is continuous everywhere except possibly at x=2x = 2. There,

f(2)=lim⁡x→2−f(x)=2k+3,lim⁡x→2+f(x)=4−k.f(2) = \lim_{x \to 2^-} f(x) = 2k + 3, \qquad \lim_{x \to 2^+} f(x) = 4 - k.

Continuity requires 2k+3=4−k2k + 3 = 4 - k, so 3k=13k = 1 and k=13k = \dfrac{1}{3}. With this value both pieces reach the height 113\dfrac{11}{3} at x=2x = 2.

With k = 1/3 the line and the parabola meet at (2, 11/3), so the graph has no break.Open in grapher →

Worked example: Two constants

Find aa and bb so that ff is continuous everywhere.

f(x)={2x,x<1ax+b,1≤x≤3x2−1,x>3f(x) = \begin{cases} 2x, & x < 1 \\ ax + b, & 1 \le x \le 3 \\ x^2 - 1, & x > 3 \end{cases}

Solution. At x=1x = 1: the left piece approaches 2(1)=22(1) = 2 and the middle piece gives a+ba + b, so a+b=2a + b = 2.

At x=3x = 3: the middle piece gives 3a+b3a + b and the right piece approaches 9−1=89 - 1 = 8, so 3a+b=83a + b = 8.

Subtracting the first equation from the second: 2a=62a = 6, so a=3a = 3 and b=−1b = -1.

Common mistake

Showing that lim⁡x→cf(x)\displaystyle \lim_{x \to c} f(x) exists is not enough to prove continuity. You must also show that f(c)f(c) exists and equals the limit. A function with a hole, or with a single point moved off the curve, has a limit but is not continuous there.

Tip

"Continuous" means continuous at each point of the domain. So y=1xy = \dfrac{1}{x} is a continuous function (it is continuous at every point where it is defined), even though it is discontinuous at x=0x = 0. When the AP exam asks about continuity "for all real numbers" or "on [a,b][a, b]," check every point in that set.

Practice

Practice 1

Let f(x)=x2−9x−3f(x) = \dfrac{x^2 - 9}{x - 3}. Which condition in the definition of continuity at x=3x = 3 fails?

Practice 2

Find the value of kk that makes gg continuous at x=3x = 3.

g(x)={x2+k,x<34x−1,x≥3g(x) = \begin{cases} x^2 + k, & x < 3 \\ 4x - 1, & x \ge 3 \end{cases}

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Find the value of kk that makes hh continuous for all real numbers.

h(x)={kx2,x≤23x+k,x>2h(x) = \begin{cases} kx^2, & x \le 2 \\ 3x + k, & x > 2 \end{cases}

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

On which set is f(x)=ln⁡(x−2)x−5f(x) = \dfrac{\ln(x - 2)}{x - 5} continuous?

Practice 5

Let f(x)=sin⁡3xxf(x) = \dfrac{\sin 3x}{x} for x≠0x \ne 0 and f(0)=kf(0) = k. For what value of kk is ff continuous at x=0x = 0?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Find aa and bb so that ff is continuous everywhere. Enter your answer as an ordered pair (a,b)(a, b).

f(x)={x+3,x<−1ax+b,−1≤x≤25−x,x>2f(x) = \begin{cases} x + 3, & x < -1 \\ ax + b, & -1 \le x \le 2 \\ 5 - x, & x > 2 \end{cases}

Enter a point like (2, -3)

Practice 7

Which function is continuous on the closed interval [0,2][0, 2]?