← IGCSE / O Level Mathematics

IGCSE / O Level Mathematics · Topic 2 Algebra and graphs · Chapter 19 · pp. 219–238

Differentiation and the gradient function

A straight line has one gradient everywhere. A curve's gradient changes as you move along it. Differentiation gives a formula for the gradient at any point, so you can find how steep a curve is, write the equation of a tangent, and find the tops and bottoms of a graph without drawing it.

Learning objectives

  1. Understand the gradient of a curve as the gradient of the tangent at that point.
  2. Find a gradient function from first principles (the chord PQ as Q moves to P).
  3. Differentiate axⁿ, where n is an integer, and sums of such terms.
  4. Use other variables (s, t, v) and find the second derivative.
  5. Find the gradient at a point, and the point with a given gradient.
  6. Find the equation of a tangent to a curve.
  7. Find stationary points and decide whether each is a maximum or a minimum.

Book exercises: 19.1 to 19.10 and Student assessments 1 and 2 (pp. 219–238). The whole chapter is Extended content.

The gradient of a curve Extended

🔑 Key ideas

  • Gradient of a straight line through (x1, y1) and (x2, y2) = . It is the same everywhere on the line.
  • The gradient of a curve at a point P is the gradient of the tangent at P.
  • A chord PQ joins two points on the curve. As Q slides towards P, the chord's gradient gets closer and closer to the tangent's gradient.
123 246810 x y P(1, 1) Q(2, 4) chord PQ (dashed): gradient 3 tangent at P: 2 y = x² Q's x PQ gradient 2 3 1.5 2.5 1.25 2.25 1.1 2.1 → 1 → 2
On y = x², slide Q towards P(1, 1). The chord's gradient falls 3, 2.5, 2.25, 2.1, … and closes in on 2, the gradient of the tangent at P.

📘 Example 1 (book) · Prove the gradient of f(x) = x² is 2 at x = 1

  1. Let Q be h units to the right of P(1, 1): Q is (1 + h, (1 + h)²).
  2. Gradient of PQ = .
  3. Expand the top: = .
  4. Divide by h: gradient of PQ = 2 + h.
  5. As Q moves to P, h → 0, so 2 + h → 2. The gradient at P is 2.

The gradient function from first principles Extended

Do the same at a general point P(x, f(x)), with Q at (x + h, f(x + h)). The result is a formula for the gradient at any x: the gradient function, written f′(x) or .

💡 = the limit of as h → 0.

📘 Example 2 (book) · From first principles, find the gradient function of f(x) = x² + x

  1. Write f(x + h) − f(x) = (x + h)² + (x + h) − (x² + x).
  2. Expand: x² + 2xh + h² + x + h − x² − x = 2xh + h² + h.
  3. Divide by h: 2x + h + 1.
  4. Let h → 0: the h term vanishes, so = 2x + 1.
  5. Check: at x = 1 the gradient is 3. The chord from (1, 2) to (1.01, 2.0301) has gradient 0.0301 ÷ 0.01 = 3.01. ✔

📘 Example 3 · From first principles, find the gradient function of f(x) = x² − 4x

  1. f(x + h) − f(x) = (x + h)² − 4(x + h) − (x² − 4x).
  2. Expand and cancel: 2xh + h² − 4h.
  3. Divide by h: 2x + h − 4.
  4. Let h → 0: f′(x) = 2x − 4.

✏️ Try it

  1. On y = x², find the gradient of the chord from P(2, 4) to Q(3, 9).
  2. The gradient function of x² is 2x. What is the gradient of y = x² at x = 5?
  3. From first principles, find the gradient function of f(x) = 4x².
Answers

1. (9 − 4) ÷ (3 − 2) = 5 · 2. 2 × 5 = 10 · 3. f(x + h) − f(x) = 8xh + 4h², divide by h: 8x + 4h, h → 0 gives 8x

Next: the rule for axⁿ →

Differentiation: the rule for axⁿ Extended

🔑 Key ideas

  • If f(x) = axn, then f′(x) = anxn−1: multiply by the power, then take 1 off the power.
  • A constant differentiates to 0 (its graph is flat). If f(x) = ax, then f′(x) = a.
  • Differentiate a sum term by term.
  • Brackets or a division? Rewrite as a sum of powers of x first, then differentiate.
  • “Differentiate with respect to x” and “find the derivative” both mean find .
Start: 5x⁴a = 5, n = 4 × the power5 × 4 = 20 power − 1x⁴ → x³ Answer20x³ Constant: 7 = 7x⁰0 × 7x⁻¹ = 0 Linear: 2x = 2x¹1 × 2x⁰ = 2
Top: the two moves for any term axⁿ. Bottom: the same rule explains why a constant gives 0 and ax gives a.

