impera Open Impera

IB MYP Extended Mathematics · Algebra

Quadratic functions and the discriminant

1Three forms of a quadratic

A quadratic function can be written in three equivalent forms. Each one shows a different feature of its graph.

  • Standard form: $y = ax^2 + bx + c$. Shows the y-intercept, $c$.
  • Factorised form: $y = a(x - p)(x - q)$. Shows the roots, $p$ and $q$.
  • Vertex form: $y = a(x - h)^2 + k$. Shows the vertex $(h, k)$ and the line of symmetry $x = h$.

In all three, $a$ decides the shape: positive $a$ gives a U with a minimum; negative $a$ gives an upside-down U with a maximum. A larger $|a|$ makes the curve narrower.

Worked example

One function in three forms

  1. Standard: $y = x^2 - 6x + 8$. The $y$-intercept is 8.
  2. Factorised: $y = (x - 2)(x - 4)$. The roots are 2 and 4.
  3. Vertex: $y = (x - 3)^2 - 1$. The vertex is (3, −1), a minimum.
  4. Check: the vertex's $x$-value, 3, is halfway between the roots.

Choose the form that fits the question. To sketch, you often want all three features.

Check yourself

Which form of a quadratic shows the coordinates of the vertex directly?

  • y = ax² + bx + c

  • y = a(x − h)² + k

  • y = a(x − p)(x − q)

  • y = mx + c

Show the answer

y = a(x − h)² + k

The vertex is (h, k).

2Completing the square

Completing the square rewrites $x^2 + bx + c$ in vertex form.

Method for $x^2 + bx + c$: halve the coefficient of $x$, put it in the bracket, and subtract its square.

$x^2 + bx + c = \left(x + \dfrac{b}{2}\right)^2 - \left(\dfrac{b}{2}\right)^2 + c$

Worked example

Complete the square for x² − 6x + 2

  1. Half of −6 is −3: start with $(x - 3)^2$.
  2. $(x - 3)^2 = x^2 - 6x + 9$, which has 9 too many.
  3. $x^2 - 6x + 2 = (x - 3)^2 - 9 + 2 = (x - 3)^2 - 7$.
  4. Vertex: (3, −7). Minimum value −7.
Worked example

With a leading coefficient. 2x² + 8x + 5

  1. Factor 2 from the first two terms: $2(x^2 + 4x) + 5$.
  2. Complete the square inside: $2[(x + 2)^2 - 4] + 5$.
  3. Expand the outer bracket: $2(x + 2)^2 - 8 + 5 = 2(x + 2)^2 - 3$.
  4. Vertex: (−2, −3).

Take care with the sign: in $(x - 3)^2 - 7$ the vertex is at $x = +3$, the value that makes the bracket zero.

Check yourself

What is x² + 10x + 7 in completed square form?

  • (x + 10)² − 93

  • (x + 5)² − 25

  • (x + 5)² − 18

  • (x + 5)² + 7

Show the answer

(x + 5)² − 18

(x + 5)² gives 25, and 7 − 25 = −18.

3Solving by completing the square and the formula

Completing the square solves any quadratic equation, and gives exact answers in surd form.

Worked example

Solve x² − 6x + 2 = 0

  1. $(x - 3)^2 - 7 = 0$.
  2. $(x - 3)^2 = 7$.
  3. $x - 3 = \pm\sqrt{7}$. Remember both roots.
  4. $x = 3 \pm \sqrt{7}$, that is 5.65 or 0.354.

Doing the same steps on the general equation $ax^2 + bx + c = 0$ produces the quadratic formula:

$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

So the formula is completing the square done once and for all.

Worked example

Solve 2x² − 5x + 1 = 0 with the formula

  1. $a = 2$, $b = -5$, $c = 1$.
  2. $b^2 - 4ac = 25 - 8 = 17$.
  3. $x = \dfrac{5 \pm \sqrt{17}}{4}$.
  4. $x = 2.28$ or $x = 0.219$.

The formula also shows the symmetry: the two roots are equal distances either side of $x = -\dfrac{b}{2a}$, the line of symmetry.

Check yourself

Solve (x − 2)² = 9.

  • x = 5 only

  • x = 5 or x = −1

  • x = 11 or x = −7

  • x = 3 or x = −3

Show the answer

x = 5 or x = −1

x − 2 = ±3.

4The discriminant

The discriminant is the expression under the square root in the formula: $\Delta = b^2 - 4ac$. It tells you the nature of the roots without solving.

  • $\Delta > 0$: two distinct real roots. The graph crosses the $x$-axis twice.
  • $\Delta = 0$: one repeated root (two equal roots). The graph touches the axis at its vertex.
  • $\Delta < 0$: no real roots. The graph does not meet the axis.

If $\Delta$ is a perfect square, the roots are rational and the quadratic factorises.

Worked example

How many roots?

  1. $x^2 - 4x + 4$: $\Delta = 16 - 16 = 0$. One repeated root ($x = 2$).
  2. $x^2 + 2x + 5$: $\Delta = 4 - 20 = -16$. No real roots.
  3. $3x^2 - x - 2$: $\Delta = 1 + 24 = 25$. Two rational roots.
Worked example

Finding an unknown coefficient

  1. $x^2 + kx + 9 = 0$ has equal roots. Find $k$.
  2. Equal roots: $\Delta = 0$.
  3. $k^2 - 36 = 0$.
  4. $k = 6$ or $k = -6$.
Worked example

A line touching a curve

  1. The line $y = 2x + c$ is a tangent to $y = x^2 + 2$. Find $c$.
  2. Meeting points: $x^2 + 2 = 2x + c$, so $x^2 - 2x + (2 - c) = 0$.
  3. A tangent meets the curve once, so $\Delta = 0$: $4 - 4(2 - c) = 0$.
  4. $c = 1$.
Check yourself

What is the discriminant of 2x² + 3x − 1, and what does it show?

  • −17, so there are no real roots

  • 1, so there are two rational roots

  • 17, so there are two distinct real roots

  • 0, so there is one repeated root

Show the answer

17, so there are two distinct real roots

9 − 4(2)(−1) = 17, which is positive.

5Maximum and minimum problems

Because a quadratic has a vertex, it can model situations with a best value: the greatest height, the largest area, the highest profit.

Worked example

A thrown ball

  1. The height of a ball is $h = -5t^2 + 20t + 2$ metres after $t$ seconds.
  2. The maximum is at the vertex: $t = -\dfrac{b}{2a} = -\dfrac{20}{-10} = 2$ seconds.
  3. $h = -5(4) + 40 + 2 = 22$ metres.
  4. In vertex form: $h = -5(t - 2)^2 + 22$.
  5. The starting height is 2 m (when $t = 0$).
Worked example

The largest enclosure

  1. A farmer has 40 m of fencing for a rectangular pen against a wall, so only three sides need fencing.
  2. Let the two sides at right angles to the wall be $x$. The third side is $40 - 2x$.
  3. Area: $A = x(40 - 2x) = 40x - 2x^2$.
  4. Vertex: $x = -\dfrac{40}{2(-2)} = 10$.
  5. Maximum area: $10 \times 20 = 200$ m².
  6. The pen is 10 m by 20 m: twice as long as it is wide.

In context, state the maximum or minimum value and where it occurs, with units, and check the answer fits any limits on the variable.

Check yourself

What is the minimum value of y = (x − 4)² + 3?

  • 19

  • 3

  • 4

  • −4

Show the answer

3

The squared bracket is at least zero, so the least value is 3, when x = 4.

Now test yourself

This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.

Practise in Impera