Skip to content

Unit 1: Limits and Continuity

Removing Discontinuities

Decide whether a discontinuity can be removed, then find the function value or the constant in a piecewise formula that makes the function continuous.

Topic 1.13 · 10 min read

The function f(x)=x2−2x−8x−4f(x) = \dfrac{x^2 - 2x - 8}{x - 4} has no value at x=4x = 4, so it is discontinuous there. Everywhere else it equals x+2x + 2, because the numerator factors as (x−4)(x+2)(x - 4)(x + 2). Its graph is the line y=x+2y = x + 2 with a single point missing at (4,6)(4, 6), and declaring f(4)=6f(4) = 6 fills that point and makes ff continuous. Repairs like this, by choosing one function value or a constant inside a formula, work for some discontinuities and are impossible for others, and the limit at the point decides which.

A limit that exists can be matched

Topic 1.11 defined continuity at x=ax = a with three conditions: f(a)f(a) is defined, lim⁡x→af(x)\lim\limits_{x \to a} f(x) exists, and the two are equal. When you repair a function at aa, you are allowed to choose f(a)f(a). You are not able to change the limit by doing so, because the limit as x→ax \to a depends only on the values of ff at inputs near aa, never on the value at aa itself. So the repair works exactly when there is a finite limit to match.

That splits the three kinds of discontinuity from topic 1.10 cleanly:

Discontinuity at aaLimit at aaCan choosing f(a)f(a) fix it?
Removable (a hole, or a point moved off the curve)exists, equal to some number LLYes: set f(a)=Lf(a) = L
Jumpleft and right limits are different numbersNo: f(a)f(a) can equal at most one of them
Infiniteat least one side is unboundedNo: no number matches

This is where the name "removable" comes from: it is the one kind of discontinuity that a single new function value removes.

There are two versions of the repair. If f(a)f(a) is undefined (a hole), you define f(a)=Lf(a) = L. If f(a)f(a) is defined but is the wrong number (a point displaced from the curve), you redefine it. For instance, let p(x)=sin⁡(5x)xp(x) = \dfrac{\sin(5x)}{x} for x≠0x \neq 0 and p(0)=1p(0) = 1. Writing sin⁡(5x)x=5⋅sin⁡(5x)5x\dfrac{\sin(5x)}{x} = 5\cdot\dfrac{\sin(5x)}{5x} and using lim⁡u→0sin⁡uu=1\lim\limits_{u \to 0} \dfrac{\sin u}{u} = 1 (topic 1.8) gives lim⁡x→0p(x)=5\lim\limits_{x \to 0} p(x) = 5. The value p(0)=1p(0) = 1 is defined but wrong, and changing it to p(0)=5p(0) = 5 makes pp continuous at 0.

Finding the number to fill in

For a quotient at an input aa where the denominator is 0, substitute aa into the numerator first.

  • Numerator not 0. The quotient behaves like a nonzero number divided by something shrinking to 0, so it grows without bound: an infinite discontinuity, which cannot be removed (topic 1.14 covers this behavior).
  • Numerator also 0. The form 00\frac{0}{0} says nothing yet. Simplify with the algebra of topic 1.6 (factor and cancel, multiply by a conjugate, use a trig limit) and find the limit. If it exists, that number is the value to fill in.

For example, q(x)=x+7−3x−2q(x) = \dfrac{\sqrt{x+7} - 3}{x - 2} gives 00\frac{0}{0} at x=2x = 2. Multiplying the top and bottom by the conjugate x+7+3\sqrt{x+7} + 3 turns the numerator into (x+7)−9=x−2(x + 7) - 9 = x - 2, so for x≠2x \neq 2,

q(x)=x−2(x−2)(x+7+3)=1x+7+3  ⟶  13+3=16.q(x) = \frac{x - 2}{(x - 2)\left(\sqrt{x+7} + 3\right)} = \frac{1}{\sqrt{x+7} + 3} \;\longrightarrow\; \frac{1}{3 + 3} = \frac{1}{6}.

Defining q(2)=16q(2) = \frac{1}{6} removes the discontinuity. The simplified formula agrees with qq only for x≠2x \neq 2, so cancelling finds the limit, and stating q(2)=16q(2) = \frac{1}{6} is the separate step that does the repair.

