Skip to main content
Functions and graphs・Form 4 maths

Completing the square (NF)

A standard method from Functions and graphs: the steps and worked examples.

Steps

Write y = a(x − h)² + k. The vertex is (h, k).

  1. Take out a from the x² and x terms.
  2. Inside the bracket, add and subtract (half the x-coefficient)².
  3. Tidy into a(x − h)² + k.

Why: (x − h)² is never negative, so its smallest value is 0, at x = h.

Worked examples

Example 1: NF: find the maximum value of y = −2x² + 8x − 3 by completing the square.
y = −2(x² − 4x) − 3
  = −2(x² − 4x + 4 − 4) − 3
  = −2(x − 2)² + 8 − 3
  = −2(x − 2)² + 5
maximum value 5, when x = 2

For the whole topic, read Functions and graphs: key points, common mistakes and how the DSE tests it.

Other methods in this topic