Practice Maths

Differentiation from First Principles

Key Terms

The derivative of f at x is defined as: f′(x) = limh→0 (f(x+h) − f(x)) / h.
This is called differentiation from first principles — we derive the gradient function directly from the limit definition.
f′(x) gives the gradient of the tangent to y = f(x) at the point (x, f(x)).
Notation: f′(x), dy/dx, y′, and d/dx[f(x)] all mean the derivative.
Steps: (1) Write f(x+h). (2) Form f(x+h)−f(x). (3) Divide by h and simplify. (4) Take limh→0.
Key results from first principles: d/dx(c) = 0, d/dx(x) = 1, d/dx(x²) = 2x, d/dx(x³) = 3x².
First Principles Definition of the Derivative
f′(x) = limh→0 f(x + h) − f(x)h

Also written: dy/dx = limΔx→0 Δy/Δx
f(x) f′(x) (from first principles)
c (constant)0
ax + ba
2x
ax² + bx + c2ax + b
3x²

Tangent to y = x² at the point (1, 1). Gradient = f′(1) = 2.

x y 1 2 −1 1 4 y=x² tangent (1,1) f′(1)=2
Hot Tip The most common error in first principles is forgetting to cancel h before taking the limit. After dividing by h, every term in the numerator must contain h except the terms that become f′(x). If you cannot cancel h, recheck your expansion of f(x+h).

Worked Example 1 — First principles for f(x) = x²

Step 1: f(x+h) = (x+h)² = x² + 2xh + h²

Step 2: f(x+h) − f(x) = 2xh + h² = h(2x + h)

Step 3: [f(x+h) − f(x)] / h = 2x + h

Step 4: f′(x) = limh→0 (2x + h) = 2x

Worked Example 2 — First principles for f(x) = 3x + 5

Step 1: f(x+h) = 3(x+h) + 5 = 3x + 3h + 5

Step 2: f(x+h) − f(x) = 3h

Step 3: 3h / h = 3

Step 4: f′(x) = limh→0 3 = 3

This confirms the gradient of any linear function f(x) = 3x + 5 is always 3.

What Does a Derivative Actually Measure?

The Key Ideas give you the definition f′(x) = limh→0 [f(x+h) − f(x)] / h, but it is worth understanding geometrically why this limit is the right thing to compute. Draw the curve y = f(x) and pick two nearby points: P = (x, f(x)) and Q = (x+h, f(x+h)). The line through P and Q is called a secant, and its gradient is exactly the difference quotient [f(x+h) − f(x)] / h. As h shrinks towards zero, Q slides along the curve towards P, and the secant rotates to become the tangent at P. The limiting gradient of that tangent is f′(x). This is why the derivative measures instantaneous rate of change: it is the gradient of the curve at one precise point.

Why You Must Cancel h Before Taking the Limit

The limit limh→0 [f(x+h) − f(x)] / h cannot be evaluated by simply substituting h = 0 into the difference quotient before simplifying, because doing so gives 0/0, which is undefined. The whole point of the algebraic steps is to rewrite the expression so that the h in the denominator cancels against a common factor of h in the numerator. Only once h has been cancelled can you safely substitute h = 0 (or rather, take the limit as h approaches 0). Consider f(x) = x²: you expand (x+h)² = x² + 2xh + h², subtract f(x) = x² to get 2xh + h², then factor out h: h(2x + h). Dividing by h (valid because h ≠ 0 during the limit process) gives 2x + h. Now h → 0 gives 2x cleanly. The factoring step is non-negotiable.

Exam Tip: Show all four steps explicitly — examiners want to see (1) the expression for f(x+h), (2) the subtraction f(x+h) − f(x), (3) division by h with simplification, and (4) the limit. Writing lim before the expression in step 4 (not earlier) is the correct notation. Students who write “let h = 0” without first cancelling h will lose marks.

Deriving d/dx(x³) = 3x² — A Complete Proof

This derivation requires the binomial expansion (x+h)³ = x³ + 3x²h + 3xh² + h³. Subtracting f(x) = x³ gives f(x+h) − f(x) = 3x²h + 3xh² + h³. Factor out h: h(3x² + 3xh + h²). Divide by h to get 3x² + 3xh + h². Now every remaining term contains h except the leading 3x², so as h → 0, the limit is 3x². Notice the pattern: differentiating xn brings the power down as a coefficient and reduces the power by one. First principles for x³ is the most complex derivation expected at Year 11 level. The pattern it confirms — d/dx(xn) = nxn−1 — is the power rule, which will be used constantly throughout calculus.

Finding the Gradient at a Specific Point and the Tangent Equation

