Skip to content
Family Table Math
Auto

Differentiability and Continuity

A function is differentiable at a point when it has a derivative there, which means its graph has a single, non-vertical tangent line. Most functions you meet are differentiable almost everywhere, but not quite everywhere. This page shows exactly where derivatives break down, and how differentiability connects to continuity.

ff is differentiable at x=ax = a if the limit

f′(a)=lim⁡h→0f(a+h)−f(a)hf'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h}

exists as a finite number. Like any limit, it exists only if the left-hand limit (h→0−h \to 0^-) and the right-hand limit (h→0+h \to 0^+) are equal. These one-sided limits are the slopes from the left and from the right.

A function is differentiable on an interval if it is differentiable at every point of the interval.

Differentiable implies continuous (but not the other way)

Section titled “Differentiable implies continuous (but not the other way)”
  • If ff is differentiable at x=ax = a, then ff is continuous at x=ax = a.
  • The reverse is false: a function can be continuous at a point and still not be differentiable there. The classic example is f(x)=∣x∣f(x) = |x| at x=0x = 0.

Flip the first statement around and you get a useful test: if ff is not continuous at aa, then ff is not differentiable at aa.

TypeWhat the graph looks likeWhat goes wrong
Cornertwo straight-ish pieces meet at an anglethe slopes from the left and right are different numbers
Cuspa sharp pointthe slopes go to +∞+\infty on one side and −∞-\infty on the other
Vertical tangentthe graph is momentarily verticalthe slopes go to +∞+\infty (or −∞-\infty) from both sides
Discontinuitya hole, jump, or asymptotenot continuous, so not differentiable
Three graphs that are continuous but not differentiable at x = 0: y = |x| has a corner, y = cube root of x squared has a cusp, and y = cube root of x has a vertical tangent line (the y-axis). Corner: y = |x| Cusp: y = ∛(x²) Vertical tangent: y = ∛x −1 1 −1 1 2 −1 1 −1 1 2 −1 1 −1 1 2
A corner, a cusp, and a vertical tangent. All three functions are continuous at x=0x = 0, but none is differentiable there.

On a test you usually don’t need the name. You need the reason: ”ff is not differentiable at x=2x = 2 because the slopes from the left and right are not equal” or “because ff is not continuous at x=2x = 2”.

For a piecewise function made of “nice” pieces (like polynomials), check the boundary point x=ax = a in two steps:

  1. Continuity: the two pieces must give the same value at x=ax = a (and that must be f(a)f(a)).
  2. Matching slopes: the derivatives of the two pieces must give the same value at x=ax = a.

If both hold, ff is differentiable at aa. If step 1 fails, stop: ff is not differentiable, no matter what the slopes do.

For step 2 you need derivatives of the pieces. From the definition, ddx(mx+b)=m\dfrac{d}{dx}(mx + b) = m, ddx(x2)=2x\dfrac{d}{dx}\big(x^2\big) = 2x, and ddx(x3)=3x2\dfrac{d}{dx}\big(x^3\big) = 3x^2. The power rule makes these quick.

Show that f(x)=∣x−2∣f(x) = |x - 2| is continuous but not differentiable at x=2x = 2.

Solution. f(2)=0f(2) = 0 and lim⁡x→2∣x−2∣=0\displaystyle\lim_{x \to 2} |x - 2| = 0, so ff is continuous at 22.

The difference quotient at a=2a = 2 is ∣2+h−2∣−0h=∣h∣h\dfrac{|2 + h - 2| - 0}{h} = \dfrac{|h|}{h}.

  • From the right (h>0h \gt 0): ∣h∣h=hh=1\dfrac{|h|}{h} = \dfrac{h}{h} = 1, so the limit is 11.
  • From the left (h<0h \lt 0): ∣h∣h=−hh=−1\dfrac{|h|}{h} = \dfrac{-h}{h} = -1, so the limit is −1-1.

The one-sided limits are different, so f′(2)f'(2) does not exist. The graph has a corner at (2,0)(2, 0).

Use difference quotients at x=0x = 0 to explain the shapes of y=x3y = \sqrt[3]{x} and y=x23y = \sqrt[3]{x^2} in the figure.

Solution. For f(x)=x3=x1/3f(x) = \sqrt[3]{x} = x^{1/3}:

f(h)−f(0)h=h1/3h=1h2/3\frac{f(h) - f(0)}{h} = \frac{h^{1/3}}{h} = \frac{1}{h^{2/3}}

