12.2 Differentiation from first principles
x

Revision notes for Edexcel AS Level Maths 12.2 Differentiation from first principles. Open the guide for explanations and worked examples. Written against the Edexcel AS Level Maths (8MA0) specification, so the content matches what's examinable rather than general Maths background.

12.2 Differentiation from first principles

What you'll learn

  • What a derivative really means as the gradient of a curve at a point.
  • How the formula from first principles is built using a small change hhh.
  • How to prove derivatives of linear, quadratic and cubic expressions.
  • How to present your working clearly for AS-Level marks.

Before we start: gradients you already know

A straight-line gradient measures how steep a line is. If a line passes through two points, the gradient is

change in ychange in x\frac{\text{change in }y}{\text{change in }x}change in xchange in y​

For curves, the steepness changes from point to point, so we need a more careful idea.

Definition

Average gradient

The average gradient between two points on a curve is the gradient of the straight line joining those two points. This straight line is called a chord or secant.

Example

Finding an average gradient on a curve

For the curve y=x2y=x^2y=x2, find the average gradient between the points where x=2x=2x=2 and x=5x=5x=5.

A secant line on y=x^2 showing the average gradient between (2,4) and (5,25).

  1. Find the two yyy-values:

    y(2)=22=4y(5)=52=25\begin{aligned} y(2)&=2^2=4\\ y(5)&=5^2=25 \end{aligned}y(2)y(5)​=22=4=52=25​
  2. Use the gradient formula:

    change in ychange in x=25−45−2=213=7\frac{\text{change in }y}{\text{change in }x} = \frac{25-4}{5-2} = \frac{21}{3} = 7change in xchange in y​=5−225−4​=321​=7
  3. State the result clearly: the average gradient between those two points is 7.

From average gradient to instantaneous gradient

The instantaneous gradient is the gradient at one exact point on a curve. For a curve, this is the gradient of the tangent at that point.

To get it, imagine taking a second point very close to the first point. If the first point has input xxx, let the second point have input x+hx+hx+h, where hhh is a small change in xxx.

The secant through x and x+h approaches the tangent at x as h tends to zero.

Diagram showing a curve with a secant from x to x+h approaching the tangent at x

The average gradient between these two nearby points is

f(x+h)−f(x)(x+h)−x=f(x+h)−f(x)h\frac{f(x+h)-f(x)}{(x+h)-x} = \frac{f(x+h)-f(x)}{h}(x+h)−xf(x+h)−f(x)​=hf(x+h)−f(x)​
Definition

Derivative

The derivative of a function f(x)f(x)f(x), written as f′(x)f'(x)f′(x) or dydx\frac{dy}{dx}dxdy​, is the instantaneous gradient of the curve at xxx.

Key Idea

The first principles formula

Differentiating from first principles means using

f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}f′(x)=h→0lim​hf(x+h)−f(x)​

The symbol lim⁡h→0\lim_{h\to 0}limh→0​ means “look at what the expression becomes as hhh gets closer and closer to 0”.

Common Mistake

Do not put h equal to 0 too early

At the start, the fraction has hhh in the denominator. Substituting h=0h=0h=0 immediately would mean dividing by zero, which is not allowed. You must simplify first, usually by cancelling a factor of hhh.

The core method

For most AS-Level first-principles questions, your working follows the same structure:

  1. Write the first principles formula.
  2. Substitute the given function into f(x+h)f(x+h)f(x+h) and f(x)f(x)f(x).
  3. Expand brackets carefully.
  4. Simplify the numerator.
  5. Factorise and cancel hhh.
  6. Let h→0h \to 0h→0.
Example

Proving the derivative of a linear function

