Skip to main content
Examonaut

Topic 7 · Lesson 1 of 6

The gradient as a limit

The gradient of a curve as a limit

A straight line has one gradient everywhere, but a curve's steepness keeps changing. The gradient of a curve at a point PP is defined as the gradient of the tangent there: the straight line that just touches the curve at PP and runs in the same direction.

You cannot find a tangent's gradient from two points, because it touches the curve at only one. So take a second point QQ on the curve and work out the gradient of the chord PQPQ; then slide QQ closer and closer to PP. The diagram shows this for y=x2y = x^2 at P(1,1)P(1, 1): as QQ moves in from x=3x = 3 to x=2x = 2 to x=1.4x = 1.4, the chord gradients are 4, 3, 2.4, and they approach 2, the gradient of the tangent.

xyO1232468P(1, 1)Qtangentgradient 2

Differentiation from first principles

Make this general. Let PP be (x,f(x))(x, f(x)) and QQ be a tiny step hh along, at (x+h,f(x+h))(x + h, f(x + h)). The chord gradient is f(x+h)−f(x)h\frac{f(x + h) - f(x)}{h}. The derivative is what this approaches as hh shrinks to 0:

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

Using this definition directly is called differentiating from first principles. The notation dydx\frac{dy}{dx} means the same as f′(x)f'(x): it reminds you that the derivative is a tiny change in yy divided by a tiny change in xx.

Try it: move P along the curve, then let h shrink. The gradient of the chord PQ settles on the gradient of the tangent, f′(x).

Try it: simulation

Differentiation explorer

Loading the simulation…

Worked example

First principles for x3x^3

Prove from first principles that the derivative of x3x^3 is 3x23x^2.

Show solution
  1. f(x+h)=(x+h)3=x3+3x2h+3xh2+h3f(x + h) = (x + h)^3 = x^3 + 3x^2h + 3xh^2 + h^3 (binomial expansion).
  2. f(x+h)−f(x)h=3x2h+3xh2+h3h=3x2+3xh+h2\frac{f(x + h) - f(x)}{h} = \frac{3x^2h + 3xh^2 + h^3}{h} = 3x^2 + 3xh + h^2. Dividing by hh is allowed because h≠0h \ne 0 while it shrinks.
  3. As h→0h \to 0, the terms 3xh3xh and h2h^2 tend to 0, so f′(x)=lim⁡h→0(3x2+3xh+h2)=3x2f'(x) = \lim_{h \to 0}(3x^2 + 3xh + h^2) = 3x^2.

Worked example

First principles for sin⁡x\sin xA level only

Prove from first principles that the derivative of sin⁡x\sin x is cos⁡x\cos x, where xx is in radians.

Show solution
  1. Use the compound-angle formula: sin⁡(x+h)−sin⁡xh=sin⁡xcos⁡h+cos⁡xsin⁡h−sin⁡xh\frac{\sin(x + h) - \sin x}{h} = \frac{\sin x\cos h + \cos x\sin h - \sin x}{h}.
  2. Group the sin⁡x\sin x terms: =sin⁡x(cos⁡h−1h)+cos⁡x(sin⁡hh)= \sin x\left(\frac{\cos h - 1}{h}\right) + \cos x\left(\frac{\sin h}{h}\right).
  3. For small hh (in radians), cos⁡h≈1−h22\cos h \approx 1 - \frac{h^2}{2} and sin⁡h≈h\sin h \approx h. So cos⁡h−1h≈−h2→0\frac{\cos h - 1}{h} \approx -\frac{h}{2} \to 0 and sin⁡hh→1\frac{\sin h}{h} \to 1.
  4. So the limit is sin⁡x×0+cos⁡x×1=cos⁡x\sin x \times 0 + \cos x \times 1 = \cos x. The same method gives the derivative of cos⁡x\cos x as −sin⁡x-\sin x.

This is why radians matter: in degrees, sin⁡hh\frac{\sin h}{h} does not tend to 1, and the formula would have an extra factor of π180\frac{\pi}{180}.

Practise this topic

Both are part of Premium.