Since h2/3=(h3)2h^{2/3} = \big(\sqrt[3]{h}\big)^2 is positive for h≠0h \ne 0, this goes to +∞+\infty from both sides. The slopes blow up the same way on both sides, so there is a vertical tangent at x=0x = 0.

For g(x)=x23=x2/3g(x) = \sqrt[3]{x^2} = x^{2/3}:

g(h)−g(0)h=h2/3h=1h1/3\frac{g(h) - g(0)}{h} = \frac{h^{2/3}}{h} = \frac{1}{h^{1/3}}

This goes to +∞+\infty as h→0+h \to 0^+ and to −∞-\infty as h→0−h \to 0^-, so there is a cusp at x=0x = 0. Neither function is differentiable at 00.

Example 3: A piecewise function that is differentiable

Section titled “Example 3: A piecewise function that is differentiable”

Is f(x)={x2,x≤12x−1,x>1f(x) = \begin{cases} x^2, & x \le 1 \\ 2x - 1, & x \gt 1 \end{cases} differentiable at x=1x = 1?

Solution.

  1. Continuity: the left piece gives 12=11^2 = 1 and the right piece gives 2(1)−1=12(1) - 1 = 1. They match, and f(1)=1f(1) = 1, so ff is continuous at 11.
  2. Slopes: the left piece has derivative 2x2x, which is 22 at x=1x = 1. The right piece has derivative 22. They match.

So ff is differentiable at x=1x = 1, and f′(1)=2f'(1) = 2. (The line y=2x−1y = 2x - 1 is the tangent line to y=x2y = x^2 at x=1x = 1, so the pieces join smoothly.)

Find aa and bb so that f(x)={ax2+1,x≤2bx−3,x>2f(x) = \begin{cases} ax^2 + 1, & x \le 2 \\ bx - 3, & x \gt 2 \end{cases} is differentiable at x=2x = 2.

Solution. Differentiable means continuous and matching slopes, so you get two equations.

Continuity at x=2x = 2: 4a+1=2b−34a + 1 = 2b - 3.

Slopes at x=2x = 2: the derivatives are 2ax2ax and bb, so 4a=b4a = b.

Substitute b=4ab = 4a into the first equation:

4a+1=8a−3⇒4=4a⇒a=1,b=44a + 1 = 8a - 3 \quad\Rightarrow\quad 4 = 4a \quad\Rightarrow\quad a = 1, \quad b = 4

Check: both pieces give 55 at x=2x = 2, and both slopes are 44.

Thinking continuous means differentiable. It doesn’t. ∣x∣|x| is continuous everywhere but has no derivative at 00. The true statement only goes one way: differentiable implies continuous.

Checking only that the slopes match. If the pieces don’t meet, the function isn’t continuous, so it can’t be differentiable, even if the slopes of the pieces happen to agree. Always check continuity first.

Calling a vertical tangent “differentiable”. The graph does have a tangent line, but it’s vertical, so its slope (the derivative) is undefined.

Trusting the calculator at a sharp point. A graphing calculator’s numerical derivative uses a symmetric difference quotient, so it reports 00 for the “derivative” of ∣x∣|x| at x=0x = 0. The real derivative doesn’t exist. On calculator questions (such as AP calculator-active parts), think about whether the function is differentiable before trusting the number.

Giving a name instead of a reason. “It’s a corner” earns less than “the left-hand and right-hand slopes are −1-1 and 11, which are not equal, so f′(2)f'(2) does not exist.”

1. (Warm-up) True or false? Explain.

  • (a) If ff is differentiable at x=3x = 3, then ff is continuous at x=3x = 3.
  • (b) If ff is continuous at x=3x = 3, then ff is differentiable at x=3x = 3.
  • (c) If ff is not continuous at x=3x = 3, then ff is not differentiable at x=3x = 3.
Solution

(a) True. Differentiability implies continuity.

(b) False. For example, f(x)=∣x−3∣f(x) = |x - 3| is continuous at 33 but has a corner there.

(c) True. This is the flipped (contrapositive) form of (a).

2. (Warm-up) Where is f(x)=∣x+4∣f(x) = |x + 4| not differentiable? What does the graph look like there?

Solution

At x=−4x = -4. The graph is a V shape with a corner at (−4,0)(-4, 0): the slope is −1-1 to the left and 11 to the right.

3. (Warm-up) Explain why f(x)=x2−4x−2f(x) = \dfrac{x^2 - 4}{x - 2} is not differentiable at x=2x = 2.

Solution

f(2)f(2) is undefined (division by zero), so ff is not continuous at x=2x = 2. A function that isn’t continuous at a point can’t be differentiable there. (The graph is the line y=x+2y = x + 2 with a hole at (2,4)(2, 4).)

4. (Core) Is f(x)={x2+1,x<0x+1,x≥0f(x) = \begin{cases} x^2 + 1, & x \lt 0 \\ x + 1, & x \ge 0 \end{cases} differentiable at x=0x = 0? Justify.

Solution

Continuity: the left piece gives 0+1=10 + 1 = 1 and the right piece gives 0+1=10 + 1 = 1, and f(0)=1f(0) = 1. Continuous.

Slopes: the left piece has derivative 2x2x, which is 00 at x=0x = 0. The right piece has derivative 11. Since 0≠10 \ne 1, ff is not differentiable at x=0x = 0 (there’s a corner).

5. (Core) Is f(x)={x3,x≤13x−2,x>1f(x) = \begin{cases} x^3, & x \le 1 \\ 3x - 2, & x \gt 1 \end{cases} differentiable at x=1x = 1? If so, find f′(1)f'(1).

Solution

Continuity: 13=11^3 = 1 and 3(1)−2=13(1) - 2 = 1, and f(1)=1f(1) = 1. Continuous.

Slopes: 3x23x^2 gives 33 at x=1x = 1, and the line has slope 33. They match.

So ff is differentiable at x=1x = 1 and f′(1)=3f'(1) = 3.

6. (Core) Let f(x)={x2,x≤24x−3,x>2f(x) = \begin{cases} x^2, & x \le 2 \\ 4x - 3, & x \gt 2 \end{cases}. A student says: “The slopes are 2(2)=42(2) = 4 and 44, so ff is differentiable at x=2x = 2.” Is the student right?

Solution

No. Check continuity first: the left piece gives 44 but the right piece gives 4(2)−3=54(2) - 3 = 5. The graph jumps, so ff is not continuous at x=2x = 2, and therefore not differentiable there. Matching slopes aren’t enough.

7. (Core) Use the definition of the derivative to show that g(x)=x∣x∣g(x) = x|x| is differentiable at x=0x = 0, and find g′(0)g'(0).

Solutiong′(0)=lim⁡h→0h∣h∣−0h=lim⁡h→0∣h∣=0g'(0) = \lim_{h \to 0} \frac{h|h| - 0}{h} = \lim_{h \to 0} |h| = 0

The limit exists (it is 00 from both sides), so gg is differentiable at 00 and g′(0)=0g'(0) = 0.

8. (Challenge) Find aa and bb so that f(x)={ax2+bx+1,x≤15x−2,x>1f(x) = \begin{cases} ax^2 + bx + 1, & x \le 1 \\ 5x - 2, & x \gt 1 \end{cases} is differentiable everywhere.

Solution

Each piece is a polynomial, so only x=1x = 1 needs checking.

Continuity: a+b+1=5−2=3a + b + 1 = 5 - 2 = 3, so a+b=2a + b = 2.

Slopes: the derivatives are 2ax+b2ax + b and 55, so 2a+b=52a + b = 5.

Subtract the first equation from the second: a=3a = 3. Then b=−1b = -1.

Check: 3−1+1=33 - 1 + 1 = 3 and 5−2=35 - 2 = 3; slopes 2(3)−1=52(3) - 1 = 5 and 55.

9. (Challenge) Where is f(x)=∣x2−4∣f(x) = |x^2 - 4| not differentiable? Justify using one-sided slopes at one of those points.

Solution

x2−4x^2 - 4 changes sign at x=±2x = \pm 2, so those are the only candidates. Away from them, ff is either x2−4x^2 - 4 or 4−x24 - x^2, which are polynomials (so differentiable).

At x=2x = 2: to the right, f(x)=x2−4f(x) = x^2 - 4 with slope 2x→42x \to 4. To the left (between −2-2 and 22), f(x)=4−x2f(x) = 4 - x^2 with slope −2x→−4-2x \to -4. The one-sided slopes 44 and −4-4 are not equal, so ff is not differentiable at x=2x = 2. By symmetry, the same happens at x=−2x = -2: the slope from the left is 2(−2)=−42(-2) = -4 and from the right is −2(−2)=4-2(-2) = 4.

So ff is not differentiable at x=−2x = -2 and x=2x = 2. It is continuous at both, so these are corners.