Lesson 3 of 8 · 18 min

Derivatives from first principles

Use the limit definition of the derivative to find the gradient function of power and polynomial functions, setting out every step.

What you will be able to do

  • State the definition f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} and explain what each part means.
  • Find the derivative of a quadratic or cubic from first principles, setting out every step.
  • Use the notations f′(x)f'(x), dydx\frac{dy}{dx} and ddx(…)\frac{d}{dx}(\ldots) for the derivative.

In the last lesson you found gradients one point at a time: at x=1x = 1, then at x=3x = 3. The algebra was the same each time. Do it once at a general point xx instead, and you get a formula for the gradient at every point at once.

The gradient of the secant PQPQ is f(x+h)−f(x)h\dfrac{f(x+h) - f(x)}{h}. As h→0h \to 0, QQ slides along the curve to PP and the secant becomes the tangent at PP.

Key idea

The derivative

The derivative of ff is the function

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

It gives the gradient of the tangent to y=f(x)y = f(x) at each xx, which is the instantaneous rate of change of ff. Say "ff dash xx" or "ff prime of xx". Finding a derivative is called differentiating, and using this definition directly is differentiating from first principles. The definition is on the QCAA formula sheet.

Differentiating from first principles

  1. Write out f(x+h)f(x + h)

    Replace every xx in f(x)f(x) with (x+h)(x + h), in brackets, and expand.

  2. Subtract f(x)f(x) and simplify

    Every term without an hh cancels. If one doesn't, check your expansion.

  3. Divide by hh

    Every remaining term has a factor of hh, so factorise and cancel it.

  4. Let h→0h \to 0

    Terms that still contain hh disappear. What is left is f′(x)f'(x).

Worked example

First principles for f(x)=3x2−5x+2f(x) = 3x^2 - 5x + 2

  • Simple familiar
  • Technology free

Use first principles to find the derivative of f(x)=3x2−5x+2f(x) = 3x^2 - 5x + 2.

5 steps

Try it yourself first, then check the working one step at a time.

Method

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

  2. Subtract f(x)f(x): every term without hh cancels.

  3. Divide by hh by cancelling a common factor.

  4. Let h→0h \to 0, keeping lim⁡h→0\lim_{h \to 0} on every line until then.

Watch out for

  • Writing −5(x+h)-5(x + h) as −5x+5h-5x + 5h. The negative applies to both terms.

  • Dropping lim⁡h→0\lim_{h \to 0} from the middle lines, or substituting h=0h = 0 before cancelling.

Interactive

Watch the limit happen

This is the function from the worked example. At x=2x = 2 the secant gradient is f(2+h)−f(2)h=7+3h\frac{f(2 + h) - f(2)}{h} = 7 + 3h. Shrink hh and watch it approach 77, which is exactly f′(2)=6(2)−5f'(2) = 6(2) - 5.

Exam tip

Setting out that earns the marks

  • Start from the definition, with f(x+h)f(x + h) written out in full.
  • Keep lim⁡h→0\lim_{h \to 0} at the front of every line until the line where you let h→0h \to 0.
  • Show the factor of hh cancelling.
  • Finish with f′(x)=…f'(x) = \ldots

If a question says "from first principles", a correct answer found with a rule earns no marks.

Use first principles to find f′(x)f'(x) for f(x)=x2+4xf(x) = x^2 + 4x.

f'(x) =
Reads asYour answer shows here as maths.

Cubics work the same way, but you need (x+h)3(x + h)^3. From row 1   3   3   11 \;\, 3 \;\, 3 \;\, 1 of Pascal's triangle,

(x+h)3=x3+3x2h+3xh2+h3.(x + h)^3 = x^3 + 3x^2h + 3xh^2 + h^3.

Worked example

Show that the derivative of 2x3−x2x^3 - x is 6x2−16x^2 - 1

  • Complex familiar
  • Technology free

Use the definition f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} to show that the derivative of f(x)=2x3−xf(x) = 2x^3 - x is f′(x)=6x2−1f'(x) = 6x^2 - 1.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Expand (x+h)3(x + h)^3 with the binomial theorem.

  2. Subtract f(x)f(x), then factor out hh and cancel it.

  3. Let h→0h \to 0 and finish with the statement you were asked to show.

Watch out for

  • Forgetting the −h-h that comes from −(x+h)-(x + h).

  • In a "show that" question, skipping the expansion line. Every step is worth showing.

Note

Other ways to write the derivative

If y=f(x)y = f(x), the derivative can be written f′(x)f'(x) or dydx\frac{dy}{dx}, read "dee yy by dee xx". The second form, Leibniz notation, recalls "change in yy over change in xx": write a small change in xx as δx\delta x and the matching change in yy as δy\delta y, and

dydx=lim⁡δx→0δyδx.\frac{dy}{dx} = \lim_{\delta x \to 0} \frac{\delta y}{\delta x}.

The symbol ddx(…)\frac{d}{dx}(\ldots) means "the derivative of (…)(\ldots) with respect to xx", so ddx(x2)=2x\frac{d}{dx}\left(x^2\right) = 2x.

Which limit gives the gradient of the tangent to y=x3y = x^3 at x=2x = 2?

Choose one answer

Common mistake

f(x + h) is not f(x) + h

For f(x)=x2f(x) = x^2, f(x+h)=(x+h)2=x2+2xh+h2f(x + h) = (x + h)^2 = x^2 + 2xh + h^2. It is not x2+hx^2 + h, and it is not x2+h2x^2 + h^2. For f(x)=3x2−5xf(x) = 3x^2 - 5x, f(x+h)=3(x+h)2−5(x+h)f(x + h) = 3(x + h)^2 - 5(x + h): every xx is replaced, in brackets.

Extension: the derivative of 1x\frac{1}{x} from first principles

Let f(x)=1xf(x) = \frac{1}{x}, x≠0x \ne 0. Combine the fractions over a common denominator first:

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

Then

f′(x)=lim⁡h→0−hx(x+h)×1h=lim⁡h→0−1x(x+h)=−1x2.f'(x) = \lim_{h \to 0} \frac{-h}{x(x + h)} \times \frac{1}{h} = \lim_{h \to 0} \frac{-1}{x(x + h)} = -\frac{1}{x^2}.

Keep this result. It fits a pattern you will meet in the next lessons, because 1x=x−1\frac{1}{x} = x^{-1} and −1x2=−1×x−2-\frac{1}{x^2} = -1 \times x^{-2}.

Summary

  • The derivative is f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}, on the formula sheet. It gives the gradient of the tangent at every xx.

  • Method: expand f(x+h)f(x + h), subtract f(x)f(x), divide by hh, then let h→0h \to 0.

  • The terms without h always cancel, and every remaining term has a factor of h before you divide.

  • Write lim⁡h→0\lim_{h \to 0} on every line until you take the limit, and never substitute h=0h = 0 before cancelling.

  • The derivative is a function of xx. It can be written f′(x)f'(x), dydx\frac{dy}{dx} or ddx(…)\frac{d}{dx}(\ldots).

Finished the lesson?

Try the 2 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 3 of 80% read

Save your progress with a free account