📘 Example 4 · Differentiate 3x⁴

  1. Multiply the coefficient by the power: 3 × 4 = 12.
  2. Take 1 off the power: x⁴ becomes x³.
  3. = 12x³.

📘 Example 5 (book) · Differentiate f(x) = x³ − 2x + 4

  1. First term: × 3 = 1, so x³ → x².
  2. Second term: −2x → −2.
  3. Constant: 4 → 0.
  4. f′(x) = x² − 2. (The derivative of a cubic is a quadratic.)

📘 Example 6 (book) · Differentiate f(x) =

  1. Warning: do not differentiate top and bottom separately. is wrong.
  2. Split the fraction: + = 2x² + x.
  3. Differentiate term by term: = 4x + 1.

📘 Example 7 · Differentiate (x + 3)(x − 1)

  1. Expand the brackets: x² − x + 3x − 3 = x² + 2x − 3.
  2. Differentiate each term: 2x + 2 + 0.
  3. = 2x + 2.

🧪 Try it: differentiate term by term

(optional)

Type powers with ^, e.g. 2x^4 - 1/2x^2 + 7x - 3. Fractions like 1/3x^3 and negative powers like x^-1 work too.

    ✏️ Try it

    1. Differentiate 6x⁵.
    2. Differentiate 4x³ − 5x² + 7x − 2.
    3. Differentiate x(x − 4)².
    Answers

    1. 30x⁴ · 2. 12x² − 10x + 7 · 3. Expand first: x³ − 8x² + 16x, so 3x² − 16x + 16

    Next: other variables and the second derivative →

    Using other variables Extended

    🔑 Key ideas

    • The rule works for any letters. For s = 5t², “differentiate with respect to t” gives = 10t.
    • If s is distance and t is time, is the velocity v (rate of change of distance).
    • Differentiate velocity to get acceleration: a = .
    distance ss = 10t − 4.9t² d/dt velocity vv = 10 − 9.8t d/dt acceleration aa = −9.8 y or f(x)dy/dx or f′(x)d²y/dx² or f″(x) the functionfirst derivativesecond derivative
    A stone thrown upwards (the book's example): differentiate distance once for velocity, twice for acceleration. The −9.8 is the acceleration due to gravity.

    📘 Example 8 (book) · A stone has s = 10t − 4.9t². Find its velocity and acceleration

    1. Differentiate s with respect to t: v = = 10 − 9.8t.
    2. Differentiate v with respect to t: a = = −9.8.
    3. v = 10 − 9.8t m/s and a = −9.8 m/s².

    📘 Example 9 · Differentiate r = t(t² − 2) with respect to t

    1. Expand first: r = t³ − 2t.
    2. Differentiate term by term: = 3t² − 2.

    The second derivative Extended

    Function notationLeibniz notation
    Functionf(x) = axny = axn
    First derivativef′(x) = anxn−1 = anxn−1
    Second derivativef″(x) = an(n − 1)xn−2 = an(n − 1)xn−2

    📘 Example 10 (book) · Find when y = x³ − 2x²

    1. Differentiate once: = 3x² − 4x.
    2. Differentiate again: = 6x − 4.

    📘 Example 11 (book) · Find for s = 3t + ½t²

    1. Differentiate once: = 3 + t.
    2. Differentiate again: = 1.

    ✏️ Try it

    1. Differentiate A = 4r² + r with respect to r.
    2. Find for y = x⁵ − 3x.
    3. v = 6t² − t³. Find and .
    Answers

    1. 8r + 1 · 2. dy/dx = 5x⁴ − 3, so d²y/dx² = 20x³ · 3. 12t − 3t², then 12 − 6t

    Next: the gradient at a point →

    Gradient of a curve at a point Extended

    🔑 Key ideas

    • To find the gradient at x = a: differentiate, then substitute x = a into f′(x).
    • To find the point with a given gradient m: solve f′(x) = m for x, then put x into f(x) for y.
    • A cubic's f′(x) is a quadratic, so there can be two points with the same gradient.
    • In a context, f′ is a rate: m/s, infections per day, °C per minute.
    246 246810 x (4, 4) f(x) = ½x² − 2x + 4 tangent, gradient 2 f′(x) = x − 2 f′(4) = 4 − 2 = 2 gradient at x = 4
    The book's example: the gradient function of f(x) = ½x² − 2x + 4 is f′(x) = x − 2, so at x = 4 the curve (and its tangent) has gradient 2.

    📘 Example 12 (book) · Find the gradient of f(x) = x³ + x − 6 when x = −1

    1. Differentiate: f′(x) = 3x² + 1.
    2. Substitute x = −1: f′(−1) = 3(−1)² + 1 = 3 + 1.
    3. The gradient is 4.

    Finding x when the gradient is given Extended

    📘 Example 13 (book) · On f(x) = x² − 2x + 1 the gradient is 4. Find the point

    1. Differentiate: f′(x) = 2x − 2.
    2. Set it equal to the gradient: 2x − 2 = 4.
    3. Solve: 2x = 6, so x = 3.
    4. Find y: f(3) = 9 − 6 + 1 = 4. The point is (3, 4).

    📘 Example 14 · Find the points on f(x) = x³ − 3x² + 2 where the gradient is 9

    1. Differentiate: f′(x) = 3x² − 6x.
    2. Set equal to 9: 3x² − 6x = 9, so 3x² − 6x − 9 = 0.
    3. Divide by 3: x² − 2x − 3 = 0.
    4. Factorise: (x − 3)(x + 1) = 0, so x = 3 or x = −1.
    5. Find y: f(3) = 27 − 27 + 2 = 2 and f(−1) = −1 − 3 + 2 = −2.
    6. The points are (3, 2) and (−1, −2).
    7. Check: f′(3) = 27 − 18 = 9 ✔ and f′(−1) = 3 + 6 = 9 ✔.

    ✏️ Try it

    1. Find the gradient of y = 2x³ − x at x = 2.
    2. Find the point on y = x² + 6x where the gradient is 2.
    3. A ball travels s = 2t² + 3t metres in t seconds. Find its velocity at t = 4.
    Answers

    1. dy/dx = 6x² − 1 = 24 − 1 = 23 · 2. 2x + 6 = 2, x = −2, y = 4 − 12 = −8: (−2, −8) · 3. ds/dt = 4t + 3 = 19 m/s

    Next: the equation of a tangent →

    Equation of the tangent at a given point Extended

    🔑 Key ideas

    • The tangent at P has the same gradient as the curve at P.
    • It is a straight line, so it has the form y = mx + c.
    • Find m from f′(x), then put P's coordinates into y = mx + c to find c.
    • The normal at P is perpendicular to the tangent, so its gradient is .
    1. Differentiatef′(x) = x + 3 2. Gradient mm = f′(1) = 4 3. The pointf(1) = 4½ 4. Find c4½ = 4 + c Tangent: y = 4x + ½ f(x) = ½x² + 3x + 1 at x = 1
    The book's worked example as a flowchart: four moves from the curve to the tangent's equation.

    📘 Example 15 (book) · Find the tangent to f(x) = ½x² + 3x + 1 at P, where x = 1

    1. Differentiate: f′(x) = x + 3.
    2. Gradient at x = 1: m = 1 + 3 = 4.
    3. The tangent is y = 4x + c.
    4. y-coordinate of P: f(1) = ½ + 3 + 1 = 4½, so P is (1, 4½).
    5. Substitute P: 4½ = 4(1) + c, so c = ½.
    6. Tangent: y = 4x + ½.

    📘 Example 16 · Find the tangent to y = x³ − 2x at x = 2

    1. Differentiate: = 3x² − 2.
    2. Gradient at x = 2: m = 12 − 2 = 10.
    3. Point: y = 8 − 4 = 4, so (2, 4).
    4. Substitute into y = 10x + c: 4 = 20 + c, so c = −16.
    5. Tangent: y = 10x − 16.

    📘 Example 17 · Find the normal to y = x² at (1, 1)

    1. Gradient of the curve: = 2x = 2 at x = 1.
    2. The normal is perpendicular, so its gradient is .
    3. Substitute (1, 1) into y = −½x + c: 1 = −½ + c, so c = 1½.
    4. Normal: y = −½x + 1½.

    ✏️ Try it

    1. Find the tangent to y = x² at (2, 4).
    2. Find the tangent to y = x² − 5x + 6 at x = 1.
    3. Where is the tangent to y = x² − 6x + 1 horizontal? Give its equation.
    Answers

    1. m = 4, 4 = 8 + c: y = 4x − 4 · 2. m = 2(1) − 5 = −3, y = 2, so 2 = −3 + c: y = −3x + 5 · 3. 2x − 6 = 0 at x = 3, y = −8: the tangent is y = −8

    Next: stationary points →

    Stationary points Extended

    🔑 Key ideas

    • A stationary point is where the gradient is zero: = 0. The tangent there is horizontal.
    • A maximum is the top of a hill, a minimum the bottom of a valley. (A point of inflexion is also stationary, but this course uses maxima and minima only.)
    • To find them: differentiate, set f′(x) = 0, solve for x, then find each y.
    x max (−2, 10⅓) min (2, −⅓) gradient + gradient − gradient + dy/dx = x² − 4 = 0 x = −2 or x = 2 d²y/dx² = 2x x = −2: 2(−2) = −4 < 0 → maximum x = 2: 2(2) = 4 > 0 → minimum
    The book's curve y = ⅓x³ − 4x + 5. The gradient goes + → 0 → − at the maximum and − → 0 → + at the minimum.

    Three ways to tell a maximum from a minimum

    MethodMaximumMinimum
    1. Shape of the graphA cubic with positive x³ term: the left-hand stationary pointThe right-hand one (and the only one of a quadratic with positive x²)
    2. Gradient either side+ then − as x increases− then + as x increases
    3. Second derivative < 0 > 0

    💡 If = 0, the test does not decide. Check the gradient on either side instead.

    📘 Example 18 (book) · Find and classify the stationary points of y = ⅓x³ − 4x + 5

    1. Differentiate: = x² − 4.
    2. Set to zero: x² − 4 = 0, so x² = 4 and x = ±2.
    3. x = 2: y = ⅓(8) − 8 + 5 = −⅓.
    4. x = −2: y = ⅓(−8) + 8 + 5 = 10⅓.
    5. Second derivative: = 2x.
    6. At x = −2: 2(−2) = −4 < 0, a maximum. At x = 2: 2(2) = 4 > 0, a minimum.
    7. (−2, 10⅓) is a maximum and (2, −⅓) is a minimum.
    8. Check by gradients either side of x = 2: at x = 1, 1 − 4 = −3; at x = 3, 9 − 4 = 5. − then +, a minimum ✔.

    📘 Example 19 · Find the stationary point of f(x) = x² − 8x + 12 and its nature

    1. Differentiate: f′(x) = 2x − 8.
    2. Set to zero: 2x − 8 = 0, so x = 4.
    3. Find y: f(4) = 16 − 32 + 12 = −4.
    4. f″(x) = 2 > 0, so it is a minimum.
    5. Minimum at (4, −4). Check: a quadratic with positive x² is a valley shape ✔.

    🧪 Try it: turning-point finder (quadratic or cubic)

      Sketch of f(x) with its stationary points marked.

      ✏️ Try it

      1. Find the stationary point of y = x² + 4x − 1 and its nature.
      2. Find the stationary point of y = −x² + 6x and its nature.
      3. Find and classify the stationary points of y = x³ − 3x.
      Answers

      1. 2x + 4 = 0, x = −2, y = 4 − 8 − 1 = −5: minimum (−2, −5) · 2. −2x + 6 = 0, x = 3, y = 9: maximum (3, 9) · 3. 3x² − 3 = 0, x = ±1; d²y/dx² = 6x: (−1, 2) maximum, (1, −2) minimum

      Next: summary and quiz →

      Chapter summary

      • The gradient of a curve at P is the gradient of the tangent at P: the limit of the chord PQ's gradient as Q → P.
      • First principles: is the limit of as h → 0.
      • axn → anxn−1. A constant → 0, ax → a. Differentiate term by term, after expanding or dividing.
      • Any letters work: is velocity, is acceleration. Differentiate twice for or f″(x).
      • Gradient at x = a: substitute into f′(x). Given a gradient m: solve f′(x) = m.
      • Tangent: m = f′(a), then y = mx + c through the point. Normal gradient = −1 ÷ m.
      • Stationary points: f′(x) = 0. < 0 maximum, > 0 minimum, = 0 check either side.

      📄 Practice questions

      The book's Exercises 19.1 to 19.10 and Student assessments 1 and 2 are in the printable assignment for this chapter.

      Mini-quiz

      1. P is (1, 1) on y = x². Q moves along the curve towards P. What does the gradient of PQ get closer to?
      2. Differentiate 5x⁴.
      3. What is the derivative of the constant 7?
      4. Find dy/dx for y = x³ − 4x + 1.
      5. Differentiate (2x³ + x²) ÷ x.
      6. A stone has s = 10t − 4.9t². What is its velocity ds/dt?
      7. Find d²y/dx² for y = x³ − 2x².
      8. What is the gradient of y = x³ + x − 6 at x = −1?
      9. At which x does y = x² − 2x + 1 have gradient 4?
      10. What is the tangent to y = x² at the point (3, 9)?
      11. Where is the stationary point of y = x² − 4x + 7?
      12. At a stationary point, d²y/dx² = −4. What kind of point is it?

      Source: Cambridge IGCSE Mathematics Core and Extended (4th edition, Pimentel and Wall), Chapter 19 (Differentiation and the gradient function). Explanations, the Try it answers, the tools and the quiz are Guru Jazzy's own. This page is not made or endorsed by Cambridge or Hodder Education.