---
title: "Differentiation from First Principles"
description: "Write the chord gradient as [f(x + h) - f(x)] / h, simplify it algebraically, and let h approach zero to get the derivative. This is the definition every rule later rests on."
canonical: https://lightmysky.com/learn/mathematics/differentiation-from-first-principles-mt_pdfPztEjw_
source: https://lightmysky.com/learn/mathematics/differentiation-from-first-principles-mt_pdfPztEjw_.md
retrieved: 2026-09-02
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Differentiation from First Principles

Write the chord gradient as [f(x + h) - f(x)] / h, simplify it algebraically, and let h approach zero to get the derivative. This is the definition every rule later rests on.

Subject: Mathematics · Area: Calculus & Analysis · Ages 16 to 17
Page: https://lightmysky.com/learn/mathematics/differentiation-from-first-principles-mt_pdfPztEjw_

## Ready when they can

- Differentiate f(x) = x² from first principles, showing the cancellation of h
- Differentiate f(x) = x³ from first principles
- Say why the h in the denominator can only be cancelled while h is not zero

## Lesson: Differentiation from First Principles

Last stop you shrank chords with a calculator and found the gradient of y = x² at x = 2, then again at x = 5. That works, but it answers one point at a time, and the Ridgeway crew wants the steepness all along the ramp. Every shortcut you meet later is proved by running this calculation once. There is a better move, and it is the one algebra is for: do the shrinking once with a letter instead of a number. The answer that comes out is not a number at all. It is a rule that gives the gradient at every x.

Set it up in function notation. Writing f(x + h) means putting x + h everywhere an x appears in the rule, and if no x appears, nothing changes. The chord now runs from the point (x, f(x)) to the point (x + h, f(x + h)), so the rise is f(x + h) - f(x) and the run is h. That makes the chord gradient [f(x + h) - f(x)] / h, which is last stop's calculation with letters in place of numbers. The value it settles on as h goes to zero is written f'(x) and is called the derivative.

*(drawing: The same four steps every time, whatever the rule f happens to be.)*

**Example.** Take f(x) = x². Then f(x + h) = (x + h)², which expands to x² + 2xh + h². Subtracting f(x) = x² leaves 2xh + h², so the chord gradient is (2xh + h²) / h. Every term on top carries an h, so factorise it out: h(2x + h) / h. Cancel the h and the fraction is gone, leaving 2x + h. Now let h go to zero and what is left is 2x. So f'(x) = 2x. Check it against last stop: at x = 2 that gives 4, and at x = 5 it gives 10.

The cancelling step is the one to be careful about, because it is where the whole method could go wrong. While the chord exists at all, the two points are apart, so h is not zero and dividing top and bottom by h is allowed. Setting h = 0 first would leave 0 / 0, which is nothing. So the order is fixed: cancel while h is still alive, and only then let it go to zero. When f is itself a fraction, put its two fractions over one denominator first. And when the limit comes, x + h becomes x.

*(drawing: Cancel first, take the limit second. Swapping them leaves 0 divided by 0.)*

**Example.** Now f(x) = x³. Expanding (x + h)³ takes one more line: (x + h)(x² + 2xh + h²) gives x³ + 3x²h + 3xh² + h³. Subtracting x³ leaves 3x²h + 3xh² + h³, so the chord gradient is that over h. Every term on top has an h in it, so cancelling one h from each gives 3x² + 3xh + h². Letting h go to zero kills the last two terms, because both still carry an h. So f'(x) = 3x².

**Recap.** First principles turns last stop's shrinking chords into algebra. Write the chord gradient as [f(x + h) - f(x)] / h, expand and simplify until every term on top carries an h, cancel that h while it is still non-zero, and only then let h go to zero. What survives is f'(x), the derivative: a rule giving the gradient at every x. For x² it comes out as 2x, and for x³ as 3x².

## Practice

24 questions on this page, each with its working shown.

## Needs first

- [The Gradient of a Curve as a Limit](https://lightmysky.com/learn/mathematics/the-gradient-of-a-curve-as-a-limit-mt_LAlhcwVjln)
- [Simplifying Algebraic Fractions](https://lightmysky.com/learn/mathematics/simplifying-algebraic-fractions-mt_scDNSoz3eW)

## Opens up

- [The Power Rule for Differentiating Polynomials](https://lightmysky.com/learn/mathematics/the-power-rule-for-differentiating-polynomials-mt_l7f4j44bR3)
