When Is a Function Differentiable?
Textbook Reference
| Primary source | OpenStax Calculus Volume 1, Section 3.2: “The Derivative as a Function” |
| Book URL | https://openstax.org/details/books/calculus-volume-1 |
Freely available and openly licensed.
Key idea
The derivative $f'(a)$ is a limit. Like every limit, it may fail to exist. When it fails, we say $f$ is not differentiable at $a$. This happens in three geometric ways: a corner (the graph has a sharp bend), a cusp (the tangent becomes vertical but approaches from both sides), or a vertical tangent (the slope is infinite). In each case, the difference quotient does not approach a finite limit.
Understanding when differentiability fails is as important as knowing when it holds, because non-differentiable points are where functions’ geometric behavior is most interesting -- and where naive application of rules produces wrong answers.
Prerequisite Check
Before this lesson, make sure you can do all of the following:
Quick Reference
Differentiability at $a$. $f$ is differentiable at $a$ if $\lim_{h \to 0} \dfrac{f(a+h)-f(a)}{h}$ exists as a finite number.
Three failure modes:
| Failure | Geometric picture | Example |
|---|---|---|
| Corner | Graph bends sharply; left and right tangent slopes differ | $|x|$ at $x = 0$ |
| Cusp | Graph comes to a sharp point; one or both one-sided slopes are $\pm\infty$ | $x^{2/3}$ at $x = 0$ |
| Vertical tangent | Graph rises or falls vertically; slope is $\pm\infty$ | $\sqrt[3]{x}$ at $x = 0$ |
Key Concepts
1. Corners: Left and Right Slopes Disagree
A corner occurs when the left-hand derivative and the right-hand derivative both exist as finite numbers but are different. The graph has a sharp bend.
Left-hand derivative: $f'_-(a) = \lim_{h \to 0^-} \dfrac{f(a+h)-f(a)}{h}$.
Right-hand derivative: $f'_+(a) = \lim_{h \to 0^+} \dfrac{f(a+h)-f(a)}{h}$.
$f$ is differentiable at $a$ if and only if $f'_-(a) = f'_+(a)$ (both finite and equal).
Example 1. Show that $f(x) = |x|$ is not differentiable at $x = 0$.
For $h > 0$: $\dfrac{|h| - 0}{h} = \dfrac{h}{h} = 1$. Right-hand derivative $= 1$.
For $h < 0$: $\dfrac{|h| - 0}{h} = \dfrac{-h}{h} = -1$. Left-hand derivative $= -1$.
Since $1 \neq -1$, $f$ is not differentiable at $0$. The graph has a corner at the origin.
Example 2. Let $g(x) = \begin{cases} x^2 & x \leq 1 \\ 2x - 1 & x > 1 \end{cases}$.
Is $g$ differentiable at $x = 1$?
First check: is $g$ continuous at $x = 1$? $\lim_{x \to 1^-} g = 1$ and $\lim_{x \to 1^+} g = 1$ and $g(1) = 1$. Continuous.
Now check derivatives:
Left-hand derivative: $\lim_{h \to 0^-} \dfrac{(1+h)^2 - 1}{h} = \lim_{h \to 0^-}(2 + h) = 2$.
Right-hand derivative: $\lim_{h \to 0^+} \dfrac{2(1+h)-1-1}{h} = \lim_{h \to 0^+} \dfrac{2h}{h} = 2$.
Both equal 2. $g$ is differentiable at $x = 1$, $g'(1) = 2$. (No corner; the two pieces meet smoothly.)
2. Cusps and Vertical Tangents
A cusp occurs when the difference quotient approaches $+\infty$ from one side and $-\infty$ from the other. The graph has a spike-like sharp point.
A vertical tangent occurs when the difference quotient approaches $\pm\infty$ from both sides (with the same sign). The graph has a smooth but vertical tangent direction.
Example 3. $f(x) = x^{2/3}$ at $x = 0$ (cusp).
$\dfrac{(0+h)^{2/3} - 0}{h} = \dfrac{h^{2/3}}{h} = h^{-1/3} = \dfrac{1}{h^{1/3}}$.
For $h \to 0^+$: $h^{1/3} \to 0^+$, so $\dfrac{1}{h^{1/3}} \to +\infty$.
For $h \to 0^-$: $h^{1/3} \to 0^-$ (cube root of a negative number is negative), so $\dfrac{1}{h^{1/3}} \to -\infty$.
Cusp: slopes approach $+\infty$ from the right and $-\infty$ from the left. Not differentiable at 0.
Example 4. $f(x) = \sqrt[3]{x} = x^{1/3}$ at $x = 0$ (vertical tangent).
$\dfrac{(0+h)^{1/3} - 0}{h} = h^{1/3 - 1} = h^{-2/3} = \dfrac{1}{h^{2/3}} > 0$ for all $h \neq 0$.
As $h \to 0$ (from either side): $h^{2/3} \to 0^+$, so $\dfrac{1}{h^{2/3}} \to +\infty$.
Both one-sided limits are $+\infty$: vertical tangent. Not differentiable at 0. (The graph is smooth but the tangent line is vertical.)
3. Discontinuities Imply Non-Differentiability
If $f$ is not continuous at $a$, then $f$ cannot be differentiable at $a$ (see Differentiability Implies Continuity). So discontinuities -- jumps, holes, vertical asymptotes -- are immediate non-differentiability.
However, continuity alone does not guarantee differentiability. $|x|$ is continuous at 0 (no gap or jump) but is not differentiable there (corner).
4. Checking Differentiability at Piecewise Boundaries
For a piecewise function, the key steps at boundary point $x = a$:
- Verify continuity: check that the two one-sided limits of $f$ equal each other and equal $f(a)$.
- Compute the left-hand and right-hand derivatives.
- If both are finite and equal, $f$ is differentiable at $a$.
Common Errors
| Error | Example | Correction |
|---|---|---|
| Checking only continuity | Concluding $|x|$ is differentiable at 0 because it is continuous | Continuity is necessary but not sufficient; check the derivative limit |
| Forgetting to check the left side | Finding only the right-hand derivative and concluding it is the derivative | Both one-sided limits must agree for differentiability |
| Confusing cusp with corner | Calling $x^{2/3}$’s behavior at 0 a “corner” | A cusp has one-sided slopes of opposite infinite sign; a corner has different finite slopes |
Leveled Practice
Level 1 -- Checking Differentiability
Problem 1. Is $f(x) = |x - 2|$ differentiable at $x = 2$? Justify using the definition.
Show answer
$\dfrac{f(2+h)-f(2)}{h} = \dfrac{|h|}{h}$.
Right: $+1$. Left: $-1$. Not equal. Not differentiable at $x = 2$.
Problem 2. Let $g(x) = \begin{cases} 2x & x \leq 0 \\ x^2 & x > 0 \end{cases}$. Is $g$ differentiable at $x = 0$?
Show answer
Continuity: $g(0) = 0$; left limit $= 0$; right limit $= 0$. Continuous.
Left derivative: $\lim_{h \to 0^-}\dfrac{2h}{h} = 2$.
Right derivative: $\lim_{h \to 0^+}\dfrac{h^2}{h} = \lim_{h \to 0^+} h = 0$.
$2 \neq 0$. Not differentiable at $x = 0$ (corner).
Level 2 -- Matching Conditions
Problem 3. Find a value of $c$ such that $h(x) = \begin{cases} cx^2 & x \leq 1 \\ 4x - 3 & x > 1 \end{cases}$ is differentiable at $x = 1$.
Show answer
Continuity requires $c = 4(1) - 3 = 1$, so $c = 1$.
Check: with $c = 1$: left derivative $= \lim_{h \to 0^-}\dfrac{(1+h)^2-1}{h} = 2$. Right derivative $= \lim_{h \to 0^+}\dfrac{4h}{h} = 4$.
$2 \neq 4$. So continuity alone ($c = 1$) does not give differentiability.
For differentiability: left derivative must equal right derivative. Left derivative $= 2c(1) = 2c$. Right derivative $= 4$.
$2c = 4 \Rightarrow c = 2$.
Check continuity with $c = 2$: $h(1) = 2$; right limit $= 4(1)-3 = 1 \neq 2$. Not continuous.
No single value of $c$ makes $h$ both continuous and differentiable at $x = 1$. (The two pieces cannot be made to match in both value and slope with only one free parameter.)
Problem 4. Find constants $a$ and $b$ so that $f(x) = \begin{cases} ax^2 + b & x \leq 2 \\ 4x + 1 & x > 2 \end{cases}$ is differentiable at $x = 2$.
Show answer
Continuity: $4a + b = 4(2) + 1 = 9$, so $4a + b = 9$.
Left derivative: $2ax$, so left derivative at $x = 2$ is $4a$.
Right derivative: $4$.
$4a = 4 \Rightarrow a = 1$. Then $b = 9 - 4 = 5$.
Check: $f(x) = x^2 + 5$ for $x \leq 2$. $f(2) = 9$; right limit $= 9$. Continuous. Both slopes $= 4$. Differentiable. $\checkmark$
Level 3 -- Analysis
Problem 5. Determine all points where $f(x) = |x^2 - 4|$ is not differentiable.
Show answer
$f(x) = |x^2 - 4| = |(x-2)(x+2)|$.
$f$ is not differentiable where $x^2 - 4 = 0$ and the graph has a corner, i.e., at $x = \pm 2$.
At $x = 2$: $f(x) = x^2 - 4$ for $x$ near 2 with $x > 2$ (where $x^2 - 4 > 0$) and $f(x) = -(x^2-4) = 4-x^2$ for $x$ near 2 with $x < 2$.
Left derivative at 2: $\dfrac{d}{dx}(4 - x^2)\big|_{x=2} = -2x|_{x=2} = -4$.
Right derivative at 2: $\dfrac{d}{dx}(x^2-4)\big|_{x=2} = 2x|_{x=2} = 4$.
$-4 \neq 4$: corner at $x = 2$. Similarly, corner at $x = -2$.
$f$ is not differentiable at $x = 2$ and $x = -2$.
Common Misconceptions
continuity implies differentiability. Differentiability implies continuity (a differentiable function must be continuous), but the converse fails. The function $f(x) = |x|$ is continuous everywhere, including at $x = 0$, yet it is not differentiable at $x = 0$ because the left derivative is $-1$ and the right derivative is $+1$. Continuity is a necessary but not sufficient condition for differentiability.
a sharp corner means the function is discontinuous. A corner (like the tip of $|x|$ at $x = 0$) is a point where the function is continuous but not differentiable. The function has a definite value and no jump; the one-sided derivatives simply disagree. Discontinuity, differentiability, and sharp corners are three separate concepts, and a function can have any combination of these features at a given point.
Mastery Checklist
You have mastered this skill when you can do all of the following without referring to notes:
Mental Model
Differentiability means “the graph has a well-defined, non-vertical direction at the point.” If you zoom in close enough at a differentiable point, the curve looks like a straight line. At a corner or cusp, no matter how close you zoom, the bend or spike never disappears. At a vertical tangent, the direction exists but is vertical -- not a finite slope.
The derivative is the slope of the tangent. If no unique, finite-slope tangent line exists at $a$, the derivative does not exist there. The three failure modes correspond to three reasons a unique finite-slope tangent may fail: directions disagree (corner), one direction is infinite (cusp), or both directions are infinite (vertical tangent).
Connections
Within Calculus I (MATH161)
- Differentiability implies continuity: Every differentiable function is continuous, but the converse fails (as $|x|$ shows). This is covered in the next lesson.
- The Mean Value Theorem and Rolle’s Theorem: These key theorems in Chapter 3 require differentiability on an open interval. Understanding when differentiability fails helps you identify when these theorems apply.
- Optimization: Corners are locations where the derivative does not exist but the function may still have a local maximum or minimum. These “critical points” from non-differentiability must be included in optimization analysis.
Back to Calculus I Skills | Previous: The Derivative Function | Next: Differentiability and Continuity