MathsGenie logo
RevisionResourcesBlog
  1. Home
  2. /
  3. Blog
  4. /
  5. Differentiation from First Principles: A-level Maths

Differentiation from First Principles: A-level Maths

Learn differentiation from first principles for A-level Maths with clear proofs, worked examples, common mistakes and exam-style questions with answers.

MathsGenie Team
•Last updated: 20 Nov 2026
Share
Add as a preferred source on Google

Differentiation from first principles means finding a derivative directly from the definition of a gradient, rather than applying a rule such as the power rule. For a function f(x)f(x)f(x), the definition is

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

For differentiation from first principles A-level Maths questions, you must substitute the function into this formula, simplify the difference quotient and then take the limit. This guide explains why the formula works, demonstrates the method through worked examples and provides exam-style questions with answers.

What is differentiation from first principles?

The derivative f′(x)f'(x)f′(x) gives the gradient of the tangent to the curve y=f(x)y=f(x)y=f(x) at a general point. It can also represent an instantaneous rate of change, depending on the context.

Begin with two points on the curve:

P=(x,f(x)) P=(x,f(x)) P=(x,f(x))

and

Q=(x+h,f(x+h)). Q=(x+h,f(x+h)). Q=(x+h,f(x+h)).

The change in the horizontal coordinate is hhh, while the change in the vertical coordinate is f(x+h)−f(x)f(x+h)-f(x)f(x+h)−f(x). Therefore, the gradient of the straight line through PPP and QQQ is

f(x+h)−f(x)h. \frac{f(x+h)-f(x)}{h}. hf(x+h)−f(x)​.

This is the gradient of a chord, also called a secant, rather than the gradient of the tangent. As hhh approaches zero, QQQ approaches PPP and the chord approaches the tangent. This produces the first-principles definition:

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

Some questions use δx\delta xδx instead of hhh:

f′(x)=lim⁡δx→0f(x+δx)−f(x)δx. f'(x)=\lim_{\delta x\to 0}\frac{f(x+\delta x)-f(x)}{\delta x}. f′(x)=δx→0lim​δxf(x+δx)−f(x)​.

The meaning and method are identical.

Why can you not substitute h=0h=0h=0 immediately?

Direct substitution into the original difference quotient gives

f(x)−f(x)0=00, \frac{f(x)-f(x)}{0}=\frac{0}{0}, 0f(x)−f(x)​=00​,

which is undefined. You must first simplify the numerator until it contains a factor of hhh. Since the limit considers non-zero values of hhh approaching zero, that factor can then be cancelled.

Only after cancellation should you evaluate the limit. This distinction is fundamental: hhh approaches zero, but it is not set equal to zero before the algebra has been simplified.

The step-by-step first-principles method

For a polynomial function, use this reliable sequence:

  1. Write the definition

    f′(x)=lim⁡h→0f(x+h)−f(x)h. f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}. f′(x)=h→0lim​hf(x+h)−f(x)​.
  2. Calculate f(x+h)f(x+h)f(x+h) by replacing every xxx in the function with x+hx+hx+h.

  3. Substitute f(x+h)f(x+h)f(x+h) and f(x)f(x)f(x) into the numerator.

  4. Expand brackets carefully.

  5. Simplify the numerator. All terms independent of hhh should cancel.

  6. Factor out hhh and cancel it with the denominator.

  7. Take the limit as h→0h\to 0h→0.

  8. State the derivative clearly using f′(x)f'(x)f′(x) or dydx\dfrac{dy}{dx}dxdy​.

Showing these stages matters in an exam because the question is testing the definition of a derivative, not merely whether you know the final differentiation rule.

Differentiation from first principles worked examples

Worked example 1: differentiating x2x^2x2

Let

f(x)=x2. f(x)=x^2. f(x)=x2.

Start from the definition:

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

Since f(x+h)=(x+h)2f(x+h)=(x+h)^2f(x+h)=(x+h)2,

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

Expand the square:

f′(x)=lim⁡h→0x2+2xh+h2−x2h. f'(x)=\lim_{h\to 0}\frac{x^2+2xh+h^2-x^2}{h}. f′(x)=h→0lim​hx2+2xh+h2−x2​.

The x2x^2x2 terms cancel:

f′(x)=lim⁡h→02xh+h2h. f'(x)=\lim_{h\to 0}\frac{2xh+h^2}{h}. f′(x)=h→0lim​h2xh+h2​.

Factorise and cancel hhh:

f′(x)=lim⁡h→0(2x+h). f'(x)=\lim_{h\to 0}(2x+h). f′(x)=h→0lim​(2x+h).

