When differentiability fails
A function \(f\) is differentiable at an input \(a\) if its derivative there,
exists, which means that the limit is a number (topic 2.1). The quotient is the slope of the secant line through the points of the graph at \(a\) and \(a+h\). The limit is two-sided, so \(f\) must be defined on an open interval around \(a\). The secant slopes from both sides must approach one number.
This topic shows that a break, or discontinuity, rules out a derivative. It then finds two more ways for the limit to fail.
A derivative needs continuity
A rising curve, the left piece, ends at an orange point P above the input a. A straight line, the right piece, starts at an open ring above P, and a red segment marks the gap between them. Chalk secant lines run from P to points of the graph on both sides of a. One button closes the gap, which leaves a corner at P with two red half-lines. Another gives the line the slope of the curve at P, and where the pieces meet with that slope, one orange tangent line runs through P.
In Figure 1, the left piece of the graph of \(f\) follows a formula \(g\) for \(x\le a\) and ends at the orange point \(\cy{P}=\big(a,f(a)\big)\). The right piece follows a formula \(k\) for \(x>a\) and starts at the open ring. The graph jumps at \(a\), and the red segment marks the gap.
The other chalk lines are the secants from \(\cy{P}\) to the points of the graph at \(a-h\) and \(a+h\), for a step \(h>0\). The numbers under the figure give their slopes.
Shrink \(h\). The slope from the left approaches the slope of the left piece at \(\cy{P}\). On the right, the rise of the secant approaches the size of the gap while its run \(h\) shrinks. Its slope therefore grows without bound, and \(f'(a)\) does not exist.
No function has a derivative at a break. To see why, suppose that \(f'(a)\) exists. For \(h\neq 0\), the change in \(f\) is the quotient times \(h\):
As \(h\) approaches 0, the quotient approaches \(f'(a)\), so by the product law for limits (topic 1.5), the change approaches \(f'(a)\cdot 0=0\). Then \(f(a+h)\), which is \(f(a)\) plus the change, approaches \(f(a)\), so \(\lim_{x\to a}f(x)=f(a)\) and \(f\) is continuous at \(a\).
This result is the theorem that differentiability implies continuity: if \(f\) is differentiable at \(a\), then \(f\) is continuous at \(a\). Its contrapositive swaps the two parts and negates both: if \(f\) is not continuous at \(a\), then \(f\) is not differentiable at \(a\). It is true, because a derivative at \(a\) would make \(f\) continuous there.
Before you look for a derivative at a point, check continuity there. A jump or a hole at \(a\) rules out \(f'(a)\), even if the formulas on its two sides have the same slope.
The converse of the theorem swaps its two parts: if \(f\) is continuous at \(a\), then \(f\) is differentiable at \(a\). It is false. A counterexample, a case where the “if” part holds and the “then” part fails, is \(|x|\) at 0. Its graph has no break at 0, but its quotient there, \(\frac{|h|}{h}\), is 1 for \(h>0\) and \(-1\) for \(h<0\), so it has no limit. One counterexample shows that a statement is false.
Corners and joins
Use the button under Figure 1 to close the gap. The right piece then starts at \(\cy{P}\), so \(f\) is continuous at \(a\), but the graph turns sharply there. The red half-lines at \(\cy{P}\) show the slope of each piece. Move \(h\) with the slider. As \(h\) shrinks, the two slopes under the figure approach different numbers.
The limits of the quotient for \(h<0\) and for \(h>0\), when they exist, are the one-sided derivatives of \(f\) at \(a\) (topic 2.2). Many books call them the left-hand and right-hand derivatives:
A two-sided limit exists when both one-sided limits exist and are equal, and only then (topic 1.2). Therefore \(f'(a)\) exists when \(f'_-(a)\) and \(f'_+(a)\) are numbers and are equal, and only then. If \(f\) is continuous at \(a\) and they are different numbers, the graph has a corner at \(a\).
An input where the formula of a function changes is a join, such as \(a\) in Figure 1. Suppose that \(f\) is \(g\) for \(x\le a\) and \(k\) for \(x>a\), where \(g\) and \(k\) are differentiable at \(a\). For \(h<0\), both \(a+h\) and \(a\) use \(g\), so \(f'_-(a)=g'(a)\).
For \(h>0\), the quotient is \(\frac{k(a+h)-g(a)}{h}\). If the pieces meet, so that \(k(a)=g(a)\), it is the quotient of \(k\), and \(f'_+(a)=k'(a)\). If they do not meet, its numerator approaches \(k(a)-g(a)\neq 0\), because the theorem makes \(k\) continuous at \(a\). The quotient then grows without bound in size (topic 1.14), as in the gap of Figure 1.
Therefore \(f\) is differentiable at \(a\) when the pieces meet with the same slope, and only then: \(g(a)=k(a)\) and \(g'(a)=k'(a)\). The same argument works when \(k\) covers \(a\) instead. Use the button under Figure 1 to match the slopes. The red half-lines join into one orange line, the tangent at \(\cy{P}\).
To make a join differentiable, solve these two equations. Find each slope from the definition of the derivative (topic 2.2).
Vertical tangents and cusps
The graph of the cube root of x from x = −2 to 2, with the inputs −2, −1, 1 and 2 numbered. It climbs steeply through an orange point at the origin, where an orange vertical line stands. The chalk secant lines from the origin to the points of the graph at −h and h lie on one line, which turns toward the vertical line as h shrinks. A button flips the left part of the graph over the x-axis, so that both parts rise from the origin and meet there in a cusp.
Figure 2 shows the graph of \(y=\sqrt[3]{x}\), which has no break and no corner at 0, and the secants from the orange point \((0,0)\). For \(h\neq 0\), the slope of the secant to the point at \(h\) is
The square \(\big(\sqrt[3]{h}\big)^2\) is positive for both signs of \(h\) and approaches 0. The slope is therefore positive and grows without bound from both sides (topic 1.14). The graph is symmetric about \((0,0)\), so the two secants lie on one line. Shrink \(h\), and the line turns toward the orange vertical line. At \(h=0.001\), both slopes are 100.
The limit of the quotient is \(\infty\), which is not a number, so the cube root is not differentiable at 0. Its graph has a vertical tangent there, the orange line. In general, a function continuous at \(a\) has a vertical tangent there if its quotient approaches \(\infty\) from both sides, or \(-\infty\) from both sides.
Use the button under Figure 2 to flip the left part of the graph over the \(x\)-axis. The graph becomes the graph of \(\sqrt[3]{|x|}\), both of its parts rise from the orange point, and the orange line fades. The slope from the left now falls without bound, so the one-sided limits are \(-\infty\) and \(\infty\), and \(\sqrt[3]{|x|}\) is not differentiable at 0.
A function continuous at \(a\) has a cusp there if the one-sided limits of its quotient are \(\infty\) and \(-\infty\), in either order. Some books also count a cusp as a vertical tangent.
Example 1
Check continuity before differentiability
Let \(p(x)=\dfrac{x^2-4}{x-2}\) for \(x\neq 2\), and let \(p(2)=7\). Is \(p\) continuous at \(x=2\)? Is \(p\) differentiable at \(x=2\)?
Solution
Check continuity first. For \(x\neq 2\), the numerator factors as \((x-2)(x+2)\), and the factor \(x-2\) cancels (topic 1.6):
The limit is 4, but \(p(2)=7\), so \(p\) is not continuous at 2. A derivative at 2 would make \(p\) continuous there, so \(p\) is not differentiable at 2.
As a check, \(p(2+h)=4+h\) for \(h\neq 0\), so the quotient at 2 is
As \(h\) approaches 0, the size of \(\frac{3}{h}\) grows without bound, so the quotient has no limit.
Example 2
Compare one-sided slopes
Let \(q(x)=\left|x^2-1\right|\). Find the one-sided derivatives of \(q\) at \(x=1\). Is \(q\) differentiable at \(x=1\)?
Solution
As \(x\) approaches 1, \(x^2-1\) approaches 0, and so does its absolute value \(q(x)\) (topic 1.8). The limit of \(q\) at 1 is therefore \(0=q(1)\), so \(q\) is continuous at 1.
For \(h\neq 0\), \((1+h)^2-1=h(2+h)\). For \(h\) close to 0, \(2+h\) is positive, so \(q(1+h)=|h|\,(2+h)\) and
For \(h>0\), \(|h|=h\), so the quotient is \(2+h\). For \(h<0\), \(|h|=-h\), so it is \(-(2+h)\). Their limits are the one-sided derivatives:
They are different numbers, so \(q\) is not differentiable at 1, and its graph has a corner at \((1,0)\).
Example 3
Recognize an unbounded slope
Let \(r(x)=\sqrt[3]{(x-2)^2}\). Show that \(r\) is continuous at \(x=2\) but not differentiable at \(x=2\). Does the graph of \(r\) have a corner, a cusp or a vertical tangent at \(x=2\)?
Solution
As \(x\) approaches 2, \((x-2)^2\) approaches 0, and the limit passes through the cube root, which is continuous at 0 (topics 1.5 and 1.12). The limit of \(r\) at 2 is therefore \(0=r(2)\), so \(r\) is continuous at 2.
For \(h\neq 0\), \(r(2+h)=\big(\sqrt[3]{h}\big)^2\) and \(h=\big(\sqrt[3]{h}\big)^3\), so
The cube root \(\sqrt[3]{h}\) has the sign of \(h\) and approaches 0. The quotient therefore approaches \(\infty\) as \(h\to 0^+\) and \(-\infty\) as \(h\to 0^-\) (topic 1.14). Neither limit is a number, so \(r\) is not differentiable at 2, and the graph has a cusp at \((2,0)\).
Example 4
Make a piecewise join differentiable
Let \(s(x)=\begin{cases}cx^2+5, & x\le 1\\ mx+2, & x>1\end{cases}\), where \(c\) and \(m\) are constants. Find the values of \(c\) and \(m\) for which \(s\) is differentiable at \(x=1\).
Solution
Both formulas are differentiable at 1, so \(s\) is differentiable at 1 when the pieces meet there with the same slope, and only then. The line \(mx+2\) has slope \(m\), and the slope of \(cx^2+5\) at 1 is the limit of its quotient:
The left piece covers 1, so \(s(1)=c+5\), and the right piece approaches \(m+2\) at 1. The two conditions are
Substitute \(m=2c\) into the first equation. Then \(c+5=2c+2\), so
Both pieces then pass through \((1,8)\) with slope 6, and the line is the tangent of the parabola there.
Example 5
Use the correct logical implication
Let \(f\) be defined on an open interval around \(x=3\). Which of these statements must be true? Give a counterexample for each one that is false. (a) If \(f\) is differentiable at 3, then \(f\) is continuous at 3. (b) If \(f\) is continuous at 3, then \(f\) is differentiable at 3. (c) If \(f\) is not continuous at 3, then \(f\) is not differentiable at 3. (d) If \(f\) is not differentiable at 3, then \(f\) is not continuous at 3.
Solution
Statement (a) is the theorem that differentiability implies continuity, and (c) is its contrapositive, so both must be true.
Statement (b) is the converse, and \(f(x)=|x-3|\) is a counterexample. It is continuous at 3, but its quotient at 3 is \(\frac{|h|}{h}\), as for \(|x|\) at 0, and this quotient has no limit.
Statement (d) swaps and negates the two parts of the converse, and some books call it the inverse of the theorem. The same function is a counterexample, because it is not differentiable at 3 but is continuous there. Only (a) and (c) must be true.
Each example is one of the five skills of topic 2.4 in Which & Why: AP Calculus.