Prove from first principles that the derivative of 6x6x6x is 6.

  1. Let f(x)=6xf(x)=6xf(x)=6x and write the first principles formula:

    f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}f′(x)=h→0lim​hf(x+h)−f(x)​
  2. Find f(x+h)f(x+h)f(x+h) and f(x)f(x)f(x):

    f(x+h)=6(x+h)=6x+6hf(x)=6x\begin{aligned} f(x+h)&=6(x+h)=6x+6h\\ f(x)&=6x \end{aligned}f(x+h)f(x)​=6(x+h)=6x+6h=6x​
  3. Substitute these into the formula:

    f′(x)=lim⁡h→0(6x+6h)−6xhf'(x)=\lim_{h\to 0}\frac{(6x+6h)-6x}{h}f′(x)=h→0lim​h(6x+6h)−6x​
  4. Simplify the numerator:

    f′(x)=lim⁡h→06hhf'(x)=\lim_{h\to 0}\frac{6h}{h}f′(x)=h→0lim​h6h​
  5. Cancel the common factor hhh:

    f′(x)=lim⁡h→06f'(x)=\lim_{h\to 0}6f′(x)=h→0lim​6
  6. Let h→0h \to 0h→0:

    f′(x)=6f'(x)=6f′(x)=6

Expanding brackets: the algebra that matters

The main challenge in first-principles differentiation is usually not the calculus — it is the algebra.

You must be confident expanding expressions like (x+h)2(x+h)^2(x+h)2 and (x+h)3(x+h)^3(x+h)3.

Area and volume models help show where the terms in (x+h)^2 and (x+h)^3 come from.

(x+h)2=x2+2xh+h2(x+h)^2=x^2+2xh+h^2(x+h)2=x2+2xh+h2 (x+h)3=x3+3x2h+3xh2+h3(x+h)^3=x^3+3x^2h+3xh^2+h^3(x+h)3=x3+3x2h+3xh2+h3
Tip

Spot the pattern

After subtracting f(x)f(x)f(x), every remaining term should contain a factor of hhh. If it does not, check your expansion or subtraction.

Example

Expanding the key cubic bracket

Expand (x+h)3(x+h)^3(x+h)3 fully.

  1. Start by writing the cube as a product:

    (x+h)3=(x+h)(x+h)(x+h)(x+h)^3=(x+h)(x+h)(x+h)(x+h)3=(x+h)(x+h)(x+h)
  2. First expand two brackets:

    (x+h)(x+h)=x2+2xh+h2(x+h)(x+h)=x^2+2xh+h^2(x+h)(x+h)=x2+2xh+h2
  3. Multiply by the third bracket:

    (x2+2xh+h2)(x+h)(x^2+2xh+h^2)(x+h)(x2+2xh+h2)(x+h)
  4. Expand term by term:

    x3+x2h+2x2h+2xh2+xh2+h3x^3+x^2h+2x^2h+2xh^2+xh^2+h^3x3+x2h+2x2h+2xh2+xh2+h3
  5. Collect like terms:

    (x+h)3=x3+3x2h+3xh2+h3(x+h)^3=x^3+3x^2h+3xh^2+h^3(x+h)3=x3+3x2h+3xh2+h3

Differentiating a quadratic from first principles

Now let’s apply the method to a quadratic. This is a common style of proof because the expansion creates terms that need simplifying before hhh can be cancelled.

For 3x^2, subtracting f(x) leaves only terms with a factor of h, allowing cancellation before taking the limit.

Example

Proving the derivative of a quadratic

