Differentiation from first principles
Differentiation from first principles finds the derivative of a function straight from its definition, as the limit of the gradient of a chord. The first principles formula is f′(x) = lim (h → 0) [f(x + h) − f(x)] / h. You work out the gradient of a chord between x and x + h, simplify it, then let h shrink to zero. What is left is the gradient of the tangent, the derivative. A-level Maths asks you to prove simple derivatives this way.
The first principles formula
You will also see it written with δx, read "delta x", for the small change in x:
They are the same formula. h and δx both stand for a small step along the x-axis.
Why it works: from chord to tangent
The gradient of a curve at a point is the gradient of its tangent there. But a tangent touches the curve at only one point, so you cannot use rise over run on it directly. Instead, take a second point a small step h further along the curve and draw the chord between them.
- The two points are (x, f(x)) and (x + h, f(x + h)).
- The rise is f(x + h) − f(x) and the run is h.
- So the gradient of the chord is [f(x + h) − f(x)] / h.
As h gets smaller, the second point slides towards the first, and the chord turns until it lies along the tangent. The limit of the chord's gradient as h → 0 is the gradient of the tangent.
The graph shows this for y = x² at the point x = 1. Here x stands for the step size h, and y is the gradient of the chord from 1 to 1 + h.
The chord gradient is 2 + h, so it gets closer and closer to 2 as h shrinks. You cannot put h = 0 straight into [f(1 + h) − f(1)] / h, because that would be 0 ÷ 0. Simplifying first removes the h from the bottom, and then the limit is easy: the gradient of y = x² at x = 1 is 2.
How to differentiate from first principles
- Write f(x + h) by replacing every x in the function with (x + h).
- Expand and simplify f(x + h) − f(x). All the terms without h cancel.
- Divide by h. Every term left on top has a factor of h, so you can cancel it.
- Let h → 0. Any term still containing h disappears.
- Write the conclusion, such as "so f′(x) = 2x". In a proof, say clearly that h tends to 0.
Example 1: f(x) = x²
As h → 0, 2x + h → 2x. So the derivative of x² is 2x, the same as the power rule gives.
Example 2: f(x) = 5x² + x
Subtract f(x) = 5x² + x, and the 5x² and x cancel:
As h → 0, this tends to 10x + 1.
Example 3: f(x) = x³ − x
Expand (x + h)³ = x³ + 3x²h + 3xh² + h³. Then:
Divide by h to get 3x² + 3xh + h² − 1. As h → 0, the terms with h vanish, leaving 3x² − 1.
Try one now. Work through the steps for the function given, then press Mark to check your answer in the course.
Fill in each first-principles step to differentiate a simple function.
Press Mark to have your answer marked in the Calculus course.
Example 4: watching the limit with numbers
Estimate the gradient of y = x² at x = 5 using chords with smaller and smaller h.
| h | Chord from x = 5 to | Gradient of chord |
|---|---|---|
| 0.1 | 5.1 | (26.01 − 25) ÷ 0.1 = 10.1 |
| 0.01 | 5.01 | (25.1001 − 25) ÷ 0.01 = 10.01 |
| 0.001 | 5.001 | 10.001 |
The gradients approach 10, which is 2 × 5, just as f′(x) = 2x predicts. First principles turns this pattern into a proof: the gradient of the chord is exactly 10 + h, and 10 + h → 10.
Differentiating sin x from first principles
A-level Maths also asks for sin x and cos x from first principles. You need the compound angle formula and the small angle approximations, which are both in the formula booklet: for small h in radians, sin h ≈ h and cos h ≈ 1 − h²/2.
Replace cos h and sin h with their approximations:
As h → 0, the second term vanishes, so the derivative of sin x is cos x. Many textbooks write the same argument using the limits (sin h)/h → 1 and (cos h − 1)/h → 0. This only works with x in radians, which is why calculus always uses radians.
Common mistakes
- Expanding (x + h)² as x² + h². It is x² + 2xh + h².
- Putting h = 0 too early. You must cancel the h on the bottom first, or you get 0 ÷ 0.
- Forgetting to subtract all of f(x). Put f(x) in brackets so every term gets the minus sign.
- Writing h = 0 instead of h → 0. h never equals zero: it tends to zero. Examiners look for the limit notation.
- Not stating the conclusion. A proof needs a final line, such as "as h → 0, f′(x) → 3x² − 1".
- Using the power rule. If a question says "from first principles", using the power rule scores nothing.
Is the first principles formula in the booklet?
Yes. AQA's and Edexcel's A-level Maths formulae booklets, checked in November 2026, both give the definition f′(x) = lim (h → 0) [f(x + h) − f(x)] / h under differentiation, and both give the small angle approximations you need for sin x and cos x. So you do not need to memorise the formula, but you do need to use it fluently and set out a proof that convinces the examiner. The Rate of Change Calculator shows a chord turning into a tangent as h shrinks.
First principles questions with answers
1. Prove from first principles that the derivative of x² + 3 is 2x.
Divide by h: 2x + h. As h → 0, this tends to 2x.
2. Prove from first principles that the derivative of −2x² is −4x.
Divide by h: −4x − 2h. As h → 0, this tends to −4x.
3. Find, in terms of h, the gradient of the chord of y = x² from x = 2 to x = 2 + h, and deduce the gradient of the curve at x = 2.
As h → 0, the gradient tends to 4.
4. Use first principles to find the gradient of y = 4 − x² at x = 1.
As h → 0, the gradient is −2.
5. Prove from first principles that the derivative of 7x is 7.
Practise calculus in a short timed paper
A-level Maths: Calculus gives you a short timed paper every day, with 8 questions worth 25 to 35 marks across differentiation and integration. Differentiation from first principles comes up regularly. In the US, the same practice opens as AP Calculus AB. The Calculus course starts from limits and the gradient of a curve before it reaches the rules, and our guides to the chain rule and product rule take it from there.
A-level Maths: Calculus
Start today's paperPaper resets in
Common questions
What is differentiation from first principles?
What is the first principles formula?
Why can't you just put h = 0?
Is h the same as δx?
Which functions do you need to differentiate from first principles at A-level?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Rate of Change Calculator
Find average and instantaneous rates of change
Open the tool - Learn it
Calculus
Differentiation, integration and the mathematics that drives physics and engineering
Start the course - Test it
A-level Maths: Calculus
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper