Check continuity before differentiability
A graph that jumps
The graph is two lines of slope 2, with a jump of 3 at \(x = 1\). The open ring at \((1, 2)\) is where the left piece ends, and the orange dot at \((1, 5)\) is the value \(f(1)\).
The orange line joins the dot to a second point on the graph. A slope at x = 1 would be the number that the slopes of this line approach as the second point moves toward the dot.
Press "Shrink from the right". The slope is 2 every time, because the line lies along the right piece.
Press "Shrink from the left". The slope is 32 at a distance of 0.1, 302 at 0.01 and 3002 at 0.001. The line must climb the whole jump over a shorter and shorter distance.
These slopes grow without bound, so they approach no number and the graph has no slope at x = 1.
The size of the jump
The red segment at \(x = a\) shows the size \(j\) of the jump. If \(j\) is 0, the two pieces join into one curve.
If \(j\) is not 0, the orange line from the dot to a point on the left piece must also climb the jump. This adds \(j\) divided by the horizontal distance to its slope.
For every \(j\) that is not 0, this amount grows without bound as the distance shrinks, so the slopes from the left approach no number.
Notation
The derivative at \(a\) is the limit of the slopes of the lines from \((a, f(a))\) to nearby points \((x, f(x))\).
\[f'(a) = \lim_{x\to a}\dfrac{f(x)-f(a)}{x-a}\]The change in \(f\) is the slope of one of these lines times the change in \(x\).
\[\begin{aligned} f(x)-f(a) &= \dfrac{f(x)-f(a)}{x-a} \\ &\quad\times (x-a) \end{aligned}\]Suppose that \(f'(a)\) exists. The slope approaches \(f'(a)\) and \(x-a\) approaches 0, so the change in \(f\) approaches 0.
\[\lim_{x\to a}\big(f(x)-f(a)\big) = f'(a)\cdot 0 = 0\]This means that \(f(x)\) approaches \(f(a)\), so \(f\) is continuous at \(a\). If \(f\) is not continuous at \(a\), as at the jump, the change in \(f\) does not approach 0, so \(f'(a)\) does not exist. Check continuity first.
\[\begin{aligned} &\text{not continuous at } a \\ &\quad\Longrightarrow\; f'(a) \text{ does not exist} \end{aligned}\]
When it fails
If the jump is 0, the graph is joined, so \(f\) is continuous at \(a\). The slopes from both sides then approach the slope of the curve.
Continuity alone does not prove that a derivative exists. A joined graph can still have a corner, and the next skill compares the slopes on the two sides.
Example 1: a toll that changes
A toll \(p(w)\) in dollars depends on the weight \(w\) in tons. It is 3 for \(w < 10\) and 5 for \(w \ge 10\). Does \(p'(10)\) exist? Does \(p'(12)\) exist?
Check continuity at 10 first. The left piece approaches 3, but \(p(10) = 5\).
The values differ, so the graph jumps by 2 and \(p\) is not continuous at 10. Then \(p'(10)\) does not exist, even though each piece is flat.
Near 12 the graph is one flat line at height 5, so \(p\) is continuous there and its slope is 0.
\[\cy{p'(12) = 0}\]
Example 2: two parabolas
Let \(g(x) = x^2\) for \(x < 3\) and \(g(x) = x^2 + 2\) for \(x \ge 3\). Is \(g\) differentiable at 3?
A tempting wrong move: Differentiate each piece. The slope is \(2x = 6\) on the left and on the right, so \(g'(3) = 6\).
\[\cr{2\cdot 3 = 6}\]Near \(x = 3\), the red line of slope 6 lies about 2 units above the left piece. The orange lines to the points at \(x = 2.9\) and \(x = 2.99\) have slopes 25.9 and about 206, which do not approach 6.
Check continuity first. The left piece approaches 9, but \(g(3) = 11\), so the graph jumps by 2.
\[\lim_{x\to 3^-} x^2 = 9 \ne 11\]The function \(g\) is not continuous at 3, so \(g'(3)\) does not exist.
\[\cy{g'(3) \text{ does not exist}}\]
Practice
Let \(f(x) = x + 1\) for \(x < 4\) and \(f(x) = x - 2\) for \(x \ge 4\). Is \(f\) differentiable at 4?
Compare \(f(4)\) with the height that the left piece approaches. Equal slopes do not decide the answer.
Solution
The left piece approaches 5, but \(f(4)\) comes from the right piece.
\[\begin{aligned} \lim_{x\to 4^-}(x+1) &= 5 \\ f(4) &= 4-2 = 2 \end{aligned}\]The values differ, so \(f\) is not continuous at 4 and is not differentiable there, although both pieces have slope 1.
\[\cy{f'(4) \text{ does not exist}}\]
Questions
Questions 1 and 2 use the graph from the start of this page. Question 3 needs a calculation.
A student says that \(f'(1) = 2\), because both pieces have slope 2. What is wrong?
- The graph jumps at \(x = 1\), so \(f\) is not continuous there and \(f'(1)\) does not exist.
- The pieces have slope 3, not 2.
- The derivative is the average of the two sides, which is 2.5.
- Nothing is wrong. Both pieces have slope 2.
Answer
The graph jumps at \(x = 1\), so \(f\) is not continuous there and \(f'(1)\) does not exist.
At which inputs does this graph have no derivative?
- Only at \(x = 1\).
- At every input, because the graph is made of two pieces.
- Nowhere, because both pieces have slope 2.
Answer
Only at \(x = 1\).
Let \(f(x) = x^2 + 1\) for \(x < 2\) and \(f(x) = 4x - 2\) for \(x \ge 2\). Is \(f\) differentiable at 2?
- No. The left piece approaches 5, but \(f(2) = 6\).
- Yes. Both pieces have slope 4 at x = 2.
- Yes. The value \(f(2) = 6\) is defined.
- No. The slopes of the two pieces differ.
Answer
No. The left piece approaches 5, but \(f(2) = 6\).
Summary
Before you look for a derivative at a point, you test that the function is continuous there.
A derivative makes the change in f approach 0, but a jump keeps that change away from 0, so the slopes grow without bound.
This test comes first for any piecewise function and any graph with a break.
This is one of five skills in topic 2.4 of Which & Why: AP Calculus.