Differentiation · Lesson 1 of 2

Differentiation from first principles

Where the derivative comes from: the gradient of a chord as the gap h shrinks to zero. Limits by cancelling and at infinity, then the four-step method for polynomials, for fractions such as 1/(2x), and for 5/(x² + 3).

22 minYou should already know: Calculus (JAMB bridge) Functions
  1. 1
  2. 2

In General Maths you differentiated with the power rule (see calculus): xnx^n becomes nxn−1nx^{n - 1}. Further Maths asks why. A question that says “from first principles” wants the derivative worked out from the definition, without the rules.

The idea: a chord that shrinks to a tangent

The gradient of a curve at a point PP is the gradient of its tangent there. You can’t measure a tangent’s gradient directly, but you can measure a chord’s. Take a second point QQ a small step hh further along the curve. The chord PQPQ has gradient

f(x+h)−f(x)h\frac{f(x + h) - f(x)}{h}

As hh shrinks, QQ slides towards PP and the chord turns into the tangent:

xPQh
Chord to tangentAs Q slides towards P (h → 0), the chord's gradient becomes the tangent's

So the derivative is the limit of the chord’s gradient as h→0h \to 0. Shrink hh and watch:

Chord to tangentPick a function, shrink h
−1123−224681012xyPQ
6chord gradient, h = 15f′(1) = 2x + 3 at x = 1
[(x + h)² + 3(x + h) − x² − 3x] ÷ h = 2x + 3 + h. With h = 1 the chord's gradient is 6. As h → 0, the terms with h vanish, leaving f′(x) = 2x + 3, which is 5 at x = 1.

Evaluating limits

lim⁡x→af(x)\displaystyle\lim_{x \to a} f(x) means the value f(x)f(x) gets close to as xx gets close to aa. Usually you just put x=ax = a in. But if that gives 00\frac00, the formula has a gap at x=ax = a: factorise, cancel the factor (x−a)(x - a), and then put x=ax = a in:

lim⁡x→3x2−9x−3=lim⁡x→3(x−3)(x+3)x−3=lim⁡x→3 (x+3)=6\begin{aligned} \lim_{x \to 3}\frac{x^2 - 9}{x - 3} &= \lim_{x \to 3}\frac{(x - 3)(x + 3)}{x - 3} \\ &= \lim_{x \to 3}\,(x + 3) = 6 \end{aligned}

When x→∞x \to \infty, divide the top and the bottom by the highest power of xx on the bottom. Every term like 1x\frac1x or 1x2\frac{1}{x^2} then tends to 0:

lim⁡x→∞2x+1x+1=lim⁡x→∞2+1x1+1x=21=2\lim_{x \to \infty}\frac{2x + 1}{x + 1} = \lim_{x \to \infty}\frac{2 + \frac1x}{1 + \frac1x} = \frac{2}{1} = 2
xy36no value herey = (x² − 9) ÷ (x − 3)
A gap in the graph(x² − 9) ÷ (x − 3) is x + 3 with a gap at x = 3: the limit is the height of the gap, 6
xy21y = 2y = (2x + 1) ÷ (x + 1)x → ∞
A limit at infinityAs x grows, (2x + 1) ÷ (x + 1) gets as close to 2 as you like

Worked example

Evaluate lim⁡x→2x2+x−6x2−4\displaystyle\lim_{x \to 2}\frac{x^2 + x - 6}{x^2 - 4}.
  1. Try x = 2

    • Top: 4+2−6=0{4 + 2 - 6 = 0}.
    • Bottom: 4−4=0{4 - 4 = 0}.
    • 00\frac00 has no value, so both must have a factor (x−2)(x - 2).

    Think first. Put x = 2 into the top and the bottom. What do you get?

  2. Factorise

    • Top: x2+x−6=(x+3)(x−2){x^2 + x - 6 = (x + 3)(x - 2)}.
    • Bottom: x2−4=(x+2)(x−2){x^2 - 4 = (x + 2)(x - 2)}.

    Think first. Factorise the top and the bottom.

  3. Cancel

    • Cancel (x−2)(x - 2): (x+3)(x−2)(x+2)(x−2)=x+3x+2{\frac{(x + 3)(x - 2)}{(x + 2)(x - 2)} = \frac{x + 3}{x + 2}}.
    • This is allowed because xx only gets close to 2, so x−2x - 2 is never 0.

    Think first. Which factor goes?

  4. Now put x = 2 in

    • 2+32+2=54{\frac{2 + 3}{2 + 2} = \frac54}.
    • So the limit is 54\frac54.

More: limits

The four-step method

f′(x) = limh→0 [f(x + h) − f(x)] ⁄ h
1. find f(x + h)2. take away f(x)3. divide by h4. let h → 0
From first principlesSimplify until you can divide by h, then let h → 0

The key is step 3: you must be able to cancel hh before you let h→0h \to 0. Putting h=0h = 0 straight into f(x+h)−f(x)h\frac{f(x + h) - f(x)}{h} gives 00\frac00, which means nothing. Some books write δx\delta x for hh and δy\delta y for f(x+h)−f(x)f(x + h) - f(x); the method is the same.

