Derivative as a limit
The derivative \(\cy{f'(a)}\) of a function \(f\) at a number \(a\) is the limit of the difference quotient \(\frac{f(a+h)-f(a)}{h}\) as \(h\) approaches 0 (topic 2.1). When this limit exists, it is the slope of the tangent at \(\big(a,f(a)\big)\). This topic lets the input vary, so that the derivative becomes a function. It writes the limit in a second form, recognizes a derivative inside a limit, evaluates the limit by algebra and tests whether it exists.
The derivative as a function
Two graphs, one above the other. The upper graph shows a function f that rises to a high point, falls to a low point and rises again. An orange point at the input x, which can be dragged, carries an orange tangent line, with its slope printed beside it, and the letter x stands under it on the axis. The lower graph shows the derivative f prime: above its axis where f rises, below it where f falls, and crossing it under the high point and the low point. An orange bar reaches from its axis to the height f prime of x, which is printed at the foot of the bar and equals the slope of the tangent. A button sharpens the low point of f into a corner, and the graph of f prime then breaks there into two pieces that end at open rings. With the point on the corner, two red half-lines with different slopes replace the tangent, and the bar disappears.
In the limit that defines \(f'(a)\), replace the number \(a\) by a variable input \(x\). For each \(x\) at which the limit \(\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\) exists, the limit is one number, \(\cy{f'(x)}\). These numbers form a new function \(f'\), the derivative of \(f\). While \(h\) approaches 0, \(x\) stays fixed. The domain of \(f'\) is the set of inputs at which the limit exists. It can be smaller than the domain of \(f\), because the limit can fail to exist at an input where \(f\) is defined.
In Figure 1, the upper graph is \(f\), which rises to a high point, falls to a low point and rises again. The lower graph is \(f'\). At the input \(x\), the orange tangent touches \(f\), and the orange bar reaches from the axis of the lower graph to the height \(\cy{f'(x)}\). Move \(x\) with the slider or by dragging the orange point. The slope printed beside the tangent equals the number printed at the foot of the bar, because both are \(f'(x)\).
Where the lower graph is above its axis, \(f'(x)>0\), so \(f\) is increasing at \(x\) (topic 2.1), and the upper graph rises. In the same way, where the lower graph is below its axis, \(f'(x)<0\) and the upper graph falls. At the high point and at the low point, the tangent is horizontal, so \(f'\) is 0 there and its graph crosses the axis.
For \(y=f(x)\), the derivative is also written \(y'\), \(\frac{dy}{dx}\) or \(\frac{d}{dx}f(x)\). The last two are Leibniz notation, and \(\frac{dy}{dx}\) is read “d y d x”. The value at \(a\) is \(f'(a)\), also written \(\left.\frac{dy}{dx}\right|_{x=a}\). A function is differentiable at \(a\) if \(f'(a)\) exists.
Reading and evaluating the limit
The derivative at a number \(a\) has a second form, which many books call the alternative form. Write the second input of the quotient, \(a+h\), as \(x\). Then the step is \(h=x-a\), so \(x\) approaches \(a\) exactly when \(h\) approaches 0, and \(x\neq a\) exactly when \(h\neq 0\). For each \(h\neq 0\), the quotients \(\frac{f(a+h)-f(a)}{h}\) and \(\frac{f(x)-f(a)}{x-a}\) are equal, so they have the same limit, \(f'(a)\). In this form, \(x\) does not stay fixed: it approaches \(a\).
A limit of either form, when it exists, is a derivative, and reading it means naming the function and the number. The number \(a\) is the one that the step is added to, or that \(x\) approaches. The function \(f\) is the one that the numerator applies to the second input, and the constant that the numerator subtracts must be \(f(a)\). Otherwise the quotient is not the one that defines \(f'(a)\). Since \(8=2^3\), the limit \(\lim_{x\to 2}\frac{x^3-8}{x-2}\) is the derivative of \(x^3\) at 2. The reading is not unique: \(\lim_{h\to 0}\frac{(2+h)^3-8}{h}\) is the same derivative, and also the derivative of \((2+x)^3\) at 0.
If the numerator is \(f(a+kh)-f(a)\) for a number \(k\neq 0\), but the denominator is \(h\), write the quotient as \(k\) times a quotient over \(kh\):
When \(f'(a)\) exists, the second quotient approaches it, because the step \(kh\) approaches 0 without being 0 as \(h\) approaches 0. By the limit laws, the limit is then \(k\,f'(a)\). On the graph, the run from \(a\) to \(a+kh\) is \(kh\), so dividing the rise by \(h\) gives \(k\) times the slope of the secant.
To evaluate the limit from a formula, do not substitute \(h=0\), because the quotient divides by \(h\). Simplify the quotient while \(h\neq 0\) until a factor \(h\) cancels from its numerator and denominator (topic 1.6). Then use the limit laws (topic 1.5). Usual steps are to expand a power, combine fractions over a common denominator, or multiply by the conjugate of a difference of roots. For \(r(x)=\frac1x\), with \(x\neq 0\), \(h\neq 0\) and \(x+h\neq 0\),
The numerator \(x-(x+h)\) is \(-h\), and the factor \(h\) cancels because \(h\neq 0\). As \(h\) approaches 0, \(x(x+h)\) approaches \(x^2\), which is not 0, so by the limit laws \(r'(x)=-\frac{1}{x^2}\) for every \(x\neq 0\). Here \(r'\) has the same domain as \(r\). At an end of the domain of a function, as at 0 for \(\sqrt{x}\), the function is defined on one side only. The two-sided limit does not exist there, and neither does the derivative.
When the limit does not exist
The limit as \(h\) approaches 0 is two-sided. It exists exactly when the quotient's one-sided limits as \(h\to 0^-\) and as \(h\to 0^+\) exist and are equal (topic 1.2). Its value is then their common value. These one-sided limits are the left-hand derivative \(f'_-(a)\) and the right-hand derivative \(f'_+(a)\), together called the one-sided derivatives.
For most formulas, \(f(a+h)\) has one expression for both signs of \(h\), so one limit covers both sides. Sometimes the formula for \(f\) changes at \(a\), as at the join of a piecewise function, or at 2 for \(|x-2|\). Then \(f(a+h)\) has one formula for \(h<0\) and another for \(h>0\), so find each one-sided limit with its own formula. A one-sided limit that is \(\infty\) or \(-\infty\) is not a number, so then \(f'(a)\) does not exist.
Use the button under Figure 1 to make the low point of \(f\) a sharp corner. Then move \(x\) onto the corner. The tangent splits into two red half-lines, because the quotients for \(h<0\) and for \(h>0\) approach different slopes. The derivative does not exist at the corner, so the orange bar disappears. The graph of \(f'\) breaks there, and its two pieces end at open rings, at the heights of the two slopes. The input of the corner is in the domain of \(f\) but not in the domain of \(f'\).
Example 1
Build a derivative limit
Let \(g(x)=x^3+x\). Write the limit that defines \(g'(x)\). Then write \(g'(2)\) as a limit in the alternative form. Do not evaluate the limits.
Solution
The polynomial \(g\) is defined for every \(x\). For \(g'(x)\), the second input is \(x+h\). Replace every \(x\) in the formula by \(x+h\), in parentheses, to find \(g(x+h)=(x+h)^3+(x+h)\). The quotient subtracts \(g(x)\) and divides by the step \(h\), and its limit as \(h\) approaches 0, with \(x\) fixed, is \(g'(x)\):
For \(g'(2)\), the number is \(a=2\), and the constant to subtract is \(g(2)=8+2=10\). In the alternative form, the second input is \(x\) itself, so the step is \(x-2\):
Example 2
Recognize a derivative inside a limit
Write \(\displaystyle\lim_{h\to 0}\frac{\frac{1}{2+3h}-\frac12}{h}\) as a multiple of the derivative of a function at a number, and evaluate the limit.
Solution
The step \(3h\) is added to 2, so the number is \(a=2\). The numerator applies \(\frac1x\) to \(2+3h\), so the function is \(r(x)=\frac1x\), which is defined near 2. The subtracted constant \(\frac12\) is \(r(2)\), as the form requires. The step inside \(r\) is \(3h\), but the denominator is \(h\), so the factor is 3:
The derivative of \(r\), found above, is \(r'(x)=-\frac{1}{x^2}\), so \(r'(2)=-\frac14\), and the limit is \(3\left(-\frac14\right)=-\frac34\).
As a check by algebra, the quotient is \(\frac{2-(2+3h)}{2(2+3h)\,h}=\frac{-3}{2(2+3h)}\), which approaches \(-\frac34\) as \(h\) approaches 0.
Example 3
Evaluate a derivative from its definition
Use the definition of the derivative to find \(p'(x)\) for \(p(x)=\sqrt{3x+4}\). Give the domain of \(p'\).
Solution
The root is defined for \(3x+4\ge 0\), that is, for \(x\ge -\frac43\). Take \(x>-\frac43\), and \(h\neq 0\) so close to 0 that \(3(x+h)+4>0\). Replacing \(x\) by \(x+h\) gives \(p(x+h)=\sqrt{3(x+h)+4}\), which is \(\sqrt{3x+3h+4}\). The numerator of the quotient is a difference of roots, so multiply the numerator and denominator by the sum of the roots (topic 1.6):
The numerator is \(3h\), and the factor \(h\) cancels because \(h\neq 0\). As \(h\) approaches 0, \(\sqrt{3x+3h+4}\) approaches \(\sqrt{3x+4}\), because the root is continuous (topic 1.5). The denominator approaches \(2\sqrt{3x+4}\), which is not 0, so
At \(x=-\frac43\), \(p\) is defined on the right side only, so the two-sided limit does not exist, and neither does \(p'\big(-\frac43\big)\). The domain of \(p'\) is \(x>-\frac43\), smaller than the domain of \(p\).
Example 4
Check whether the defining limit exists
Let \(q(x)=\begin{cases}x^2+1, & x\le 2\\ 4x, & x>2\end{cases}.\) Does \(q'(2)\) exist? Justify your answer.
Solution
The formula changes at 2, so the quotient \(\frac{q(2+h)-q(2)}{h}\) has one formula for \(h<0\) and another for \(h>0\). The value \(q(2)=2^2+1=5\) comes from the first formula, which covers \(x\le 2\). For \(h<0\), \(q(2+h)=(2+h)^2+1\), and for \(h>0\), \(q(2+h)=4(2+h)\):
As \(h\to 0^-\), \(4+h\) approaches 4, so \(q'_-(2)=4\). As \(h\to 0^+\), \(\frac3h\) grows without bound, so the right-hand limit is \(\infty\), which is not a number. The graph of \(q\) jumps at 2 from the point \((2,5)\) up to the height 8. The secants from \((2,5)\) to points just right of 2 are therefore nearly vertical.
The right-hand derivative does not exist, so \(q'(2)\) does not exist.
Each example is one of the four skills of topic 2.2 in Which & Why: AP Calculus.