James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
A level Maths › Pure · Differentiation › Differentiation from first principles

Differentiation from first principles

How to find a derivative from its definition, as the limit of the gradient of a chord, for powers of x including 1x and x, and (Year 2) for sinx and cosx. Higher derivatives too.

Pure 7.1Years 1 & 2≈ 75 min to work through
Before you start: gradients of tangents and the basic rules of differentiation. See Introduction to differentiation.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Differentiate polynomials, 1x and x from first principlesY1/Y2
  • Find higher derivatives and spot patterns in f(n)(x)Y1/Y2
  • Prove the derivatives of sinx and cosx from first principlesY2

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

The gradient of a curve at a point cannot be found from one point alone: a gradient needs two points. The trick is to take a second point a distance h away, find the gradient of the chord, and ask what happens as h shrinks to 0. That "what happens as" is a limit, and it is the foundation of all of calculus.

2.1 Differentiation from first principles

The derivative from first principles
f′(x)=limh→0f(x+h)−f(x)h
Worked example 1No calculator
Differentiate f(x)=2x2−3x from first principles.
f(x+h)−f(x)=2(x+h)2−3(x+h)−2x2+3x=4xh+2h2−3h
f(x+h)−f(x)h=4x+2h−3
Cancel h before taking the limit.
f′(x)=limh→0(4x+2h−3)=4x−3

The two harder cases need an algebra trick before h can be cancelled. These are the ones examiners like.

Worked example 2No calculator
Differentiate f(x)=1x from first principles.
1x+h−1x=x−(x+h)x(x+h)=−hx(x+h)
Combine the fractions first.
Divide by h: −1x(x+h)
f′(x)=limh→0−1x(x+h)=−1x2
Worked example 3No calculator
Differentiate f(x)=x from first principles.
x+h−xh×x+h+xx+h+x
Multiply by the conjugate, as when rationalising a denominator.
=(x+h)−xh(x+h+x)=1x+h+x
f′(x)=12x, as expected from ddxx1/2=12x−1/2.
Presentation

Notation matters in first-principles proofs. Write "limh→0" on every line until the limit is actually taken, and do not substitute h=0 while h is still in a denominator. Markschemes often give the final A1 only if the limit is written correctly.

2.2 Year 2: sin x and cos x from first principles

At A level you also need the derivatives of sinx and cosx from first principles. You may use the compound angle formulae and the small-angle results sinhh→1 and cosh−1h→0 as h→0, where h is in radians.

Worked example 4No calculator
Prove from first principles that the derivative of sinx is cosx.
f′(x)=limh→0sin(x+h)−sinxh
=limh→0sinxcosh+cosxsinh−sinxh
Expand with the compound angle formula.
=limh→0(sinx·cosh−1h+cosx·sinhh)
=sinx·0+cosx·1=cosx

The proof for cosx is the same, starting from cos(x+h)=cosxcosh−sinxsinh, and gives −sinx.

2.3 Higher derivatives

Differentiating again gives the second derivative f′′(x)=d2ydx2, and so on. The nth derivative is written f(n)(x) or dnydxn. Patterns in higher derivatives are often proved by induction.

Worked example 5No calculator
Find the first three derivatives of f(x)=xex and suggest a formula for f(n)(x).
f′(x)=ex+xex=(x+1)ex
f′′(x)=ex+(x+1)ex=(x+2)ex, f′′′(x)=(x+3)ex
f(n)(x)=(x+n)ex
Proved by induction on the Proof by induction page.
Worked example 6 (faded)No calculator
Find f(n)(x) for f(x)=e3x.
f′(x)=3e3x, f′′(x)=9e3x, so f(n)(x)= 3ⁿe³ˣ  ← you work this out

3Explore it

The red line is the chord from x to x+h. Shrink h towards 0 and watch the chord gradient approach the gradient of the tangent (green).

4Common mistakes & exam tips

Common mistakes

  • Substituting h=0 before cancelling, which gives 00.
  • Dropping "limh→0" from the working, or writing it after the limit has been taken.
  • Expanding (x+h)2 as x2+h2.
  • Thinking that a function equal to 00 at a point has no limit there.

Exam tips

  • In first-principles questions, the final answer is usually known in advance: the marks are for the method, so show every line.
  • For 1x-type functions combine fractions; for roots multiply by the conjugate.
  • If asked for f(n)(x), write out at least three derivatives so the pattern is clear.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Differentiate f(x)=x3 from first principles.
3x2h+3xh2+h3h=3x2+3xh+h2→3x2
Problem solvingP2
Differentiate f(x)=1x+1 from first principles.
−hh(x+1)(x+h+1)→−1(x+1)2
Problem solvingP3
Differentiate f(x)=1x from first principles.
Combine, then multiply by the conjugate: −1xx+h(x+x+h)→−12x3/2

6Exam-style questions

Original exam-style questions with full markschemes. Edexcel papers allow a calculator throughout, but questions labelled “No calculator” practise exact working. Allow about 1.2 minutes per mark.

Question 1No calculator[4 marks]

Use differentiation from first principles to find the derivative of f(x)=x2−5x.

limh→0(x+h)2−5(x+h)−(x2−5x)hM1
=limh→02xh+h2−5hhA1
=limh→0(2x+h−5)A1
=2x−5A1
Question 2No calculator[5 marks]

Use differentiation from first principles to show that the derivative of f(x)=1x+1 is −1(x+1)2.

limh→01x+h+1−1x+1hM1
(x+1)−(x+h+1)(x+h+1)(x+1)M1
=−h(x+h+1)(x+1)A1
limh→0−1(x+h+1)(x+1)A1
=−1(x+1)2AG A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try real Edexcel A level questions. Past papers and markschemes are on the Pearson website.

PaperQuestionFocusDifficulty
June 2024 · Paper 1Q4Differentiate x² from first principles★☆☆
June 2022 · Paper 2Q4Differentiate 2x² from first principles★☆☆
June 2018 · Paper 2Q9Prove the derivative of cos θ from first principles★★☆
June 2023 · Paper 1Q12Prove the derivative of sin x from first principles★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake