The derivative
Theory
The derivative measures the gradient of a curve at a point, or equivalently its instantaneous rate of change. The average rate of change between two points is the gradient of the secant; letting the points close together turns this into the gradient of the tangent, defined from first principles by \(f'(x)=\displaystyle\lim_{h\to 0}\dfrac{f(x+h)-f(x)}{h}\).
The average rate of change of a function \(f\) between \(x=a\) and \(x=b\) is the gradient of the straight line joining the two points on the curve — the secant. It is computed as rise over run, \(\dfrac{f(b)-f(a)}{b-a}\), and describes how quickly the output changes on average across the interval.
The instantaneous rate of change at a single point is the gradient of the tangent to the curve there. Imagine sliding the second point of a secant closer and closer to the first: the secant gradients approach a limiting value, and that limit is the gradient of the tangent. This gradient is called the derivative at the point.
Writing the second point as \(x+h\), the gradient of the secant is \(\dfrac{f(x+h)-f(x)}{h}\). Taking the limit as \(h\to 0\) gives the derivative from first principles, \(f'(x)=\displaystyle\lim_{h\to 0}\dfrac{f(x+h)-f(x)}{h}\). The derivative is itself a function; the same object is written \(f'(x)\) (Lagrange) or \(\dfrac{dy}{dx}\) (Leibniz). Substituting a value \(x=a\) gives \(f'(a)\), the gradient at that point.
The average rate of change — the gradient of the secant between \(x=a\) and \(x=b\):
The derivative from first principles — the limit of the secant gradient as \(h\to 0\):
The two notations for the derivative, and the gradient at a particular point \(x=a\):
Differentiating from first principles
- Write the difference quotient. Form \(\dfrac{f(x+h)-f(x)}{h}\) — the gradient of the secant between \(x\) and \(x+h\).
- Expand \(f(x+h)\). Substitute \(x+h\) into the rule and expand fully; be careful with squares and cubes, e.g. \((x+h)^{2}=x^{2}+2xh+h^{2}\).
- Simplify the numerator. Subtract \(f(x)\); the terms without \(h\) cancel, leaving a numerator with a common factor of \(h\).
- Cancel \(h\), then take the limit. Divide through by \(h\), then let \(h\to 0\). The surviving expression is \(f'(x)\).
- Evaluate if needed. For a gradient at \(x=a\), substitute to get \(f'(a)\); for a tangent line, use \(y-y_{1}=f'(a)(x-x_{1})\).
| \(\text{avg rate}\) | \(=\) | \(\dfrac{f(3)-f(1)}{3-1}\) |
| \(=\) | \(\dfrac{9-1}{2}\) | |
| \(=\) | \(\dfrac{8}{2}=4\) |
| \(f'(x)\) | \(=\) | \(\displaystyle\lim_{h\to 0}\dfrac{(x+h)^{2}-x^{2}}{h}\) |
| \(=\) | \(\displaystyle\lim_{h\to 0}\dfrac{x^{2}+2xh+h^{2}-x^{2}}{h}\) |
| \(f'(x)\) | \(=\) | \(\displaystyle\lim_{h\to 0}\dfrac{2xh+h^{2}}{h}=\lim_{h\to 0}(2x+h)\) |
| \(=\) | \(2x\) |
| \(f'(2)\) | \(=\) | \(2(2)=4\) |
| \(f(x+h)\) | \(=\) | \(2x^{2}+4xh+2h^{2}-5x-5h\) |
| \(f(x+h)-f(x)\) | \(=\) | \(4xh+2h^{2}-5h\) |
| \(f'(x)\) | \(=\) | \(\displaystyle\lim_{h\to 0}(4x+2h-5)\) |
| \(=\) | \(4x-5\) |
| \((x+h)^{3}\) | \(=\) | \(x^{3}+3x^{2}h+3xh^{2}+h^{3}\) |
| \(f(x+h)-f(x)\) | \(=\) | \(3x^{2}h+3xh^{2}+h^{3}\) |
| \(f'(x)\) | \(=\) | \(\displaystyle\lim_{h\to 0}\left(3x^{2}+3xh+h^{2}\right)\) |
| \(=\) | \(3x^{2}\) |
Common pitfalls
Frequently asked questions
What is the derivative of a function?
It is a new function giving the gradient of the original curve at every point — the gradient of the tangent, which measures the instantaneous rate at which the output changes as \(x\) changes.
What is the difference between average and instantaneous rate of change?
The average rate between two points is the gradient of the secant joining them (rise over run). The instantaneous rate at one point is the gradient of the tangent, the limit of secant gradients as the second point slides in toward the first.
What does differentiation from first principles mean?
Finding the derivative straight from \(f'(x)=\displaystyle\lim_{h\to 0}\dfrac{f(x+h)-f(x)}{h}\). Expand and simplify the difference quotient so the \(h\) in the denominator cancels, then let \(h\to 0\).
What do the notations f'(x) and dy/dx mean?
Both mean the derivative. \(f'(x)\) is Lagrange notation (“f dashed of \(x\)”); \(\dfrac{dy}{dx}\) is Leibniz notation, emphasising the rate of change of \(y\) with respect to \(x\). They are the same gradient function.
How do you find the gradient of a curve at a point?
Differentiate to get \(f'(x)\), then substitute the \(x\)-coordinate. For \(f(x)=x^{2}\), \(f'(x)=2x\), so at \(x=2\) the gradient is \(4\).
Why can you not just substitute h = 0 into the difference quotient?
Because it gives \(\dfrac{0}{0}\), which is undefined. Simplify so the \(h\) cancels first, and only then let \(h\to 0\) to obtain the derivative.