A-level Mathematics

2.3 Quadratic functions, the discriminant and completing the square — Learn

Prerequisites: expanding brackets; factorising; the index laws from 2.1; substituting a value into an expression.

By the end of this section you can: write a quadratic in completed-square form; read off its vertex and its line of symmetry; use the discriminant to say how many real roots the equation has; and connect the completed-square sign to the shape of the curve.

1. Three forms of the same function

A quadratic function has the form y=ax2+bx+cy = ax^2 + bx + c, with a≠0a \neq 0. Its graph is a parabola. The same function can be written in three ways, and each way shows a different feature.

Form Example What it shows
Expanded y=x2−6x+5y = x^2 - 6x + 5 the yy-intercept, c=5c = 5
Factorised y=(x−1)(x−5)y = (x - 1)(x - 5) the roots, x=1x = 1 and x=5x = 5
Completed square y=(x−3)2−4y = (x - 3)^2 - 4 the vertex, (3,−4)(3, -4)

The three forms are equal for every value of xx. Choosing a form is choosing which feature you want to read.

2. Completing the square

To complete the square for a monic quadratic (one with a=1a = 1), take half of the coefficient of xx and write the square of xx plus that number.

Example 1. Write x2+8x+5x^2 + 8x + 5 in completed-square form.

Half of 88 is 44, and

(x+4)2=x2+8x+16.(x + 4)^2 = x^2 + 8x + 16.

The expanded square has 1616 where the expression has 55. Subtract the difference, 16−5=1116 - 5 = 11:

x2+8x+5=(x+4)2−11.x^2 + 8x + 5 = (x + 4)^2 - 11.

Watch the sign of the bracket: the square is (x+4)2(x + 4)^2 because the coefficient +8+8 is positive.

Example 2. Write 2x2−12x+72x^2 - 12x + 7 in the form a(x+p)2+qa(x + p)^2 + q.

Take the factor 22 out of the first two terms:

2x2−12x+7=2(x2−6x)+7.2x^2 - 12x + 7 = 2\left(x^2 - 6x\right) + 7.

Complete the square inside the bracket. Half of −6-6 is −3-3, and (x−3)2=x2−6x+9(x - 3)^2 = x^2 - 6x + 9:

x2−6x=(x−3)2−9.x^2 - 6x = (x - 3)^2 - 9.

Substitute back and multiply the −9-9 by the outside factor 22:

2((x−3)2−9)+7=2(x−3)2−18+7=2(x−3)2−11.2\left((x - 3)^2 - 9\right) + 7 = 2(x - 3)^2 - 18 + 7 = 2(x - 3)^2 - 11.

3. The vertex and the minimum

A square is never negative, so (x+p)2≥0(x + p)^2 \geq 0 for every xx. This is the key to the completed-square form.

For y=a(x+p)2+qy = a(x + p)^2 + q with a>0a > 0:

If a<0a < 0 the parabola opens downwards, and the vertex gives the maximum instead. The yy-intercept is always the value of yy when x=0x = 0.

4. The discriminant

The roots of ax2+bx+c=0ax^2 + bx + c = 0 come from the quadratic formula

x=−b±b2−4ac2a.x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Everything about the roots is decided by the expression under the square root. It is called the discriminant, written Δ\Delta:

Δ=b2−4ac.\Delta = b^2 - 4ac.
Value of the discriminant Number of real roots The graph
Δ>0\Delta > 0 two distinct real roots crosses the xx-axis twice
Δ=0\Delta = 0 one repeated real root touches the xx-axis once
Δ<0\Delta < 0 no real roots never meets the xx-axis

The third row is the reason a negative discriminant is useful: it proves that a quadratic equation cannot be solved with real numbers, and it shows why.

5. Try it: the parabola explorer

Predict first. For y=x2+bx+cy = x^2 + bx + c, the vertex moves as bb changes and the number of roots changes as cc changes. If you keep c=0c = 0 and change bb, will the vertex stay on the yy-axis, or move? Write your prediction down before you touch the sliders.

Test. Move the sliders for bb and cc. The panel reports the completed-square form, the vertex, and the discriminant.

Explain. For which values of cc does the parabola cross the xx-axis twice? Find the value of cc at which the two crossings become one. Write two sentences linking the discriminant to what you see.

Watch out. Completing the square is an identity, and the sign of the bracket follows the sign of bb.

For x2−6xx^2 - 6x, half of −6-6 is −3-3, so the bracket is (x−3)2(x - 3)^2, not (x+3)2(x + 3)^2. Expand to check: (x−3)2=x2−6x+9(x - 3)^2 = x^2 - 6x + 9, which matches. The common error is to copy the sign of bb into the bracket unchanged.

Re-check: expand your completed-square form and confirm it gives back the original expression, term by term.

Progress check

Return to the chapter problem. The arch is modelled by y=4−x24y = 4 - \frac{x^2}{4}.

  1. Write the model in completed-square form, a(x+p)2+qa(x + p)^2 + q.
  2. State the greatest height of the arch and where it occurs.
  3. Solve 4−x24=04 - \frac{x^2}{4} = 0 to find where the arch meets the road.
  4. The equation 4−x24=54 - \frac{x^2}{4} = 5 asks for a point higher than the arch. Work out the discriminant of −x24−1=0-\frac{x^2}{4} - 1 = 0 and explain what its sign says about the request.

You should now be able to

Settings

Colour scheme

Applies to every book you read here.

Reading theme

Applies to every book you read here.