Worked example · WAEC 2019

WAEC 2019 · Paper 2 · Q2

Differentiate from first principles, with respect to xx, (3x2+2x−1)(3x^2 + 2x - 1).

  1. Find f(x + h)

    • f(x+h)=3(x+h)2+2(x+h)−1{f(x + h) = 3(x + h)^2 + 2(x + h) - 1}.
    • Expand the square: 3(x2+2xh+h2)=3x2+6xh+3h2{3(x^2 + 2xh + h^2) = 3x^2 + 6xh + 3h^2}.
    • So f(x+h)=3x2+6xh+3h2{f(x + h) = 3x^2 + 6xh + 3h^2} + 2x+2h−1{+\ 2x + 2h - 1}.

    Think first. Put x + h in place of every x, then expand.

  2. Take away f(x)

    • Take away 3x2+2x−1{3x^2 + 2x - 1}: the 3x23x^2, the 2x2x and the −1-1 cancel.
    • So f(x+h)−f(x)=6xh+3h2+2h{f(x + h) - f(x) = 6xh + 3h^2 + 2h}.

    Think first. Which terms cancel?

  3. Divide by h

    • f(x+h)−f(x)h=6x+3h+2{\frac{f(x + h) - f(x)}{h} = 6x + 3h + 2}.

    Think first. Every term has an h. Divide it out.

  4. Let h → 0

    • The 3h3h term tends to 0.
    • So f′(x)=6x+2{f'(x) = 6x + 2}. The power rule agrees: ddx(3x2+2x−1)=6x+2{\frac{d}{dx}(3x^2 + 2x - 1) = 6x + 2}.

    Think first. Which term disappears?

More: polynomials from first principles

Fractions from first principles

When f(x)f(x) has xx on the bottom, step 2 means taking away two fractions. Put them over a common denominator; the top then has a factor hh that cancels in step 3.

Worked example · WAEC 2012

WAEC 2012 · Paper 2 · Q6

Find, from first principles, the derivative of (3x−12x)\left(3x - \dfrac{1}{2x}\right) with respect to xx.

  1. f(x + h) − f(x)

    • f(x+h)=3(x+h)−12(x+h){f(x + h) = 3(x + h) - \frac{1}{2(x + h)}}.
    • Take away f(x)=3x−12x{f(x) = 3x - \frac{1}{2x}}: f(x+h)−f(x)=3h−[12(x+h)−12x]{f(x + h) - f(x) = 3h - \left[\frac{1}{2(x + h)} - \frac{1}{2x}\right]}.

    Think first. Write f(x + h), then take away f(x).

  2. The fractions over one denominator

    • 12(x+h)−12x=x−(x+h)2x(x+h){\frac{1}{2(x + h)} - \frac{1}{2x} = \frac{x - (x + h)}{2x(x + h)}}.
    • Simplify the top: −h2x(x+h){\frac{-h}{2x(x + h)}}.
    • So f(x+h)−f(x)=3h+h2x(x+h){f(x + h) - f(x) = 3h + \frac{h}{2x(x + h)}}.

    Think first. The common denominator is 2x(x + h). What is the top?

  3. Divide by h

    • f(x+h)−f(x)h=3+12x(x+h){\frac{f(x + h) - f(x)}{h} = 3 + \frac{1}{2x(x + h)}}.

    Think first. Divide both terms by h.

  4. Let h → 0

    • x+h→x{x + h \to x}, so f′(x)=3+12x2{f'(x) = 3 + \frac{1}{2x^2}}.

More: fractions from first principles

Your turn

WAEC 2018 · Paper 2 · Q11 (a)

  1. (a)

    Find, from first principles, the derivative of 5x−6x25x - \dfrac{6}{x^2} with respect to xx.

Worked solution (try it first)

(a)

  1. f(x)=5x−6x−2f(x) = 5x - 6x^{-2}, so f(x+h)−f(x)=5h−6[1(x+h)2−1x2]f(x + h) - f(x) = 5h - 6\left[\dfrac{1}{(x + h)^2} - \dfrac{1}{x^2}\right].
  2. Over one denominator: 1(x+h)2−1x2=x2−(x+h)2x2(x+h)2\dfrac{1}{(x + h)^2} - \dfrac{1}{x^2} = \dfrac{x^2 - (x + h)^2}{x^2(x + h)^2}
    =−h(2x+h)x2(x+h)2= \dfrac{-h(2x + h)}{x^2(x + h)^2}.
  3. So f(x+h)−f(x)=5h+6h(2x+h)x2(x+h)2f(x + h) - f(x) = 5h + \dfrac{6h(2x + h)}{x^2(x + h)^2}.
  4. Divide by hh: 5+6(2x+h)x2(x+h)25 + \dfrac{6(2x + h)}{x^2(x + h)^2}.
  5. Let h→0h \to 0: f′(x)=5+12xx4f'(x) = 5 + \dfrac{12x}{x^4}
    =5+12x3= 5 + \dfrac{12}{x^3}.

Report a problem with this question