Differentiation from first principles, explained
Differentiation from first principles means finding a derivative straight from its definition, as the limit of the gradient of a chord. It is the proof behind every differentiation rule, and A level papers often ask for it directly.
On this page
The idea: chords approaching a tangent
The gradient of a straight line is easy: rise over run. A curve has a different gradient at every point, so we approximate it. Take a point P on the curve y = f(x) at x, and a nearby point Q at x + h. The chord PQ has gradient
(f(x + h) − f(x)) / h
As h gets smaller, Q slides towards P and the chord gets closer and closer to the tangent at P. The gradient of the tangent is the limit of the chord's gradient as h tends to zero.
The definition
f'(x) = limh→0 [f(x + h) − f(x)] / h
Some textbooks use δx instead of h. The method is identical.
The method
- Write down f(x + h) and expand it fully.
- Subtract f(x). The terms without h should cancel.
- Divide by h. Every remaining term should still contain h before dividing, so this simplifies cleanly.
- Let h → 0. Terms still containing h vanish, leaving the derivative.
The order matters. You cannot put h = 0 at the start, because the chord gradient would then be 0/0. The algebra removes the h in the denominator first, and only then do you take the limit.
Worked examples
Example 1: f(x) = x²
Prove from first principles that the derivative of x² is 2x.
- f(x + h) = (x + h)² = x² + 2xh + h².
- f(x + h) − f(x) = 2xh + h². Dividing by h gives 2x + h.
- As h → 0, 2x + h → 2x. So f'(x) = 2x.
Example 2: f(x) = x³
Prove from first principles that the derivative of x³ is 3x².
- (x + h)³ = x³ + 3x²h + 3xh² + h³.
- Subtract x³ and divide by h: 3x² + 3xh + h².
- As h → 0, this tends to 3x².
Example 3: a polynomial
Differentiate f(x) = 5x² − 3x + 2 from first principles.
- f(x + h) = 5(x + h)² − 3(x + h) + 2 = 5x² + 10xh + 5h² − 3x − 3h + 2.
- f(x + h) − f(x) = 10xh + 5h² − 3h. Divide by h: 10x + 5h − 3.
- As h → 0: f'(x) = 10x − 3.
Example 4: f(x) = 1/x
Differentiate 1/x from first principles.
- f(x + h) − f(x) = 1/(x + h) − 1/x = (x − (x + h))/(x(x + h)) = −h/(x(x + h)).
- Divide by h: −1/(x(x + h)).
- As h → 0: −1/x², which matches the power rule for x−1.
Example 5: a gradient at a point
Find the gradient of y = x² at x = 3 from first principles, using a chord to x = 3 + h.
- Gradient of chord = ((3 + h)² − 9)/h = (6h + h²)/h = 6 + h.
- As h → 0, the gradient is 6. With h = 0.1 the chord gradient is 6.1, and with h = 0.01 it is 6.01, closing in on 6.
Why first principles matters
In practice, you differentiate with rules such as “multiply by the power and reduce the power by one”. First principles shows where those rules come from. For any positive whole number n, expanding (x + h)n with the binomial theorem gives xn + nxn−1h + (terms containing h² or higher). Subtracting xn, dividing by h and letting h → 0 leaves exactly nxn−1, the power rule. The same idea proves that the derivative of a sum is the sum of the derivatives, and that a constant multiple stays in front.
Understanding this also helps with harder questions that describe a gradient as a limit in words, or ask what happens to a chord gradient as the second point moves closer. Those questions test the idea, not just the rule.
sin x from first principles (Year 2)
In the second year you may prove that the derivative of sin x is cos x. Expand sin(x + h) = sin x cos h + cos x sin h, so the chord gradient is
[sin x (cos h − 1) + cos x sin h] / h = sin x · (cos h − 1)/h + cos x · (sin h)/h.
Using the small-angle results that, in radians, (sin h)/h → 1 and (cos h − 1)/h → 0 as h → 0, the limit is cos x. This is one reason calculus with trigonometric functions requires radians. In degrees, the limit of (sin h)/h is π/180, not 1, and every trig derivative would carry that awkward factor.
Laying out your answer for full marks
Mark schemes reward a clear structure. Write the definition, show the expansion, show the cancellation, show the division by h, and finish with a limit statement using correct notation, such as “limh→0 (2x + h) = 2x”. Writing “h = 0” instead of “h → 0” can lose the final mark, because the argument depends on h approaching zero, not equalling it.
Common mistakes
- Substituting h = 0 before dividing, which gives 0/0.
- Expanding (x + h)² as x² + h².
- Forgetting to subtract f(x), so terms do not cancel.
- Missing the limit notation in the final line.
Practice questions
Try each one before opening the answer.
Q1. Find the gradient of the chord from x = 2 to x = 2 + h on y = x².
Show answer
Q2. Differentiate f(x) = 4x² from first principles.
Show answer
Q3. Differentiate f(x) = x² + 5x from first principles.
Show answer
Q4. Why can we not set h = 0 straight away?
Show answer
Frequently asked questions
Is differentiation from first principles in AS or A level Maths?
It is in the first year of A level Maths for polynomials. Proving the derivatives of sin x and cos x from first principles is in the second year.
Is it in AP Calculus?
Yes. AP Calculus defines the derivative with the same limit, often written limh→0, and asks students to recognise and use it.
Key takeaways
- f'(x) = limh→0 [f(x + h) − f(x)]/h.
- Expand, subtract, divide by h, then let h → 0.
- Never set h = 0 before the h in the denominator has cancelled.
- Use correct limit notation in the final line.
- The same idea proves d/dx(sin x) = cos x, in radians.