Prove from first principles that the derivative of 3x23x^23x2 is 6x6x6x.

  1. Let f(x)=3x2f(x)=3x^2f(x)=3x2 and start with the formula:

    f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}f′(x)=h→0lim​hf(x+h)−f(x)​
  2. Work out f(x+h)f(x+h)f(x+h):

    f(x+h)=3(x+h)2f(x+h)=3(x+h)^2f(x+h)=3(x+h)2
  3. Expand the bracket:

    f(x+h)=3(x2+2xh+h2)=3x2+6xh+3h2\begin{aligned} f(x+h)&=3(x^2+2xh+h^2)\\ &=3x^2+6xh+3h^2 \end{aligned}f(x+h)​=3(x2+2xh+h2)=3x2+6xh+3h2​
  4. Substitute f(x+h)f(x+h)f(x+h) and f(x)=3x2f(x)=3x^2f(x)=3x2 into the formula:

    f′(x)=lim⁡h→0(3x2+6xh+3h2)−3x2hf'(x)=\lim_{h\to 0}\frac{(3x^2+6xh+3h^2)-3x^2}{h}f′(x)=h→0lim​h(3x2+6xh+3h2)−3x2​
  5. Simplify the numerator:

    f′(x)=lim⁡h→06xh+3h2hf'(x)=\lim_{h\to 0}\frac{6xh+3h^2}{h}f′(x)=h→0lim​h6xh+3h2​
  6. Factor out hhh from the numerator:

    f′(x)=lim⁡h→0h(6x+3h)hf'(x)=\lim_{h\to 0}\frac{h(6x+3h)}{h}f′(x)=h→0lim​hh(6x+3h)​
  7. Cancel hhh:

    f′(x)=lim⁡h→0(6x+3h)f'(x)=\lim_{h\to 0}(6x+3h)f′(x)=h→0lim​(6x+3h)
  8. Let h→0h \to 0h→0:

    f′(x)=6xf'(x)=6xf′(x)=6x
Common Mistake

Forgetting to subtract the whole function

If f(x+h)=3x2+6xh+3h2f(x+h)=3x^2+6xh+3h^2f(x+h)=3x2+6xh+3h2, you must subtract all of f(x)f(x)f(x). Write brackets around the expression before subtracting, especially when signs are involved.

Differentiating a cubic from first principles

Cubic proofs are very similar, but the expansion is longer. The important thing is that after subtracting the original x3x^3x3 term, everything left contains hhh.

The cubic first-principles proof follows the same cancel-then-limit structure, but with more h terms.

Example

Proving the derivative of a cubic

Prove from first principles that the derivative of 4x34x^34x3 is 12x212x^212x2.

  1. Let f(x)=4x3f(x)=4x^3f(x)=4x3:

    f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}f′(x)=h→0lim​hf(x+h)−f(x)​
  2. Find f(x+h)f(x+h)f(x+h):

    f(x+h)=4(x+h)3f(x+h)=4(x+h)^3f(x+h)=4(x+h)3
  3. Expand (x+h)3(x+h)^3(x+h)3:

    (x+h)3=x3+3x2h+3xh2+h3(x+h)^3=x^3+3x^2h+3xh^2+h^3(x+h)3=x3+3x2h+3xh2+h3
  4. Multiply by 4:

    f(x+h)=4x3+12x2h+12xh2+4h3f(x+h)=4x^3+12x^2h+12xh^2+4h^3f(x+h)=4x3+12x2h+12xh2+4h3
  5. Substitute into the first principles formula:

    f′(x)=lim⁡h→0(4x3+12x2h+12xh2+4h3)−4x3hf'(x)=\lim_{h\to 0}\frac{(4x^3+12x^2h+12xh^2+4h^3)-4x^3}{h}f′(x)=h→0lim​h(4x3+12x2h+12xh2+4h3)−4x3​
  6. Simplify the numerator:

    f′(x)=lim⁡h→012x2h+12xh2+4h3hf'(x)=\lim_{h\to 0}\frac{12x^2h+12xh^2+4h^3}{h}f′(x)=h→0lim​h12x2h+12xh2+4h3​
  7. Factor out hhh:

    f′(x)=lim⁡h→0h(12x2+12xh+4h2)hf'(x)=\lim_{h\to 0}\frac{h(12x^2+12xh+4h^2)}{h}f′(x)=h→0lim​hh(12x2+12xh+4h2)​
  8. Cancel hhh:

    f′(x)=lim⁡h→0(12x2+12xh+4h2)f'(x)=\lim_{h\to 0}(12x^2+12xh+4h^2)f′(x)=h→0lim​(12x2+12xh+4h2)
  9. Let h→0h \to 0h→0:

    f′(x)=12x2f'(x)=12x^2f′(x)=12x2

Constants in front of powers

A constant multiplier stays attached throughout the proof. If the function is ax3ax^3ax3, where aaa is a constant, then the derivative is 3ax23ax^23ax2.