Now take the limit:

f′(x)=2x. \boxed{f'(x)=2x}. f′(x)=2x​.

This proves the derivative of x2x^2x2 from first principles. Writing only 2x2x2x would not answer a question that specifically asks for a proof from first principles.

Worked example 2: differentiating a quadratic

Let

f(x)=3x2−4x+7. f(x)=3x^2-4x+7. f(x)=3x2−4x+7.

Then

f(x+h)=3(x+h)2−4(x+h)+7. f(x+h)=3(x+h)^2-4(x+h)+7. f(x+h)=3(x+h)2−4(x+h)+7.

Using the definition,

f′(x)=lim⁡h→03(x+h)2−4(x+h)+7−(3x2−4x+7)h. f'(x)=\lim_{h\to 0}\frac{3(x+h)^2-4(x+h)+7-(3x^2-4x+7)}{h}. f′(x)=h→0lim​h3(x+h)2−4(x+h)+7−(3x2−4x+7)​.

Take care with the subtraction of f(x)f(x)f(x). Expanding gives

f′(x)=lim⁡h→03x2+6xh+3h2−4x−4h+7−3x2+4x−7h. f'(x)=\lim_{h\to 0}\frac{3x^2+6xh+3h^2-4x-4h+7-3x^2+4x-7}{h}. f′(x)=h→0lim​h3x2+6xh+3h2−4x−4h+7−3x2+4x−7​.

After collecting terms,

f′(x)=lim⁡h→06xh+3h2−4hh. f'(x)=\lim_{h\to 0}\frac{6xh+3h^2-4h}{h}. f′(x)=h→0lim​h6xh+3h2−4h​.

Cancel the common factor:

f′(x)=lim⁡h→0(6x+3h−4). f'(x)=\lim_{h\to 0}(6x+3h-4). f′(x)=h→0lim​(6x+3h−4).

Therefore,

f′(x)=6x−4. \boxed{f'(x)=6x-4}. f′(x)=6x−4​.

Notice that the constant 777 disappears because it contributes no change to the output of the function.

Worked example 3: differentiating x3x^3x3

Let f(x)=x3f(x)=x^3f(x)=x3. Then

f′(x)=lim⁡h→0(x+h)3−x3h. f'(x)=\lim_{h\to 0}\frac{(x+h)^3-x^3}{h}. f′(x)=h→0lim​h(x+h)3−x3​.

Use

(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.

It follows that

f′(x)=lim⁡h→03x2h+3xh2+h3h. f'(x)=\lim_{h\to 0}\frac{3x^2h+3xh^2+h^3}{h}. f′(x)=h→0lim​h3x2h+3xh2+h3​.

Cancelling hhh gives

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

Hence,

f′(x)=3x2. \boxed{f'(x)=3x^2}. f′(x)=3x2​.

The expansion of (x+h)3(x+h)^3(x+h)3 is a frequent source of errors, so it is worth writing the full binomial expansion before simplifying.

First principles for sine and cosine

Some A-level specifications include differentiating sin⁡x\sin xsinx and cos⁡x\cos xcosx from first principles. These proofs require angles to be measured in radians and use the standard limits

lim⁡h→0sin⁡hh=1 \lim_{h\to 0}\frac{\sin h}{h}=1 h→0lim​hsinh​=1

and

lim⁡h→0cos⁡h−1h=0. \lim_{h\to 0}\frac{\cos h-1}{h}=0. h→0lim​hcosh−1​=0.

For example, if f(x)=sin⁡xf(x)=\sin xf(x)=sinx, then

f′(x)=lim⁡h→0sin⁡(x+h)−sin⁡xh. f'(x)=\lim_{h\to 0}\frac{\sin(x+h)-\sin x}{h}. f′(x)=h→0lim​hsin(x+h)−sinx​.

Using sin⁡(x+h)=sin⁡xcos⁡h+cos⁡xsin⁡h\sin(x+h)=\sin x\cos h+\cos x\sin hsin(x+h)=sinxcosh+cosxsinh,

f′(x)=lim⁡h→0(sin⁡xcos⁡h−1h+cos⁡xsin⁡hh). f'(x)=\lim_{h\to 0}\left(\sin x\frac{\cos h-1}{h}+\cos x\frac{\sin h}{h}\right). f′(x)=h→0lim​(sinxhcosh−1​+cosxhsinh​).

Applying the two standard limits gives

ddx(sin⁡x)=cos⁡x. \boxed{\frac{d}{dx}(\sin x)=\cos x}. dxd​(sinx)=cosx​.

A similar argument using the cosine addition formula produces

ddx(cos⁡x)=−sin⁡x. \boxed{\frac{d}{dx}(\cos x)=-\sin x}. dxd​(cosx)=−sinx​.

Check your own exam board specification for the precise scope required. The algebraic method for small positive integer powers is central, while the exact wording and emphasis can vary.

Embedded exam-style question

Question: The curve CCC has equation

y=2x3−5x. y=2x^3-5x. y=2x3−5x.

Use differentiation from first principles to find dydx\dfrac{dy}{dx}dxdy​. You must show each stage of your working.

Answer:

Let f(x)=2x3−5xf(x)=2x^3-5xf(x)=2x3−5x. Then

f(x+h)=2(x+h)3−5(x+h). f(x+h)=2(x+h)^3-5(x+h). f(x+h)=2(x+h)3−5(x+h).

Therefore,

f′(x)=lim⁡h→02(x+h)3−5(x+h)−(2x3−5x)h. f'(x)=\lim_{h\to 0}\frac{2(x+h)^3-5(x+h)-(2x^3-5x)}{h}. f′(x)=h→0lim​h2(x+h)3−5(x+h)−(2x3−5x)​.

Expanding and simplifying the numerator gives

f′(x)=lim⁡h→06x2h+6xh2+2h3−5hh. f'(x)=\lim_{h\to 0}\frac{6x^2h+6xh^2+2h^3-5h}{h}. f′(x)=h→0lim​h6x2h+6xh2+2h3−5h​.

After cancelling hhh,

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

Thus,

dydx=6x2−5. \boxed{\frac{dy}{dx}=6x^2-5}. dxdy​=6x2−5​.

Try 4 more differentiation from first principles exam questions. The MathsGenie question bank includes worked solutions and mark schemes so that you can compare both your answer and your method.

Further exam-style practice questions

Question 1

Use first principles to show that the derivative of f(x)=5x2+3x−1f(x)=5x^2+3x-1f(x)=5x2+3x−1 is 10x+310x+310x+3.

Answer:

f(x+h)−f(x)h=5(x+h)2+3(x+h)−1−(5x2+3x−1)h \frac{f(x+h)-f(x)}{h}=\frac{5(x+h)^2+3(x+h)-1-(5x^2+3x-1)}{h} hf(x+h)−f(x)​=h5(x+h)2+3(x+h)−1−(5x2+3x−1)​ =10xh+5h2+3hh=10x+5h+3. =\frac{10xh+5h^2+3h}{h}=10x+5h+3. =h10xh+5h2+3h​=10x+5h+3.

Taking the limit as h→0h\to 0h→0 gives

f′(x)=10x+3. \boxed{f'(x)=10x+3}. f′(x)=10x+3​.

Question 2

Given f(x)=4−3x2f(x)=4-3x^2f(x)=4−3x2, use first principles to find f′(x)f'(x)f′(x) and hence find the gradient when x=2x=2x=2.

Answer:

Applying the definition and simplifying gives

f′(x)=lim⁡h→0(−6x−3h)=−6x. f'(x)=\lim_{h\to 0}(-6x-3h)=-6x. f′(x)=h→0lim​(−6x−3h)=−6x.

At x=2x=2x=2,

f′(2)=−6(2)=−12. f'(2)=-6(2)=\boxed{-12}. f′(2)=−6(2)=−12​.

The derivative is a function giving the gradient at a general value of xxx. Substitution is only performed after that function has been found.

Question 3

Use first principles to differentiate f(x)=3x3+2f(x)=3x^3+2f(x)=3x3+2.

Answer:

f′(x)=lim⁡h→03(x+h)3+2−(3x3+2)h. f'(x)=\lim_{h\to 0}\frac{3(x+h)^3+2-(3x^3+2)}{h}. f′(x)=h→0lim​h3(x+h)3+2−(3x3+2)​.

Expansion and cancellation give

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

Therefore,

f′(x)=9x2. \boxed{f'(x)=9x^2}. f′(x)=9x2​.

Common mistakes in differentiation from first principles

Using the power rule instead of the definition

If a question says from first principles, applying ddx(xn)=nxn−1\dfrac{d}{dx}(x^n)=nx^{n-1}dxd​(xn)=nxn−1 does not demonstrate the required method. You may use the rule afterwards to check your answer, but your submitted proof must begin with the limit definition.

Subtracting f(x)f(x)f(x) incorrectly

The whole expression for f(x)f(x)f(x) must be subtracted. For example,

−(3x2−4x+7)=−3x2+4x−7. -(3x^2-4x+7)=-3x^2+4x-7. −(3x2−4x+7)=−3x2+4x−7.

Missing the brackets often creates sign errors and prevents the terms independent of hhh from cancelling.

Cancelling terms instead of factors

You can cancel a common factor, not individual terms joined by addition. First rewrite

2xh+h2=h(2x+h) 2xh+h^2=h(2x+h) 2xh+h2=h(2x+h)

before cancelling hhh with the denominator.

Setting h=0h=0h=0 too early

Substituting h=0h=0h=0 before cancellation creates division by zero. Simplify the quotient first, then evaluate its limit.

Forgetting the limit notation

Keep lim⁡h→0\lim_{h\to 0}limh→0​ in your working until the denominator has been cancelled. This shows that you understand the derivative as a limiting value rather than an ordinary substitution.

Confusing a derivative with a gradient at a point

The derivative f′(x)f'(x)f′(x) usually depends on xxx. A numerical gradient is obtained only after substituting the specified coordinate into the derivative.

How to revise differentiation from first principles

First, memorise the definition accurately and practise finding f(x+h)f(x+h)f(x+h). Most errors in this topic come from expansion and signs rather than from the underlying calculus.

Next, practise complete proofs without looking at a model answer. Use the MathsGenie differentiation from first principles revision page, the interactive lesson and the worked-example videos. OCR students can also use the first principles for powers of xxx resource.

Finally, complete topic questions before moving to mixed past papers and predicted papers. Mark every line against the mark scheme, since a correct final derivative may not earn full credit if the required limit, expansion or cancellation is missing.

Students reviewing earlier course content can also use the GCSE Maths topics by exam board and tier checklist to identify algebra skills that may need strengthening.

Conclusion

Differentiation from first principles establishes the derivative as the limiting gradient of a chord. The essential process is to form f(x+h)−f(x)f(x+h)-f(x)f(x+h)−f(x), expand accurately, factor and cancel hhh, and only then take the limit as hhh approaches zero.

For exam preparation, learn the definition exactly, show every algebraic stage and distinguish a general derivative from the gradient at a particular point. MathsGenie’s lesson, videos, practice questions and mark schemes provide a structured way to consolidate the method before attempting mixed past papers.

Sources and referenced URLs

  • https://mathsgenie.co.uk/a-level/maths/edexcel/as-pure-mathematics-12-2-differentiation-from-first-principles
  • https://mathsgenie.co.uk/a-level/maths/edexcel/as-pure-mathematics-12-2-differentiation-from-first-principles/questions/q1
  • https://mathsgenie.co.uk/as-level/maths/edexcel/as-pure-mathematics-12-2-differentiation-from-first-principles/lessons
  • https://mathsgenie.co.uk/a-level/maths/edexcel/as-pure-mathematics-12-2-differentiation-from-first-principles/videos
  • https://mathsgenie.co.uk/a-level/maths/ocr/differentiation-from-first-principles-for-powers-of-x
  • https://old-asset.mathsgenie.co.uk/resources/as-pure-differentiation-first-principles.pdf
  • https://mathsgenie.co.uk/blog/gcse-maths-topics-by-exam-board-and-tier
  • What is differentiation from first principles?
  • Why can you not substitute $h=0$ immediately?
  • The step-by-step first-principles method
  • Differentiation from first principles worked examples
  • First principles for sine and cosine
  • Embedded exam-style question
  • Further exam-style practice questions
  • Common mistakes in differentiation from first principles
  • How to revise differentiation from first principles
  • Conclusion
  • Sources and referenced URLs

Frequently Asked Questions

How helpful was this article?
Add as a preferred source on Google

More from the blog

20 Nov 2026

Sequences and the Nth Term GCSE Maths Guide

Learn sequences and the nth term for GCSE Maths with step-by-step methods, worked examples, common mistakes, exam-style questions and clear answers.

20 Nov 2026

Marks Needed for Grade 4 AQA GCSE Maths

Find the marks needed for grade 4 in AQA GCSE Maths Foundation, why grade boundaries change, and which topics to revise to reach grade 4.

20 Nov 2026

Marks Needed for Grade 9 AQA GCSE Maths

Understand the marks needed for grade 9 AQA GCSE Maths, how Higher-tier boundaries work, and how to use topic revision and past papers to improve your scores.

20 Nov 2026

Marks Needed for Grade 5 Edexcel GCSE Maths

Find the marks needed for grade 5 in Edexcel GCSE Maths Foundation, understand changing grade boundaries, and plan focused revision with practical exam advice.

1m+ Students Can't Be Wrong

What GCSE and A-level students say after revising with MathsGenie.

Harvey B. avatar

Harvey B.

Student

“This is such an amazing platform, it offers everything needed to improve your grade in a time efficient manor. Personally I love the videos as I am able to find areas that I am weak at in the practice papers.”
Tameem R. avatar

Tameem R.

Student

“Genuinely took me from a grade 4 in maths to achieving a grade 8 in my GCSE's in less than a few months. Best mathematics revision website for those who are aiming to get those high grades.”
Anyim P. avatar

Anyim P.

Student

“Genuinely I think every maths student should have this site. It takes you through the entire AS and A level Maths course, alongside exam questions with step by step solutions.”
Muhammad A. avatar

Muhammad A.

Student

“predicted papers are very useful and i believe there's not a better website for GCSE maths in the UK”
Rayan K. avatar

Rayan K.

Student

“Best Maths Resource out there! Absolutely amazing videos and very concise explantions on everything. Don't even get me started on the loads of exam question/worksheets that are so helpful. And it's all free!”
Dee avatar

Dee

Student

“The best Maths resource site in the world! They have it all and do a great job of keeping everything up to date. I still don't know how they are able to make this free for all. You are truly amazing.”
Hamid I. avatar

Hamid I.

Student

“They have helped me with my A level Maths performance significantly and I jumped from a grade U to a Grade A in only 2-3 months. I HIGHLY recommend to Maths students especially for A level.”
Sophie avatar

Sophie

Student

“MathsGenie's YouTube videos and worksheets are amazing. The videos go into such great depth but in a way that's simple to understand.”
Maria E. avatar

Maria E.

Student

“Amazing website! Truly helped with my GCSEs - I was a very poor student. Managed to go up and reach all grade 6-9's from U-4's. Would definitely recommend :)”
Justine K. avatar

Justine K.

Student

“Absolutely brilliant website with well organised, well written resources for learning or revising maths. I never hesitate to recommend mathsgenie to my students.”
Daryl G. avatar

Daryl G.

Student

“Took me a bit of getting used to but this new site is excellent. I found the old one really useful but this is next level. I share it with all my colleagues and students.”
Binuk J. avatar

Binuk J.

Student

“I used to be really bad at math. My first GCSE mocks I had a 2 but after I found MathsGenie I jumped from 2 to 4 under 3 months.”
Jourdie avatar

Jourdie

Student

“Improved my grade, I used to be borderline passing maths now I'm performing much better. There are videos, practice papers, solutions, exam questions, past GCSE papers all for free. This is really useful.”
Olla avatar

Olla

Student

“Honestly, it's super great. Easy, with the explanation on the side. Every topic also has more than 50 questions, making you feel more confident in doing different types f question in one topic. Try it!”

Ready to breeze through your GCSEs?IGCSEs?A-Levels?AS Levels?GCSEs?GCSEs?

Sign inStart studying for free

Footer

Quick links

  • GCSE past papers
  • GCSE question bank
  • GCSE worksheets
  • GCSE revision guides
  • GCSE lessons
  • Literary Hub
  • Free maths course
  • A Level past papers
  • A Level question bank
  • Old MathsGenie

Tools

  • Revision planner
  • Mock exam builder
  • Ask Genie AI
  • Answer marking
  • Grade calculator
  • Pricing

Company

  • About MathsGenie
  • Maths Genie on Google Play
  • Careers
  • Contact
  • For educators
  • For parents
  • Student ambassadors
  • More resources
  • Blog
  • Student questions
  • Sitemap
  • Privacy policy
  • Terms of Service
  • Cookie policy
  • Report a bug

GCSE

  • Biology
  • Chemistry
  • English Language
  • English Literature
  • Geography
  • Maths
  • Old Maths
  • Physics
  • Statistics

IGCSE

  • Biology
  • Business
  • Chemistry
  • Computer Science
  • English Language
  • English Literature
  • Geography
  • Maths
  • Physics

A Level

  • Biology
  • Business
  • Chemistry
  • Economics
  • Maths
  • Old Maths
  • Physics
  • Psychology
  • Sociology

AS Level

  • Biology
  • Business
  • Chemistry
  • Economics
  • Maths
  • Physics
  • Psychology
  • Religious Studies
  • Sociology
MathsGenie logo

© 2026 MyDojo, Inc. All rights reserved. MyDojo, Inc. does business as MathsGenie.

Exam board names are used for identification only and do not imply affiliation or endorsement.