Calculus · Grade 12 and undergraduate

Continuity and the Intermediate Value Theorem

Quick answer

A function is continuous at a when f(a) is defined, the limit at a exists, and the two are equal. Discontinuities are removable (a hole or a misplaced point), jump, infinite or oscillating. Polynomials and rational, root, trigonometric, exponential and logarithmic functions are continuous on their domains. The Intermediate Value Theorem says a continuous function on [a, b] takes every value between f(a) and f(b), proving that equations have solutions without solving them.

What you'll learn

  • Test continuity at a point with the three-part definition
  • Classify discontinuities as removable, jump, infinite or oscillating
  • Choose a constant to make a piecewise function continuous
  • Use the Intermediate Value Theorem to show that an equation has a solution

The definition

A function ff is continuous at aa when all three of these hold:

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

In one line: lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a). The first two conditions are what it takes for that equation to make sense.

A function is continuous on an interval when it is continuous at every point of it. At an endpoint, only the one-sided limit from inside the interval counts.

Four kinds of discontinuity

When continuity fails at aa, the graph shows how.

Three discontinuities on one graph A piecewise graph. At x = −2 the line has a hole at (−2, 1) with a single filled dot above it at (−2, 3): a removable discontinuity. At x = 1 the graph jumps from an open circle at (1, 2.5) down to a filled dot at (1, −2). At x = 3 the graph shoots up along a dashed vertical asymptote. -4-2246-4-2246xy
  • y = f(x)
Three discontinuities on one graph
KindWhat happens at aaIn the graph
Removablethe limit exists, but f(a)f(a) is missing or differentx=−2x = -2
Jumpthe one-sided limits exist but differx=1x = 1
Infinitea one-sided limit is ±∞\pm\inftyx=3x = 3
Oscillatingthe values never settle, as sin⁡ ⁣(1x)\sin\!\left(\tfrac{1}{x}\right) at 00—

A removable discontinuity is the only fixable kind: redefine f(a)f(a) as the limit and it disappears. The other three have no limit to redefine to.

Why continuity means “limit equals value”

The limit is where the function is heading; the value is where it arrives. Continuity at aa says those are the same place, which is the precise meaning of drawing the graph through aa without lifting the pen.

It is also what makes direct substitution legitimate. For a continuous function, computing lim⁡x→af(x)\lim_{x \to a} f(x) comes down to computing f(a)f(a). That is why the long list of continuous functions matters:

  • polynomials are continuous everywhere;
  • rational, root, trigonometric, exponential and logarithmic functions are continuous at every point of their domains;
  • sums, differences, products, quotients (where the denominator is not 00) and compositions of continuous functions are continuous.

Continuity is exactly the condition under which a limit can be found by plugging in.

The Intermediate Value Theorem

Intermediate Value Theorem

If ff is continuous on the closed interval [a,b][a, b] and NN is any number between f(a)f(a) and f(b)f(b), then there is at least one cc in (a,b)(a, b) with f(c)=Nf(c) = N.

A continuous graph cannot get from one height to another without passing through every height in between. The theorem is most often used with N=0N = 0: if f(a)f(a) and f(b)f(b) have opposite signs, ff has a root between aa and bb.

Worked examples

Common mistakes

