Difference Quotients
Theory
Differentiation from first principles finds the derivative \(f'(x)\) straight from its definition as the limit of secant gradients. This Year 11 Mathematics Advanced page sets out the four steps (expand, subtract, divide by \(h\), let \(h\to0\)) for polynomials, reciprocals and square roots, and the \(x\to c\) form of the definition.
The derivative of \(f\), written \(f'(x)\), is the gradient function: for any \(x\) it gives the gradient of the tangent to \(y=f(x)\). If \(y=f(x)\) you may also write the derivative as \(y'\). Finding it is called differentiating.
Differentiation from first principles means using the definition itself. Take the secant through \(P\big(x,f(x)\big)\) and \(Q\big(x+h,f(x+h)\big)\). Its gradient is \(\dfrac{f(x+h)-f(x)}{h}\). As \(h\to0\), \(Q\) slides to \(P\) and the secant becomes the tangent, so
You cannot put \(h=0\) straight in, because that gives \(\dfrac{0}{0}\). Instead simplify first: every term left on the top has a factor \(h\), which cancels. Only then let \(h\to0\).
Once you have \(f'(x)\), substitute a number to get the gradient at that point, for example \(f'(2)\). The same definition works with other letters: for a displacement \(s(t)\), the derivative \(s'(t)\) is the velocity.
The derivative from first principles (\(h\) is the step in \(x\)):
The same definition at a point \(x=c\), with the second point written as \(\big(x,f(x)\big)\):
How to differentiate from first principles
- Expand \(f(x+h)\): replace every \(x\) in \(f(x)\) with \((x+h)\) and expand. If \(f(x)\) is a product such as \((2x+1)(x-3)\), expand \(f(x)\) first.
- Subtract \(f(x)\), the whole expression in brackets. Every term without an \(h\) should cancel.
- Divide by \(h\) (allowed since \(h\ne0\)). Each remaining term loses one factor of \(h\).
- Let \(h\to0\): every term that still contains \(h\) disappears. What is left is \(f'(x)\).
- Use it: substitute to find \(f'(a)\), or set \(f'(a)\) equal to a given value to find an unknown constant.
Setting out
Write \(\displaystyle\lim_{h\to0}\) in front of every line until the limit is taken. With the \(x\to c\) form, factorise the top so that \((x-c)\) cancels, then let \(x\to c\).
Expand \(f(x+h)\), then subtract \(f(x)\):
| \(f(x+h)\) | \(=\) | \(3(x+h)^2-2(x+h)\) |
| \(\) | \(=\) | \(3x^2+6xh+3h^2-2x-2h\) |
| \(f(x+h)-f(x)\) | \(=\) | \(6xh+3h^2-2h\) |
| \(f'(x)\) | \(=\) | \(\displaystyle\lim_{h\to0}\dfrac{6xh+3h^2-2h}{h}\) |
| \(\) | \(=\) | \(\displaystyle\lim_{h\to0}(6x+3h-2)\) |
| \(\) | \(=\) | \(6x-2\) |
| \(f'(-1)\) | \(=\) | \(6(-1)-2\) |
| \(\) | \(=\) | \(-8\) |
\(\therefore\ \boldsymbol{f'(x)=6x-2}\) and \(f'(-1)=\mathbf{-8}\).
Use \((x+h)^3=x^3+3x^2h+3xh^2+h^3\):
| \(f(x+h)\) | \(=\) | \((x+h)^3-2(x+h)\) |
| \(\) | \(=\) | \(x^3+3x^2h+3xh^2+h^3-2x-2h\) |
| \(f(x+h)-f(x)\) | \(=\) | \(3x^2h+3xh^2+h^3-2h\) |
| \(f'(x)\) | \(=\) | \(\displaystyle\lim_{h\to0}\dfrac{3x^2h+3xh^2+h^3-2h}{h}\) |
| \(\) | \(=\) | \(\displaystyle\lim_{h\to0}(3x^2+3xh+h^2-2)\) |
| \(\) | \(=\) | \(3x^2-2\) |
\(\therefore\ \boldsymbol{f'(x)=3x^2-2}\). The terms \(3xh\) and \(h^2\) both vanish as \(h\to0\).
Write the top over the common denominator \(xc\), then cancel \(x-c\):
| \(f'(c)\) | \(=\) | \(\displaystyle\lim_{x\to c}\dfrac{\dfrac{3}{x}-\dfrac{3}{c}}{x-c}\) |
| \(\) | \(=\) | \(\displaystyle\lim_{x\to c}\dfrac{3c-3x}{xc}\times\dfrac{1}{x-c}\) |
| \(\) | \(=\) | \(\displaystyle\lim_{x\to c}\dfrac{-3(x-c)}{xc}\times\dfrac{1}{x-c}\) |
| \(\) | \(=\) | \(\displaystyle\lim_{x\to c}\left(-\dfrac{3}{xc}\right)\) |
| \(\) | \(=\) | \(-\dfrac{3}{c^2}\) |
\(\therefore\ f'(c)=\boldsymbol{-\dfrac{3}{c^2}}\). Note \(3c-3x=-3(x-c)\): take out \(-3\) so the bracket matches.
Multiply the top and bottom by the conjugate \(\sqrt{x+h+1}+\sqrt{x+1}\). The top becomes a difference of squares, \((\sqrt{x+h+1})^2-(\sqrt{x+1})^2\):
| \(f'(x)\) | \(=\) | \(\displaystyle\lim_{h\to0}\dfrac{\sqrt{x+h+1}-\sqrt{x+1}}{h}\) |
| \(\) | \(=\) | \(\displaystyle\lim_{h\to0}\dfrac{(x+h+1)-(x+1)}{h\left(\sqrt{x+h+1}+\sqrt{x+1}\right)}\) |
| \(\) | \(=\) | \(\displaystyle\lim_{h\to0}\dfrac{h}{h\left(\sqrt{x+h+1}+\sqrt{x+1}\right)}\) |
| \(\) | \(=\) | \(\displaystyle\lim_{h\to0}\dfrac{1}{\sqrt{x+h+1}+\sqrt{x+1}}\) |
| \(\) | \(=\) | \(\dfrac{1}{\sqrt{x+1}+\sqrt{x+1}}\) |
| \(\) | \(=\) | \(\dfrac{1}{2\sqrt{x+1}}\) |
\(\therefore\ f'(x)=\dfrac{1}{2\sqrt{x+1}}\), as required. The conjugate turns the top into \((x+h+1)-(x+1)=h\), which cancels.
Common pitfalls
Frequently asked questions
What does differentiation from first principles mean?
It means finding the derivative directly from its definition, \(f'(x)=\displaystyle\lim_{h\to0}\dfrac{f(x+h)-f(x)}{h}\). You expand, subtract, divide by \(h\) and then let \(h\to0\).
What is the first principles formula?
\(f'(x)=\displaystyle\lim_{h\to0}\dfrac{f(x+h)-f(x)}{h}\). An equivalent form at a point is \(f'(c)=\displaystyle\lim_{x\to c}\dfrac{f(x)-f(c)}{x-c}\).
Why can't you just substitute h = 0?
Substituting \(h=0\) into the fraction gives \(\dfrac{0}{0}\), which has no value. You must first simplify so the \(h\) on the bottom cancels, then let \(h\to0\).
How do you differentiate a square root from first principles?
Multiply the top and bottom by the conjugate, for example \(\sqrt{x+h}+\sqrt{x}\). The top becomes \((x+h)-x=h\), which cancels with the \(h\) on the bottom before you take the limit.
What is the derivative of a linear function?
The derivative of a linear function is its gradient. For \(f(x)=4x-7\), \(f(x+h)-f(x)=4h\), so \(f'(x)=4\).
How do you find f prime of 2 using first principles?
Find \(f'(x)\) from first principles first, then substitute \(x=2\). Or use \(\displaystyle\lim_{x\to2}\dfrac{f(x)-f(2)}{x-2}\) directly.