Derivatives: rules and functions

Continuity and one-sided limits

A function f(x)f(x) is continuous at x=ax=a when the left-hand limit, the right-hand limit and f(a)f(a) are all equal.

lim⁡x→a−f(x)=lim⁡x→a+f(x)=f(a)\begin{gathered} \lim_{x\to a^-}f(x) \\[4pt] =\lim_{x\to a^+}f(x) \\[4pt] =f(a) \end{gathered}

The left-hand limit lim⁡x→a−f(x)\lim_{x\to a^-}f(x) is the value approached as xx comes toward aa from below, and the right-hand limit lim⁡x→a+f(x)\lim_{x\to a^+}f(x) is the value approached from above. For a piecewise function, use the x<ax<a piece for the left-hand limit and the x≥ax\ge a piece for the right-hand limit.

lim⁡x→a−f(x)=lim⁡x→a+f(x)=f(a)\begin{gathered} \lim_{x\to a^-}f(x) \\[4pt] =\lim_{x\to a^+}f(x) \\[4pt] =f(a) \end{gathered}

When all three agree, ff is continuous at x=ax=a. For example, if f(x)=2xf(x)=2x for x<4x<4 and f(x)=x+af(x)=x+a for x≥4x\ge 4, the left-hand limit 88 equals the right-hand limit 4+a4+a when a=4a=4, so that is the value that makes ff continuous at x=4x=4.

Examples

  1. 01What is the left-hand limit at x=1?f(x)={4x(x<1)x+2(x≥1)\displaystyle f(x)=\begin{cases} 4x & (x<1) \\ x+2 & (x \geq 1) \end{cases}AnswerHide
    Answer4\displaystyle 4

    Steps

    1. Coming from the left, use the x<1 branch
    2. 4⋅1\displaystyle 4 \cdot 1=4\displaystyle = 4
  2. 02Which value of a makes f continuous at x=4?f(x)={2x(x<4)x+a(x≥4)\displaystyle f(x)=\begin{cases} 2x & (x<4) \\ x+a & (x \geq 4) \end{cases}AnswerHide
    Answer4\displaystyle 4

    Steps

    1. Value coming from the left
    2. 2⋅4\displaystyle 2 \cdot 4=8\displaystyle = 8
    3. Value coming from the right
    4. 4+a\displaystyle 4+a
    5. Continuity means these two are equal
    6. 4+a=8\displaystyle 4+a = 8⇒a=4\displaystyle \Rightarrow a = 4
  3. 03What is the right-hand limit at x=4?f(x)={3x(x<4)x+2(x≥4)\displaystyle f(x)=\begin{cases} 3x & (x<4) \\ x+2 & (x \geq 4) \end{cases}AnswerHide
    Answer6\displaystyle 6

    Steps

    1. Coming from the right, use the x≥4 branch
    2. 4+2\displaystyle 4+2=6\displaystyle = 6
    3. From the left it is the other branch, giving 12
  4. 04What is the left-hand limit at x=2?f(x)={4x(x<2)x−2(x≥2)\displaystyle f(x)=\begin{cases} 4x & (x<2) \\ x-2 & (x \geq 2) \end{cases}AnswerHide
    Answer8\displaystyle 8

    Steps

    1. Coming from the left, use the x<2 branch
    2. 4⋅2\displaystyle 4 \cdot 2=8\displaystyle = 8
  5. 05What is the right-hand limit at x=1?f(x)={3x(x<1)x−2(x≥1)\displaystyle f(x)=\begin{cases} 3x & (x<1) \\ x-2 & (x \geq 1) \end{cases}AnswerHide
    Answer−1\displaystyle -1

    Steps

    1. Coming from the right, use the x≥1 branch
    2. 1−2\displaystyle 1-2=−1\displaystyle = -1
    3. From the left it is the other branch, giving 3
  6. 06What is the left-hand limit at x=4?f(x)={2x(x<4)x−1(x≥4)\displaystyle f(x)=\begin{cases} 2x & (x<4) \\ x-1 & (x \geq 4) \end{cases}AnswerHide
    Answer8\displaystyle 8

    Steps

    1. Coming from the left, use the x<4 branch
    2. 2⋅4\displaystyle 2 \cdot 4=8\displaystyle = 8

FAQ

Q1If the left-hand and right-hand limits agree, is the function continuous?AnswerHide
A
Not yet. The limit must also equal f(a)f(a). For example, define f(x)=xf(x)=x for x≠1x\ne 1 and f(1)=3f(1)=3. Both one-sided limits at x=1x=1 are 11, but f(1)=3f(1)=3, so ff is not continuous at x=1x=1.
Q2Which piece do I use to compute f(a)f(a)?AnswerHide
A
The piece whose inequality includes the equal sign. If the x≥ax\ge a piece has it, substitute x=ax=a there. Then the right-hand limit equals f(a)f(a), and you only need to check whether the left-hand limit matches.

Published 2026-10-14 · Updated 2026-10-14