Definition

Constant

A constant is a value that does not change as xxx changes. In an expression like ax3ax^3ax3, the letter aaa represents a fixed number.

Example

Using a constant multiplier

Show from first principles that if f(x)=ax3f(x)=ax^3f(x)=ax3, where aaa is a constant, then f′(x)=3ax2f'(x)=3ax^2f′(x)=3ax2.

  1. Start from first principles:

    f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}f′(x)=h→0lim​hf(x+h)−f(x)​
  2. Substitute the function:

    f′(x)=lim⁡h→0a(x+h)3−ax3hf'(x)=\lim_{h\to 0}\frac{a(x+h)^3-ax^3}{h}f′(x)=h→0lim​ha(x+h)3−ax3​
  3. Expand the cubic bracket:

    f′(x)=lim⁡h→0a(x3+3x2h+3xh2+h3)−ax3hf'(x)=\lim_{h\to 0}\frac{a(x^3+3x^2h+3xh^2+h^3)-ax^3}{h}f′(x)=h→0lim​ha(x3+3x2h+3xh2+h3)−ax3​
  4. Multiply out the constant aaa:

    f′(x)=lim⁡h→0ax3+3ax2h+3axh2+ah3−ax3hf'(x)=\lim_{h\to 0}\frac{ax^3+3ax^2h+3axh^2+ah^3-ax^3}{h}f′(x)=h→0lim​hax3+3ax2h+3axh2+ah3−ax3​
  5. Simplify the numerator:

    f′(x)=lim⁡h→03ax2h+3axh2+ah3hf'(x)=\lim_{h\to 0}\frac{3ax^2h+3axh^2+ah^3}{h}f′(x)=h→0lim​h3ax2h+3axh2+ah3​
  6. Factor out hhh:

    f′(x)=lim⁡h→0h(3ax2+3axh+ah2)hf'(x)=\lim_{h\to 0}\frac{h(3ax^2+3axh+ah^2)}{h}f′(x)=h→0lim​hh(3ax2+3axh+ah2)​
  7. Cancel hhh:

    f′(x)=lim⁡h→0(3ax2+3axh+ah2)f'(x)=\lim_{h\to 0}(3ax^2+3axh+ah^2)f′(x)=h→0lim​(3ax2+3axh+ah2)
  8. Let h→0h \to 0h→0:

    f′(x)=3ax2f'(x)=3ax^2f′(x)=3ax2

How this connects to the power rule

You may already know the shortcut:

ddx(xn)=nxn−1\frac{d}{dx}(x^n)=nx^{n-1}dxd​(xn)=nxn−1

For example, the derivative of x3x^3x3 is 3x23x^23x2. First principles explains why that shortcut works.

Common Mistake

First principles means no shortcut-only solution

If you are asked to prove a derivative from first principles, do not simply quote the power rule. You can use the power rule later to check your answer, but your main solution must use the limit definition.

Exam technique

In the exam

  1. Always begin with f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}f′(x)=limh→0​hf(x+h)−f(x)​ so your method is clear.

  2. Put brackets around f(x+h)f(x+h)f(x+h) and f(x)f(x)f(x) before subtracting, then expand carefully.

  3. Do not set h=0h=0h=0 until after you have cancelled the factor of hhh in the fraction.

Self review

Check yourself

  • Can you explain why f(x+h)−f(x)h\frac{f(x+h)-f(x)}{h}hf(x+h)−f(x)​ represents a gradient?

  • Why is it wrong to substitute h=0h=0h=0 at the start of the proof?

  • Can you expand (x+h)3(x+h)^3(x+h)3 without looking it up?

Recap questions

Test yourself with 5 quick questions on this guide. Answer them all correctly to complete it.

You've reached the end

Test yourself on this topic, or move on to the next guide.

FlashcardsSelf-test with active recall
SamplingUp next

How was this guide?

12.2 Differentiation from first principles Revision Guide

  1. AS Level
  2. /Maths
  3. /12.2 Differentiation from first principles