Matching the pieces at a boundary

A piecewise-defined function uses one formula on one side of a boundary point cc and another formula on the other side:

f(x)={g(x),x<ch(x),x≥cf(x) = \begin{cases} g(x), & x < c \\ h(x), & x \geq c \end{cases}

Suppose gg and hh are each continuous at cc, as polynomials, exponentials, sines and cosines are. Near cc on the left, ff uses gg, so lim⁡x→c−f(x)=g(c)\lim\limits_{x \to c^-} f(x) = g(c); near cc on the right, ff uses hh, so lim⁡x→c+f(x)=h(c)\lim\limits_{x \to c^+} f(x) = h(c). The value at cc itself comes from whichever piece includes cc, here f(c)=h(c)f(c) = h(c). You evaluate gg at cc even though ff never uses gg at cc: the one-sided limit only looks at inputs near cc, and gg is continuous there, so its limit is its value.

Continuity at cc needs the left limit, the right limit and f(c)f(c) to be one number. With two pieces that becomes one equation, g(c)=h(c)g(c) = h(c). If the function also lists a separate value at cc, say f(c)=vf(c) = v, all three must agree: g(c)=h(c)=vg(c) = h(c) = v.

Each boundary gives one equation, so one unknown constant can usually be pinned down by one boundary, and two constants need two boundaries (as in Example 3). For example,

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

is continuous at 3 when 9+k=12−k9 + k = 12 - k, that is, k=32k = \frac{3}{2}. Both pieces then give 10.510.5 at x=3x = 3.

The matching condition is about the boundary only. Each piece also has to be continuous on its own interval, which fails if, say, a rational piece has a zero denominator inside the interval where it is used. Check that before you report that a function is continuous everywhere.

When no value works

"Make ff continuous, if possible" allows for the answer "it isn't possible." Two things can cause that.

The discontinuity is not removable. If the limit at aa is infinite or the one-sided limits differ, no function value repairs it, as in the table above.

The equation for the constant has no solution. In

f(x)={3x+k,x<0ex+k,x≥0f(x) = \begin{cases} 3x + k, & x < 0 \\ e^x + k, & x \geq 0 \end{cases}

matching at 0 requires k=1+kk = 1 + k, which no number satisfies. The constant kk shifts both pieces up or down by the same amount, so the gap of 1 between them at x=0x = 0 never closes; ff has a jump at 0 for every kk. An equation for kk that is quadratic can fail the same way when its discriminant is negative. When you find no solution, say so and say why: "no value of kk makes the one-sided limits equal."

Worked examples

Worked exampleExample 1: which discontinuities can be removed

Let h(x)=x3−8x2−4h(x) = \dfrac{x^3 - 8}{x^2 - 4}. Find every value of xx where hh is discontinuous. For each one, either define hh there to make it continuous or explain why that is impossible.

Show solution

A rational function is continuous everywhere it is defined, so the only candidates are the zeros of the denominator, x2−4=0x^2 - 4 = 0, which are x=2x = 2 and x=−2x = -2.

Factor both parts to see what is shared. The difference of cubes gives x3−8=(x−2)(x2+2x+4)x^3 - 8 = (x - 2)(x^2 + 2x + 4), and x2−4=(x−2)(x+2)x^2 - 4 = (x - 2)(x + 2). For x≠±2x \neq \pm 2,

h(x)=x2+2x+4x+2.h(x) = \frac{x^2 + 2x + 4}{x + 2}.

At x=2x = 2: the original is 00\frac{0}{0}, and the simplified form gives

lim⁡x→2h(x)=4+4+42+2=3.\lim_{x \to 2} h(x) = \frac{4 + 4 + 4}{2 + 2} = 3.

The limit exists, so the discontinuity is removable. Define h(2)=3h(2) = 3.

At x=−2x = -2: the numerator of the simplified form is 4−4+4=44 - 4 + 4 = 4, not 0, while the denominator x+2x + 2 goes to 0. The quotient is unbounded near −2-2, so this is an infinite discontinuity, and no value of h(−2)h(-2) can make hh continuous there.

The factor x−2x - 2 appeared in both numerator and denominator, which is what made x=2x = 2 removable. The factor x+2x + 2 appeared only in the denominator, which is what made x=−2x = -2 an asymptote.

Worked exampleExample 2: a constant that appears squared

Find all values of kk for which the function

f(x)={k2x−3,x<2k(x+3),x≥2f(x) = \begin{cases} k^2x - 3, & x < 2 \\ k(x + 3), & x \geq 2 \end{cases}

is continuous at x=2x = 2.

Show solution

Both pieces are polynomials in xx, so each is continuous, and the one-sided limits are the pieces evaluated at 2:

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

Continuity at 2 requires 2k2−3=5k2k^2 - 3 = 5k, or 2k2−5k−3=02k^2 - 5k - 3 = 0. This factors as (2k+1)(k−3)=0(2k + 1)(k - 3) = 0, so k=3k = 3 or k=−12k = -\frac{1}{2}.

Both roots solve the continuity equation itself, so both are answers; substituting them back only confirms the arithmetic. With k=3k = 3, the left piece gives 18−3=1518 - 3 = 15 and the right gives 1515. With k=−12k = -\frac{1}{2}, the left gives 12−3=−52\frac{1}{2} - 3 = -\frac{5}{2} and the right gives −52-\frac{5}{2}. Both values of kk work, and the answer must list both.

Worked exampleExample 3: two constants, two boundaries (exam style, no calculator)

Let ff be the function defined by

f(x)={sin⁡(4x)x,x<0ax+b,0≤x≤3x2+7x−30x−3,x>3f(x) = \begin{cases} \dfrac{\sin(4x)}{x}, & x < 0 \\ ax + b, & 0 \leq x \leq 3 \\ \dfrac{x^2 + 7x - 30}{x - 3}, & x > 3 \end{cases}

where aa and bb are constants.

(a) Find lim⁡x→0−f(x)\lim\limits_{x \to 0^-} f(x).

(b) Find the values of aa and bb for which ff is continuous at both x=0x = 0 and x=3x = 3. Justify your answer.

(c) For the values found in part (b), is ff continuous for all real numbers? Explain.

(d) Suppose instead that bb has the value from part (b) but a=1a = 1. What kind of discontinuity does ff have at x=3x = 3, and can it be removed by changing only the value of f(3)f(3)?

Show solution

(a) For x<0x < 0, write sin⁡(4x)x=4⋅sin⁡(4x)4x\dfrac{\sin(4x)}{x} = 4\cdot\dfrac{\sin(4x)}{4x}. As x→0−x \to 0^-, 4x→04x \to 0, so

lim⁡x→0−f(x)=4⋅1=4.\lim_{x \to 0^-} f(x) = 4\cdot 1 = 4.

(b) At x=0x = 0: the left limit is 4 from part (a). The middle piece is linear, so the right limit is a⋅0+b=ba\cdot 0 + b = b, and f(0)=bf(0) = b. Continuity at 0 requires b=4b = 4.

At x=3x = 3: the middle piece gives lim⁡x→3−f(x)=f(3)=3a+b\lim\limits_{x \to 3^-} f(x) = f(3) = 3a + b. For x>3x > 3 the numerator factors as (x+10)(x−3)(x + 10)(x - 3), so f(x)=x+10f(x) = x + 10 there and

lim⁡x→3+f(x)=13.\lim_{x \to 3^+} f(x) = 13.

Continuity at 3 requires 3a+b=133a + b = 13. With b=4b = 4, 3a=93a = 9 and a=3a = 3.

Justification, as you would write it: with a=3a = 3 and b=4b = 4, lim⁡x→0−f(x)=4=lim⁡x→0+f(x)=f(0)\lim\limits_{x \to 0^-} f(x) = 4 = \lim\limits_{x \to 0^+} f(x) = f(0) and lim⁡x→3−f(x)=13=lim⁡x→3+f(x)=f(3)\lim\limits_{x \to 3^-} f(x) = 13 = \lim\limits_{x \to 3^+} f(x) = f(3), so ff is continuous at x=0x = 0 and x=3x = 3.

(c) Yes. On x<0x < 0, ff is a quotient of continuous functions whose denominator xx is never 0 there. On 0<x<30 < x < 3 it is a linear function. On x>3x > 3 it is a rational function whose denominator x−3x - 3 is never 0 there. So ff is continuous on each open piece, and part (b) makes it continuous at the two boundaries.

(d) With a=1a = 1 and b=4b = 4, the left limit at 3 is 3+4=73 + 4 = 7 and the right limit is still 13. Both one-sided limits are finite and unequal, so ff has a jump discontinuity at x=3x = 3. Changing f(3)f(3) cannot remove it: lim⁡x→3f(x)\lim\limits_{x \to 3} f(x) does not exist, and continuity requires that limit to exist and equal f(3)f(3).

Where students lose points

On the exam

Questions that ask for a constant making a piecewise function continuous expect you to show the equation you solved, built from the one-sided limits and the function value at the boundary, and to state your constants. A justification that the result is continuous names the three quantities and shows they are equal, as in Example 3(b). Topic 2.4 adds a second condition when a question asks for a function that is both continuous and differentiable at a boundary; this topic's equation is always the first of the two.

Check yourself

  1. Question 1

    Let f(x)=x2−5x+6x2−4f(x) = \dfrac{x^2 - 5x + 6}{x^2 - 4} for x≠2x \neq 2 and x≠−2x \neq -2. What value of f(2)f(2) makes ff continuous at x=2x = 2?

    1. A

      −14-\dfrac{1}{4}

    2. B

      14\dfrac{1}{4}

    3. C

      00

    4. D

      No value works, because ff has a vertical asymptote at x=2x = 2.

    Show answer

    A

    Both the numerator and the denominator are 0 at x=2x = 2, so factor: f(x)=(x−2)(x−3)(x−2)(x+2)=x−3x+2f(x) = \dfrac{(x-2)(x-3)}{(x-2)(x+2)} = \dfrac{x-3}{x+2} for x≠2x \neq 2, and the limit at 2 is −14\dfrac{-1}{4}. Choice D reacts to the zero denominator without checking the numerator; the asymptote is at x=−2x = -2, where only the denominator is 0.

  2. Question 2

    The function f(x)={x2+a,x<1b,x=13x−a,x>1f(x) = \begin{cases} x^2 + a, & x < 1 \\ b, & x = 1 \\ 3x - a, & x > 1 \end{cases} is continuous at x=1x = 1. What is the value of bb?

    1. A

      11

    2. B

      22

    3. C

      33

    4. D

      44

    Show answer

    B

    The left limit is 1+a1 + a and the right limit is 3−a3 - a. Setting them equal gives a=1a = 1, so both limits are 2, and continuity also needs f(1)=bf(1) = b to equal that common limit: b=2b = 2. Choice A is the value of aa, which is where students stop when they match only the two formulas.

  3. Question 3

    Is there a real number kk that makes f(x)={kx+3,x<1k2+x2+3,x≥1f(x) = \begin{cases} kx + 3, & x < 1 \\ k^2 + x^2 + 3, & x \geq 1 \end{cases} continuous at x=1x = 1? If so, find it.

    Show answer

    No real value of kk works.

    Matching the pieces at 1 requires k+3=k2+4k + 3 = k^2 + 4, that is, k2−k+1=0k^2 - k + 1 = 0. Its discriminant is (−1)2−4=−3<0(-1)^2 - 4 = -3 < 0, so the equation has no real solution, and for every kk the one-sided limits at 1 differ (a jump).

  4. Question 4

    Let g(x)=x+k−2x−1g(x) = \dfrac{\sqrt{x + k} - 2}{x - 1} for x≠1x \neq 1, where kk is a constant. Find the value of kk and the value of g(1)g(1) that make gg continuous at x=1x = 1.

    Show answer

    k=3k = 3 and g(1)=14g(1) = \dfrac{1}{4}.

    The denominator goes to 0, so the limit can exist only if the numerator also goes to 0: 1+k=2\sqrt{1 + k} = 2, so k=3k = 3. Otherwise the discontinuity is infinite and cannot be removed. With k=3k = 3, multiplying by the conjugate gives g(x)=1x+3+2g(x) = \dfrac{1}{\sqrt{x+3} + 2} for x≠1x \neq 1, which approaches 14\dfrac{1}{4}, so define g(1)=14g(1) = \dfrac{1}{4}.

Go deeper