Differentiation from First Principles: Gradients, Limits and the Derivative
Further Mathematics · From the gradient of a straight line to the gradient of a curve, the limit definition dy/dx = lim (f(x + h) − f(x))/h, five-step worked examples for x², 3x² + 2x, x³ and 1/x, the power rule, rates of change, and tangents.
Gradient means steepness
The gradient of a road, roof or ramp tells you how steep it is. For a straight line through two points:
gradient = change in y ÷ change in x = (y₂ − y₁)/(x₂ − x₁)
A straight line has the same gradient everywhere. A curve does not: the graph of y = x2 is gentle near the origin and gets steeper as x grows. So how do we find the gradient of a curve at one point?
A real-life story
You drive 40 km by 8:00 and 70 km by 9:00. Your average speed was 30 km/h. But what was your speed exactly at 8:30? To answer that, we look at shorter and shorter time intervals around 8:30. The value they approach is the instantaneous rate of change. Finding it is called differentiation.
The first-principles idea
Take a point P on the curve and a second point Q a small step h further along. The line PQ (a chord) has a gradient we can calculate. Now slide Q towards P: as h gets smaller, the chord turns into the tangent at P, and its gradient becomes the gradient of the curve at P.
If P is (x, f(x)) and Q is (x + h, f(x + h)), the chord gradient is [f(x + h) − f(x)]/h. Letting h → 0 gives the derivative:
dy/dx = f′(x) = lim (h → 0) [f(x + h) − f(x)] / h
Why divide by h? The gradient is rise ÷ run, and h is the run. Looking only at the rise would ignore how far you moved along.
The five steps
- Write down f(x + h).
- Expand it fully.
- Subtract f(x).
- Divide every term by h.
- Let h → 0.
Worked examples
The power rule
First principles lead to the rule used for the rest of calculus:
If y = axn, then dy/dx = naxn − 1
- The derivative of a constant is 0: a horizontal line has zero gradient.
- The derivative of mx + c is m: a straight line has a constant gradient.
- Differentiate a sum term by term: y = 4x3 − 5x + 7 gives dy/dx = 12x2 − 5.
Using the derivative
Gradient at a point. Substitute the x-value into dy/dx.
Equation of a tangent. Find the point, the gradient, then use y − y₁ = m(x − x₁).
Rate of change. If s = 5t2 metres after t seconds, the velocity is ds/dt = 10t. At t = 2 s the velocity is 20 m/s.
Common mistakes
- Forgetting to expand (x + h)2: it is x2 + 2xh + h2, not x2 + h2.
- Sign errors when subtracting f(x), especially with negative terms.
- Cancelling h too early, before subtracting.
- Putting h = 0 before dividing, which gives 0/0.
- Forgetting to write "lim (h → 0)" in the working.
Practice
- Differentiate y = 4x2 from first principles.
- Differentiate y = x2 + 5x from first principles.
- Differentiate y = 2x3 from first principles.
- Find the gradient of y = x2 − 3 at x = 1.
- Find the equation of the tangent to y = x3 at x = 2.
- Challenge: differentiate y = √x from first principles. (Hint: multiply the top and bottom by √(x + h) + √x.)
Answers: 1. [4(x + h)2 − 4x2]/h = 8x + 4h → 8x · 2. (2xh + h2 + 5h)/h = 2x + h + 5 → 2x + 5 · 3. (6x2h + 6xh2 + 2h3)/h → 6x2 · 4. dy/dx = 2x = 2 · 5. Point (2, 8), gradient 3(4) = 12, so y = 12x − 16 · 6. [√(x + h) − √x]/h = 1/[√(x + h) + √x] → 1/(2√x)
Practise these topics with the Further Mathematics questions on the Practice page.
Practise Differentiation: 10 questions in study mode, with an explanation after each answer.
Start Practice