Once you have f′(x) from first principles, substituting a specific x-value gives the gradient of the tangent at that point. For example, if f(x) = x² − 4x + 3, first principles gives f′(x) = 2x − 4. At x = 3: f′(3) = 2(3) − 4 = 2. The point on the curve is (3, f(3)) = (3, 0). The tangent equation uses point-gradient form: y − 0 = 2(x − 3), giving y = 2x − 6. A horizontal tangent occurs where f′(x) = 0; for this function, 2x − 4 = 0 so x = 2. This point, (2, −1), is the vertex of the parabola — tangent is horizontal exactly at the turning point.

Exam Tip: When asked to “find the gradient function from first principles”, the answer should be a general expression in x (like 2x − 4), not a single number. When asked to “find the gradient at the point (3, 0)”, evaluate the gradient function at x = 3 to get a number. These are two different types of answer — read the question carefully.

Connecting the Derivative to the Shape of the Curve

The sign of f′(x) tells you about the curve's shape. Where f′(x) > 0, the tangent slopes upward and the function is increasing. Where f′(x) < 0, the function is decreasing. Where f′(x) = 0, the tangent is horizontal — this occurs at turning points (maxima or minima) for polynomials. For f(x) = x², f′(x) = 2x is negative for x < 0 (parabola is decreasing towards its vertex), zero at x = 0 (the minimum), and positive for x > 0 (increasing away from the vertex). This geometric interpretation is just as important as the algebra.

Mastery Practice

  1. Fluency

    Using first principles, differentiate each function. Show all four steps.

    1. (a) f(x) = 7
    2. (b) f(x) = 4x
    3. (c) f(x) = 2x + 9
    4. (d) f(x) = −3x + 1
  2. Fluency

    Differentiate from first principles.

    1. (a) f(x) = x²
    2. (b) f(x) = 3x²
    3. (c) f(x) = −x²
    4. (d) f(x) = x² + 5
  3. Fluency

    Differentiate from first principles.

    1. (a) f(x) = x² + 3x
    2. (b) f(x) = 2x² − 4x + 1
    3. (c) f(x) = −x² + 6x − 2
  4. Fluency

    Evaluate the derivative at the given point using first principles.

    1. (a) f(x) = x² at x = 3
    2. (b) f(x) = 2x + 1 at x = 5
    3. (c) f(x) = x² + 4x at x = −1
    4. (d) f(x) = −2x² at x = 2
  5. Understanding

    First principles for cubics.

    Recall: (x+h)³ = x³ + 3x²h + 3xh² + h³. Factor h from the numerator before cancelling.
    1. (a) Using first principles, show that if f(x) = x³, then f′(x) = 3x².
    2. (b) Hence find the gradient of the tangent to y = x³ at (2, 8) and at (−1, −1).
    3. (c) At what point on y = x³ is the gradient of the tangent equal to 12?
  6. Understanding

    Interpreting the derivative.

    1. (a) Using first principles, find f′(x) for f(x) = x² − 6x + 9. What does f′(3) represent?
    2. (b) For g(x) = 2x² + x, find g′(x) from first principles. Find the x-value where g′(x) = 5.
    3. (c) A function h(x) has h′(x) = 4x − 2. If this was derived from a quadratic by first principles, what was the original function? (There are many answers — give one.)
  7. Understanding

    Gradient of a tangent from first principles.

    1. (a) Find the gradient of the tangent to y = x² + 2x at the point (3, 15).
    2. (b) Find the equation of the tangent to y = x² + 2x at (3, 15). Express in the form y = mx + c.
    3. (c) For what values of x is the tangent to y = x² + 2x horizontal?
  8. Understanding

    Comparing first principles results.

    1. (a) Differentiate f(x) = ax + b from first principles. Show your answer is independent of x.
    2. (b) Differentiate f(x) = ax² from first principles. What is f′(x)?
    3. (c) Use your results to write down f′(x) for f(x) = 5x² − 3x + 8 (without re-doing first principles in full).
  9. Problem Solving

    First principles with a non-standard function.

    Challenge. Consider f(x) = x² + x³.
    1. (a) Write f(x+h) − f(x) in full and factorise out h.
    2. (b) Hence find f′(x) from first principles.
    3. (c) Find all x-values where the tangent to y = f(x) is parallel to the line y = 5x.
  10. Problem Solving

    Gradient functions and geometry.

    Challenge. A parabola has equation y = x² − 4x + 3.
    1. (a) Differentiate from first principles to find y′.
    2. (b) Find the coordinates of the point on the parabola where the tangent has gradient −2.
    3. (c) Find the equation of the tangent at this point.
    4. (d) Find the x-coordinate of the vertex of the parabola using your derivative. Verify by completing the square.