Completing The Square And The Graph
Theory
Completing the square rewrites a quadratic \(y=ax^2+bx+c\) in turning point form \(y=a(x-h)^2+k\), where \((h,k)\) is the vertex. This Year 11 Mathematics Advanced page shows how to complete the square for monic and non-monic quadratics, read off the vertex, axis of symmetry and maximum or minimum value, find the zeroes, sketch the parabola and find its equation from a graph.
The turning point form (or vertex form) of a quadratic is \(y=a(x-h)^2+k\). Its graph is a parabola with vertex \((h,k)\) and axis of symmetry \(x=h\). It is the graph of \(y=ax^2\) translated \(h\) units horizontally and \(k\) units vertically.
Read \(h\) with care: \(y=(x+3)^2-2=(x-(-3))^2-2\) has \(h=-3\), so its vertex is \((-3,-2)\). A quadratic is monic when \(a=1\), as in \(y=(x-5)^2+2\).
A square is never negative: \((x-h)^2\geq 0\) for every \(x\). So if \(a\gt 0\), then \(y\geq k\), and the minimum value of \(y\) is \(k\), when \(x=h\). If \(a\lt 0\), then \(y\leq k\), and the maximum value is \(k\).
Completing the square turns \(x^2+bx\) into a perfect square by adding \(\left(\dfrac{b}{2}\right)^2\), the square of half the coefficient of \(x\). To keep the function unchanged, the same number is subtracted straight away. If \(a\neq 1\), first take \(a\) out as a factor of the \(x^2\) and \(x\) terms.
The turning point form also gives the zeroes (\(x\)-intercepts): let \(y=0\), make the square the subject and take \(\pm\) the square root. If the square would have to equal a negative number, there are no \(x\)-intercepts; for example \(y=(x-1)^2+3\geq 3\) never reaches \(0\).
Turning point form, with vertex \((h,k)\) and axis of symmetry \(x=h\):
Completing the square on \(x^2+bx\): add and subtract the square of half the coefficient of \(x\).
Completing the square on the general quadratic \(ax^2+bx+c\) in the same way (take out \(a\), then add and subtract \(\left(\dfrac{b}{2a}\right)^2\) inside the bracket) gives a vertex with \(h=-\dfrac{b}{2a}\). This is why the axis of symmetry of any parabola is \(x=-\dfrac{b}{2a}\).
Completing the square, \(a=1\)
- Halve the coefficient of \(x\) and square it.
- Add and subtract that number straight after the \(x\) term.
- Factorise the first three terms as a perfect square and collect the constants: \(y=(x-h)^2+k\).
Completing the square, \(a\neq 1\)
- Take out \(a\) from the \(x^2\) and \(x\) terms: \(y=a\left(x^2+\dfrac{b}{a}x\right)+c\).
- Complete the square inside the bracket, writing it as \(a\left[(x-h)^2-p\right]+c\).
- Expand the outer bracket: the subtracted number is multiplied by \(a\). Collect the constants.
Sketching \(y=a(x-h)^2+k\)
- Vertex \((h,k)\); concave up if \(a\gt 0\), concave down if \(a\lt 0\).
- \(y\)-intercept: substitute \(x=0\).
- \(x\)-intercepts: let \(y=0\), make \((x-h)^2\) the subject and take \(\pm\) the square root (none if it equals a negative number).
- Draw a smooth symmetric curve through these points and label them.
Equation from a graph
- Read the vertex \((h,k)\) and one other point, usually the \(y\)-intercept.
- Write \(y=a(x-h)^2+k\), substitute the other point and solve for \(a\).
Add and subtract \(\left(\dfrac{10}{2}\right)^2=25\):
| \(y\) | \(=\) | \(x^2+10x+25-25+21\) |
| \(\) | \(=\) | \((x+5)^2-4\) |
Compare with \(y=(x-h)^2+k\): \(h=-5\), \(k=-4\), so the turning point is \((-5,-4)\).
\((x+5)^2\geq 0\), so \(y\geq -4\), with \(y=-4\) when \(x=-5\).
\(\therefore y=(x+5)^2-4\), the turning point is \((-5,-4)\) and \(y_{\min}=-4\).
Add and subtract \(\left(\dfrac{6}{2}\right)^2=9\):
| \(f(x)\) | \(=\) | \(x^2+6x+(3)^2-(3)^2+4\) |
| \(\) | \(=\) | \(x^2+6x+9-5\) |
| \(\) | \(=\) | \((x+3)^2-5\) |
To find the zeroes let \(f(x)=0\):
| \((x+3)^2-5\) | \(=\) | \(0\) |
| \((x+3)^2\) | \(=\) | \(5\) |
| \(x+3\) | \(=\) | \(\pm\sqrt{5}\) |
| \(x\) | \(=\) | \(-3\pm\sqrt{5}\) |
\(\therefore\) the zeroes are \(x=-3-\sqrt{5}\) and \(x=-3+\sqrt{5}\).
From the graph, the vertex is \((-2,3)\) and the \(y\)-intercept is \(-1\).
| \(f(x)\) | \(=\) | \(a(x+2)^2+3\) |
| \(f(0)\) | \(=\) | \(-1\) |
| \(\therefore -1\) | \(=\) | \(a(0+2)^2+3\) |
| \(-1\) | \(=\) | \(4a+3\) |
| \(-4\) | \(=\) | \(4a\) |
| \(a\) | \(=\) | \(-1\) |
\(\therefore f(x)=-(x+2)^2+3\)
Check: \(a=-1\lt 0\) matches the concave-down graph.
Take out \(-2\) from the \(x\) terms, then complete the square:
| \(y\) | \(=\) | \(-2(x^2-4x)-5\) |
| \(\) | \(=\) | \(-2\left[(x-2)^2-4\right]-5\) |
| \(\) | \(=\) | \(-2(x-2)^2+8-5\) |
| \(\) | \(=\) | \(-2(x-2)^2+3\) |
\(a=-2\lt 0\), so the parabola is concave down: maximum turning point at \((2,3)\).
When \(x=0\):
| \(y\) | \(=\) | \(-2(0-2)^2+3\) |
| \(\) | \(=\) | \(-5\) |
When \(y=0\):
| \(2(x-2)^2\) | \(=\) | \(3\) |
| \((x-2)^2\) | \(=\) | \(\dfrac{3}{2}\) |
| \(x-2\) | \(=\) | \(\pm\sqrt{\dfrac{3}{2}}\) |
| \(x\) | \(=\) | \(2\pm\dfrac{\sqrt{6}}{2}\) |
\(\therefore\) the \(x\)-intercepts are \(x=2-\dfrac{\sqrt{6}}{2}\approx 0.78\) and \(x=2+\dfrac{\sqrt{6}}{2}\approx 3.22\), and the \(y\)-intercept is \(-5\).
Common pitfalls
Frequently asked questions
What is completing the square?
It is rewriting x^2 + bx + c as (x - h)^2 + k by adding and subtracting the square of half the coefficient of x. For x^2 + 10x + 21, add and subtract 25 to get (x + 5)^2 - 4.
How do you find the vertex by completing the square?
Write the quadratic as y = a(x - h)^2 + k. The vertex is (h, k). For y = (x + 5)^2 - 4 the vertex is (-5, -4).
How do you complete the square when the coefficient of x squared is not 1?
Take the coefficient a out of the x squared and x terms, complete the square inside the bracket, then expand the outer bracket, remembering to multiply the subtracted number by a.
How do you find the zeroes of a quadratic by completing the square?
Write it as a(x - h)^2 + k, set it equal to zero, make the square the subject and take plus or minus the square root. For (x + 3)^2 - 5 = 0, x = -3 plus or minus root 5.
How can you tell from turning point form that a parabola has no x-intercepts?
If a is positive and k is positive, y is always at least k, so it never reaches 0. For example y = (x - 1)^2 + 3 is always 3 or more.
How do you find the equation of a parabola from its vertex and y-intercept?
Write y = a(x - h)^2 + k using the vertex (h, k), substitute the y-intercept point (0, c) and solve for a.