Practice problems

  1. Is f(x)=x+3x2−9f(x) = \tfrac{x + 3}{x^2 - 9} continuous at x=−3x = -3? At x=3x = 3? Classify any discontinuity.

    Answer

    Neither. Removable at −3-3; infinite at 33.

    Full solution

    x+3(x−3)(x+3)=1x−3\tfrac{x + 3}{(x - 3)(x + 3)} = \tfrac{1}{x - 3} for x≠−3x \ne -3. At −3-3 the function is undefined but the limit is −16-\tfrac{1}{6}: removable. At 33 the values are unbounded: infinite.

  2. Find kk so that g(x)={x2−kx<12x+3x≥1g(x) = \begin{cases} x^2 - k & x < 1 \\ 2x + 3 & x \ge 1 \end{cases} is continuous.

    Answer

    k=−4k = -4

    Full solution

    Left limit at 11: 1−k1 - k. Right limit and value: 55. Setting 1−k=51 - k = 5 gives k=−4k = -4.

  3. Classify the discontinuity of f(x)=∣x∣xf(x) = \tfrac{|x|}{x} at 00.

    Answer

    A jump

    Full solution

    For x>0x > 0 the function is 11; for x<0x < 0 it is −1-1. The one-sided limits exist and differ.

  4. Where is f(x)=ln⁡(x−2)f(x) = \ln(x - 2) continuous?

    Answer

    On (2,∞)(2, \infty)

    Full solution

    A logarithm is continuous on its domain, and ln⁡(x−2)\ln(x - 2) is defined exactly when x−2>0x - 2 > 0.

  5. Show that cos⁡x=x\cos x = x has a solution in (0,π2)\left(0, \tfrac{\pi}{2}\right).

    Answer

    Apply the Intermediate Value Theorem to f(x)=cos⁡x−xf(x) = \cos x - x.

    Full solution

    ff is continuous. f(0)=1>0f(0) = 1 > 0 and f ⁣(π2)=−π2<0f\!\left(\tfrac{\pi}{2}\right) = -\tfrac{\pi}{2} < 0. So f(c)=0f(c) = 0 for some cc in between, and there cos⁡c=c\cos c = c.

  6. What value should f(0)f(0) have to make f(x)=sin⁡xxf(x) = \tfrac{\sin x}{x} continuous at 00?

    Answer

    11

    Full solution

    lim⁡x→0sin⁡xx=1\lim_{x \to 0} \tfrac{\sin x}{x} = 1, so defining f(0)=1f(0) = 1 makes the limit equal the value.

  7. A continuous function has f(1)=5f(1) = 5 and f(4)=−2f(4) = -2. Must ff equal 33 somewhere in (1,4)(1, 4)? Must it equal 77?

    Answer

    It must equal 33; it need not equal 77.

    Full solution

    33 lies between −2-2 and 55, so the theorem applies. 77 does not, so the theorem is silent: ff might reach 77 or might not.

  8. Find aa and bb so that h(x)={x+1x<1ax+b1≤x<33xx≥3h(x) = \begin{cases} x + 1 & x < 1 \\ ax + b & 1 \le x < 3 \\ 3x & x \ge 3 \end{cases} is continuous.

    Answer

    a=72a = \tfrac{7}{2}, b=−32b = -\tfrac{3}{2}

    Full solution

    At x=1x = 1: 1+1=a+b1 + 1 = a + b, so a+b=2a + b = 2. At x=3x = 3: 3a+b=93a + b = 9.

    Subtracting, 2a=72a = 7, so a=72a = \tfrac{7}{2} and b=2−72=−32b = 2 - \tfrac{7}{2} = -\tfrac{3}{2}.

  9. Is f(x)=x2+1x2+4f(x) = \tfrac{x^2 + 1}{x^2 + 4} continuous everywhere?

    Answer

    Yes

    Full solution

    It is a quotient of polynomials, and the denominator x2+4x^2 + 4 is never 00. So it is continuous at every real number.

  10. A student argues: ”f(x)=tan⁡xf(x) = \tan x has f ⁣(π4)=1f\!\left(\tfrac{\pi}{4}\right) = 1 and f ⁣(3π4)=−1f\!\left(\tfrac{3\pi}{4}\right) = -1, so it has a zero between them.” What went wrong?

    Hint

    Is tan⁡x\tan x continuous on [π4,3π4]\left[\tfrac{\pi}{4}, \tfrac{3\pi}{4}\right]?

    Answer

    tan⁡x\tan x is not continuous there: it has a vertical asymptote at π2\tfrac{\pi}{2}.

    Full solution

    The Intermediate Value Theorem needs continuity on the whole closed interval. tan⁡x\tan x is undefined at π2\tfrac{\pi}{2}, which lies in [π4,3π4]\left[\tfrac{\pi}{4}, \tfrac{3\pi}{4}\right].

    In fact tan⁡x\tan x has no zero in that interval: its zeros are at multiples of π\pi. The sign change comes from the asymptote, not from a root.

Frequently asked questions

What does it mean for a function to be continuous at a point?

f(a) is defined, the limit of f(x) as x approaches a exists, and that limit equals f(a).

What are the types of discontinuity?

Removable (the limit exists but f(a) is missing or different), jump (the one-sided limits differ), infinite (a vertical asymptote) and oscillating (the values never settle).

What is the Intermediate Value Theorem?

If f is continuous on [a, b] and N is between f(a) and f(b), then f(c) = N for some c between a and b.

How do I make a piecewise function continuous?

Set the one-sided limits at the break point equal to each other and to the function's value there, and solve for the unknown constant.

Which functions are continuous?

Polynomials everywhere; rational, root, trigonometric, exponential and logarithmic functions on their domains; and sums, products, quotients and compositions of continuous functions where defined.

What to learn next