Skip to the page
Home Campus
Start free

Completing the Square

How to write x2+px+qx^2 + px + q in the form (x+a)2+b(x + a)^2 + b by halving the coefficient of xx and squaring it, with even, odd and negative coefficients, and how that form shows the least value of the expression.

Before you start

In Secondary 2 you expanded perfect squares: (x+a)2=x2+2ax+a2(x + a)^2 = x^2 + 2ax + a^2 and (x−a)2=x2−2ax+a2.(x - a)^2 = x^2 - 2ax + a^2\text{.}

Look at the number term. It is the square of half the coefficient of xx: half of 2a2a is aa, and its square is a2a^2. This lesson uses the identity the other way round.

Example: Expanding a perfect square

Expand (x+3)2(x + 3)^2 and (x−5)2(x - 5)^2.

Solution

(x+3)2=x2+2(x)(3)+32=x2+6x+9(x + 3)^2 = x^2 + 2(x)(3) + 3^2 = x^2 + 6x + 9

(x−5)2=x2−2(x)(5)+52=x2−10x+25(x - 5)^2 = x^2 - 2(x)(5) + 5^2 = x^2 - 10x + 25

In each, the number term is the square of half the coefficient of xx: (62)2=32=9\left(\frac{6}{2}\right)^2 = 3^2 = 9 and (−102)2=(−5)2=25.\left(\frac{-10}{2}\right)^2 = (-5)^2 = 25\text{.}

(x+3)2=x2+6x+9(x + 3)^2 = x^2 + 6x + 9 and (x−5)2=x2−10x+25(x - 5)^2 = x^2 - 10x + 25

Half the Coefficient of xx, Squared

The expression x2+6xx^2 + 6x is not a perfect square. Adding the right number makes it one: x2+6x+9=(x+3)2.x^2 + 6x + 9 = (x + 3)^2\text{.} The right number is always found the same way: halve the coefficient of xx, and square the result.

By area. Draw x2x^2 as a square of side xx, and 6x6x as a rectangle xx by 66 beside it.

x2+6xx^2 + 6x

A square of side x, marked x squared, with a rectangle x by 6 beside it on the right, marked 6x. Together they make x squared plus 6x.x²6xx6x

Cut the rectangle in half along its length, into two strips xx by 33. Put one strip down the right side of the square and the other along the bottom. The shape is now nearly a square of side x+3x + 3: only the corner, 33 by 33, is missing. Adding that corner, 32=93^2 = 9, completes the square.

x2+6x+9=(x+3)2x^2 + 6x + 9 = (x + 3)^2

The square of side x with a strip x by 3 down its right side and another along its bottom, each marked 3x. The corner 3 by 3, drawn dashed and marked 9, completes a square of side x plus 3.x²3x3x9x3x3x + 3x + 3

Completing the square

To make x2+pxx^2 + px a perfect square, add the square of half the coefficient of xx:

x2+px+(p2)2=(x+p2)2x^2 + px + \left(\frac{p}{2}\right)^2 = \left(x + \frac{p}{2}\right)^2

The number in the bracket is half the coefficient of xx, with its sign: half of −10-10 is −5-5, so x2−10x+25=(x−5)2.x^2 - 10x + 25 = (x - 5)^2\text{.}

When pp is odd, half of it is a fraction, and so is the number added: half of 55 is 52\frac{5}{2}, and (52)2=254.\left(\frac{5}{2}\right)^2 = \frac{25}{4}\text{.} Fractions and decimals are both fine: 52=2.5\frac{5}{2} = 2.5 and 254=6.25\frac{25}{4} = 6.25.

Example 1: The number that completes the square

Find the number that must be added to each expression to make it a perfect square, and write the result as a square. (a) x2+8xx^2 + 8x (b) x2−10xx^2 - 10x (c) x2+5xx^2 + 5x (d) x2−3xx^2 - 3x

Solution

(a) Half of 88 is 44, and 42=164^2 = 16: x2+8x+16=(x+4)2.x^2 + 8x + 16 = (x + 4)^2\text{.}

(b) Half of −10-10 is −5-5, and (−5)2=25(-5)^2 = 25: x2−10x+25=(x−5)2.x^2 - 10x + 25 = (x - 5)^2\text{.} The number added is positive although the coefficient is negative, because a square is never negative.

(c) Half of 55 is 52\frac{5}{2}, and (52)2=254:\left(\frac{5}{2}\right)^2 = \frac{25}{4}\text{:} x2+5x+254=(x+52)2.x^2 + 5x + \frac{25}{4} = \left(x + \frac{5}{2}\right)^2\text{.}

(d) Half of −3-3 is −32-\frac{3}{2}, and (−32)2=94:\left(-\frac{3}{2}\right)^2 = \frac{9}{4}\text{:} x2−3x+94=(x−32)2.x^2 - 3x + \frac{9}{4} = \left(x - \frac{3}{2}\right)^2\text{.}

Check (d) by expanding: (x−32)2=x2−2(x)(32)+94=x2−3x+94\left(x - \frac{3}{2}\right)^2 = x^2 - 2(x)\left(\frac{3}{2}\right) + \frac{9}{4} = x^2 - 3x + \frac{9}{4} ✓

(a) 1616, (x+4)2(x + 4)^2; (b) 2525, (x−5)2(x - 5)^2; (c) 254\frac{25}{4}, (x+52)2\left(x + \frac{5}{2}\right)^2; (d) 94\frac{9}{4}, (x−32)2\left(x - \frac{3}{2}\right)^2

Writing x2+px+qx^2 + px + q as (x+a)2+b(x + a)^2 + b

An expression such as x2+6x+5x^2 + 6x + 5 already has a number term. We cannot simply add 99 to it: that would make a different expression. Instead, add 99 and subtract 99. Together they add 00, so the value does not change, and the first three terms make the square:

x2+6x+5=x2+6x+9−9+5=(x+3)2−4x^2 + 6x + 5 = x^2 + 6x + 9 - 9 + 5 = (x + 3)^2 - 4

Writing x2+px+qx^2 + px + q as (x+a)2+b(x + a)^2 + b, where aa and bb are numbers, is called completing the square, and (x+a)2+b(x + a)^2 + b is the completed-square form of the expression.

Completing the square for x2+px+qx^2 + px + q

1. Halve the coefficient of xx: p2\frac{p}{2}.

2. Square it: (p2)2\left(\frac{p}{2}\right)^2.

3. Add it and subtract it: x2+px+(p2)2−(p2)2+q.x^2 + px + \left(\frac{p}{2}\right)^2 - \left(\frac{p}{2}\right)^2 + q\text{.}

4. Write the first three terms as a square, and collect the numbers:

x2+px+q=(x+p2)2−(p2)2+qx^2 + px + q = \left(x + \frac{p}{2}\right)^2 - \left(\frac{p}{2}\right)^2 + q

Check by expanding your answer, or by putting the same number for xx into both forms.

Example 2: An even coefficient of xx

Express x2+6x+5x^2 + 6x + 5 in the form (x+a)2+b(x + a)^2 + b.

Solution

Half of 66 is 33, and 32=93^2 = 9. Add and subtract 99:

x2+6x+5=x2+6x+9−9+5x^2 + 6x + 5 = x^2 + 6x + 9 - 9 + 5

=(x+3)2−4= (x + 3)^2 - 4

Check by expanding: (x+3)2−4=x2+6x+9−4=x2+6x+5(x + 3)^2 - 4 = x^2 + 6x + 9 - 4 = x^2 + 6x + 5 ✓

x2+6x+5=(x+3)2−4,x^2 + 6x + 5 = (x + 3)^2 - 4\text{,} so a=3a = 3 and b=−4b = -4.

Example 3: A negative coefficient of xx

Express x2−8x+3x^2 - 8x + 3 in the form (x+a)2+b(x + a)^2 + b.

Solution

Half of −8-8 is −4-4, and (−4)2=16(-4)^2 = 16. Add and subtract 1616:

x2−8x+3=x2−8x+16−16+3x^2 - 8x + 3 = x^2 - 8x + 16 - 16 + 3

=(x−4)2−13= (x - 4)^2 - 13

The sign in the bracket is the sign of the coefficient of xx. The number 1616 is subtracted whatever that sign is.

In the form (x+a)2+b(x + a)^2 + b, the bracket (x−4)(x - 4) is (x+(−4))(x + (-4)), so here aa is negative.

Check with x=1x = 1: 1−8+3=−41 - 8 + 3 = -4, and (1−4)2−13=9−13=−4(1 - 4)^2 - 13 = 9 - 13 = -4 ✓

x2−8x+3=(x−4)2−13,x^2 - 8x + 3 = (x - 4)^2 - 13\text{,} so a=−4a = -4 and b=−13b = -13.

Example 4: An odd coefficient of xx

Express each in the form (x+a)2+b(x + a)^2 + b. (a) x2+5xx^2 + 5x (b) x2−3x+1x^2 - 3x + 1

Solution

(a) Half of 55 is 52\frac{5}{2}, and (52)2=254.\left(\frac{5}{2}\right)^2 = \frac{25}{4}\text{.} There is no number term to collect:

x2+5x=x2+5x+254−254=(x+52)2−254x^2 + 5x = x^2 + 5x + \frac{25}{4} - \frac{25}{4} = \left(x + \frac{5}{2}\right)^2 - \frac{25}{4}

(b) Half of −3-3 is −32-\frac{3}{2}, and (−32)2=94:\left(-\frac{3}{2}\right)^2 = \frac{9}{4}\text{:}

x2−3x+1=x2−3x+94−94+1=(x−32)2−54x^2 - 3x + 1 = x^2 - 3x + \frac{9}{4} - \frac{9}{4} + 1 = \left(x - \frac{3}{2}\right)^2 - \frac{5}{4}

since −94+1=−94+44=−54.-\frac{9}{4} + 1 = -\frac{9}{4} + \frac{4}{4} = -\frac{5}{4}\text{.} In decimals, this is (x−1.5)2−1.25(x - 1.5)^2 - 1.25.

Check (b) with x=1x = 1: 1−3+1=−11 - 3 + 1 = -1, and (1−32)2−54=14−54=−1\left(1 - \frac{3}{2}\right)^2 - \frac{5}{4} = \frac{1}{4} - \frac{5}{4} = -1 ✓

(a) (x+52)2−254;\left(x + \frac{5}{2}\right)^2 - \frac{25}{4}\text{;} (b) (x−32)2−54\left(x - \frac{3}{2}\right)^2 - \frac{5}{4}

Example 5: Finding the unknowns

Given that x2−12x+40=(x+a)2+bx^2 - 12x + 40 = (x + a)^2 + b for all values of xx, find aa and bb.

Solution

Expand the right side: (x+a)2+b=x2+2ax+a2+b.(x + a)^2 + b = x^2 + 2ax + a^2 + b\text{.}

Compare the xx terms: 2a=−122a = -12, so a=−6a = -6.

Compare the number terms: a2+b=40a^2 + b = 40, so 36+b=4036 + b = 40 and b=4b = 4.

Or complete the square: half of −12-12 is −6-6, (−6)2=36(-6)^2 = 36, and x2−12x+40=(x−6)2−36+40=(x−6)2+4,x^2 - 12x + 40 = (x - 6)^2 - 36 + 40 = (x - 6)^2 + 4\text{,} which is (x+a)2+b(x + a)^2 + b with a=−6a = -6.

a=−6a = -6 and b=4b = 4

The Least Value of x2+px+qx^2 + px + q

The completed-square form shows at once the smallest value an expression can take. Take (x−3)2+2(x - 3)^2 + 2. A square is never negative, so (x−3)2(x - 3)^2 is 00 or more, and (x−3)2+2(x - 3)^2 + 2 is 22 or more. It equals 22 only when the square is 00, that is, when x−3=0x - 3 = 0, or x=3x = 3.

xx(x−3)2(x - 3)^2(x−3)2+2(x - 3)^2 + 2
114466
221133
330022
441133
554466

The least value

For every value of xx, (x+a)2≥0(x + a)^2 \ge 0, so (x+a)2+b≥b(x + a)^2 + b \ge b.

The least value of (x+a)2+b(x + a)^2 + b is bb. It occurs when the bracket is 00, that is, when x=−ax = -a.

There is no greatest value: as xx moves away from −a-a, the square grows without end.

On the graph

In Secondary 2 you drew graphs such as y=x2−6x+11y = x^2 - 6x + 11 from a table and read the minimum point, the lowest point of the curve. Since x2−6x+11=(x−3)2+2,x^2 - 6x + 11 = (x - 3)^2 + 2\text{,} its minimum point is (3,2)(3, 2), the least value of yy is 22, and the line of symmetry is x=3x = 3. Lesson 1.7 sketches graphs from the completed-square form.

Example 6: Reading the least value

Find the least value of each expression and the value of xx at which it occurs. (a) x2−6x+11x^2 - 6x + 11 (b) x2+10x+18x^2 + 10x + 18

Solution

(a) Half of −6-6 is −3-3, and (−3)2=9(-3)^2 = 9: x2−6x+11=(x−3)2−9+11=(x−3)2+2.x^2 - 6x + 11 = (x - 3)^2 - 9 + 11 = (x - 3)^2 + 2\text{.}

The least value is 22, when x−3=0x - 3 = 0, that is, x=3x = 3.

Check: 32−6(3)+11=9−18+11=23^2 - 6(3) + 11 = 9 - 18 + 11 = 2 ✓

(b) Half of 1010 is 55, and 52=255^2 = 25: x2+10x+18=(x+5)2−25+18=(x+5)2−7.x^2 + 10x + 18 = (x + 5)^2 - 25 + 18 = (x + 5)^2 - 7\text{.}

The least value is −7-7, when x+5=0x + 5 = 0, that is, x=−5x = -5. The bracket x+5x + 5 is 00 at x=−5x = -5, not at x=5x = 5.

Check: (−5)2+10(−5)+18=25−50+18=−7(-5)^2 + 10(-5) + 18 = 25 - 50 + 18 = -7 ✓

(a) The least value is 22, when x=3x = 3. (b) The least value is −7-7, when x=−5x = -5.

Example 7: An odd coefficient

Find the least value of x2+3x+1x^2 + 3x + 1 and the value of xx at which it occurs.

Solution

Half of 33 is 32\frac{3}{2}, and (32)2=94:\left(\frac{3}{2}\right)^2 = \frac{9}{4}\text{:}

x2+3x+1=(x+32)2−94+1=(x+32)2−54x^2 + 3x + 1 = \left(x + \frac{3}{2}\right)^2 - \frac{9}{4} + 1 = \left(x + \frac{3}{2}\right)^2 - \frac{5}{4}

The least value is −54-\frac{5}{4}, when x+32=0x + \frac{3}{2} = 0, that is, x=−32x = -\frac{3}{2}.

Check in decimals: (−1.5)2+3(−1.5)+1=2.25−4.5+1=−1.25(-1.5)^2 + 3(-1.5) + 1 = 2.25 - 4.5 + 1 = -1.25 ✓

The least value is −54-\frac{5}{4} (or −1.25-1.25), when x=−32x = -\frac{3}{2} (or −1.5-1.5).

Example 8: Positive for every value of xx

Show that x2−4x+7x^2 - 4x + 7 is positive for every value of xx.

Solution

Half of −4-4 is −2-2, and (−2)2=4(-2)^2 = 4: x2−4x+7=(x−2)2−4+7=(x−2)2+3.x^2 - 4x + 7 = (x - 2)^2 - 4 + 7 = (x - 2)^2 + 3\text{.}

For every xx, (x−2)2≥0(x - 2)^2 \ge 0, so (x−2)2+3≥3(x - 2)^2 + 3 \ge 3.

An expression that is always 33 or more is always positive. So the equation x2−4x+7=0x^2 - 4x + 7 = 0 has no real solutions; lesson 1.2 meets this again.

x2−4x+7=(x−2)2+3,x^2 - 4x + 7 = (x - 2)^2 + 3\text{,} which is 33 or more, so it is positive for every value of xx.

Example 9: The least cost

A factory in Tuas makes bottles of soya bean drink. When it makes xx thousand bottles in a day, each bottle costs CC cents to make, where C=x2−8x+35C = x^2 - 8x + 35. Find the least cost of a bottle and the number of bottles a day that gives it.

Solution

Half of −8-8 is −4-4, and (−4)2=16(-4)^2 = 16: C=(x−4)2−16+35=(x−4)2+19.C = (x - 4)^2 - 16 + 35 = (x - 4)^2 + 19\text{.}

The least value of CC is 1919, when x−4=0x - 4 = 0, that is, x=4x = 4.

xx counts thousands of bottles, so x=4x = 4 means 40004000 bottles.

Check: 42−8(4)+35=16−32+35=194^2 - 8(4) + 35 = 16 - 32 + 35 = 19 ✓

The least cost is 1919 cents a bottle, when the factory makes 40004000 bottles a day.

Common Mistakes

  • Adding the square without subtracting it: x2+6x+5≠(x+3)2+5.x^2 + 6x + 5 \ne (x + 3)^2 + 5\text{.} The 99 inside the square must be taken away again: (x+3)2−9+5=(x+3)2−4.(x + 3)^2 - 9 + 5 = (x + 3)^2 - 4\text{.}
  • Squaring the whole coefficient instead of half of it: for x2+6xx^2 + 6x the number is 32=93^2 = 9, not 62=366^2 = 36.
  • The wrong sign in the bracket: x2−8x+3=(x−4)2−13,x^2 - 8x + 3 = (x - 4)^2 - 13\text{,} not (x+4)2−13(x + 4)^2 - 13.
  • Squaring a fraction wrongly: half of 55 is 52\frac{5}{2}, and its square is 254\frac{25}{4} (square the top and the bottom), not 252\frac{25}{2}.
  • The wrong sign for xx: (x+5)2−7(x + 5)^2 - 7 has its least value when x=−5x = -5, not when x=5x = 5.
  • Mixing up the least value and the value of xx: in (x−3)2+2(x - 3)^2 + 2 the least value is 22, and it occurs when x=3x = 3.

Practice

Try each question before you open its solution. Fractions may be given as fractions or as decimals.

Question 1

Find the number that must be added to make each expression a perfect square, and write the result as a square. (a) x2+12xx^2 + 12x (b) x2−14xx^2 - 14x (c) x2+7xx^2 + 7x (d) x2−xx^2 - x

ShowHide solution

(a) Half of 1212 is 66, and 62=366^2 = 36: x2+12x+36=(x+6)2.x^2 + 12x + 36 = (x + 6)^2\text{.}

(b) Half of −14-14 is −7-7, and (−7)2=49(-7)^2 = 49: x2−14x+49=(x−7)2.x^2 - 14x + 49 = (x - 7)^2\text{.}

(c) Half of 77 is 72\frac{7}{2}, and (72)2=494:\left(\frac{7}{2}\right)^2 = \frac{49}{4}\text{:} x2+7x+494=(x+72)2.x^2 + 7x + \frac{49}{4} = \left(x + \frac{7}{2}\right)^2\text{.}

(d) The coefficient of xx is −1-1. Half of −1-1 is −12-\frac{1}{2}, and (−12)2=14:\left(-\frac{1}{2}\right)^2 = \frac{1}{4}\text{:} x2−x+14=(x−12)2.x^2 - x + \frac{1}{4} = \left(x - \frac{1}{2}\right)^2\text{.}

(a) 3636, (x+6)2(x + 6)^2; (b) 4949, (x−7)2(x - 7)^2; (c) 494\frac{49}{4}, (x+72)2\left(x + \frac{7}{2}\right)^2; (d) 14\frac{1}{4}, (x−12)2\left(x - \frac{1}{2}\right)^2

Question 2

The figure shows x2+10xx^2 + 10x cm² as a square of side xx cm with two strips, each xx cm by 55 cm, along two of its sides. (a) Find the area of the corner piece that would complete the square. (b) Write x2+10xx^2 + 10x plus that piece as the square of a bracket, and state the side of the completed square.

A square of side x, marked x squared, with a strip x by 5 down its right side and another along its bottom, each marked 5x. The corner piece, 5 by 5, is drawn dashed and marked with a question mark.x²5x5x?x5x5
ShowHide solution

(a) The corner piece is 55 cm by 55 cm, so its area is 52=255^2 = 25 cm². (Half of 1010 is 55, and 52=255^2 = 25.)

(b) x2+10x+25=(x+5)2.x^2 + 10x + 25 = (x + 5)^2\text{.} The completed square has side x+5x + 5.

Check: (x+5)2=x2+10x+25(x + 5)^2 = x^2 + 10x + 25 ✓

(a) 2525 cm²; (b) x2+10x+25=(x+5)2,x^2 + 10x + 25 = (x + 5)^2\text{,} a square of side (x+5)(x + 5) cm.

Question 3

Express x2+8x+20x^2 + 8x + 20 in the form (x+a)2+b(x + a)^2 + b.

ShowHide solution

Half of 88 is 44, and 42=164^2 = 16: x2+8x+20=x2+8x+16−16+20=(x+4)2+4.x^2 + 8x + 20 = x^2 + 8x + 16 - 16 + 20 = (x + 4)^2 + 4\text{.}

Check with x=1x = 1: 1+8+20=291 + 8 + 20 = 29, and 52+4=295^2 + 4 = 29 ✓

x2+8x+20=(x+4)2+4x^2 + 8x + 20 = (x + 4)^2 + 4

Question 4

Express x2−10x+7x^2 - 10x + 7 in the form (x+a)2+b(x + a)^2 + b, and state aa and bb.

ShowHide solution

Half of −10-10 is −5-5, and (−5)2=25(-5)^2 = 25: x2−10x+7=x2−10x+25−25+7=(x−5)2−18.x^2 - 10x + 7 = x^2 - 10x + 25 - 25 + 7 = (x - 5)^2 - 18\text{.}

The bracket (x−5)(x - 5) is (x+(−5))(x + (-5)), so a=−5a = -5 and b=−18b = -18.

Check with x=1x = 1: 1−10+7=−21 - 10 + 7 = -2, and (−4)2−18=16−18=−2(-4)^2 - 18 = 16 - 18 = -2 ✓

x2−10x+7=(x−5)2−18,x^2 - 10x + 7 = (x - 5)^2 - 18\text{,} so a=−5a = -5 and b=−18b = -18.

Question 5

Express each in the form (x+a)2+b(x + a)^2 + b. (a) x2+3x−2x^2 + 3x - 2 (b) x2−5x+4x^2 - 5x + 4

ShowHide solution

(a) Half of 33 is 32\frac{3}{2}, and (32)2=94:\left(\frac{3}{2}\right)^2 = \frac{9}{4}\text{:}

x2+3x−2=(x+32)2−94−2=(x+32)2−174,x^2 + 3x - 2 = \left(x + \frac{3}{2}\right)^2 - \frac{9}{4} - 2 = \left(x + \frac{3}{2}\right)^2 - \frac{17}{4}\text{,} since 94+84=174.\frac{9}{4} + \frac{8}{4} = \frac{17}{4}\text{.}

Check with x=1x = 1: 1+3−2=21 + 3 - 2 = 2, and (52)2−174=254−174=2\left(\frac{5}{2}\right)^2 - \frac{17}{4} = \frac{25}{4} - \frac{17}{4} = 2 ✓

(b) Half of −5-5 is −52-\frac{5}{2}, and (−52)2=254:\left(-\frac{5}{2}\right)^2 = \frac{25}{4}\text{:}

x2−5x+4=(x−52)2−254+164=(x−52)2−94x^2 - 5x + 4 = \left(x - \frac{5}{2}\right)^2 - \frac{25}{4} + \frac{16}{4} = \left(x - \frac{5}{2}\right)^2 - \frac{9}{4}

Check with x=1x = 1: 1−5+4=01 - 5 + 4 = 0, and (−32)2−94=0\left(-\frac{3}{2}\right)^2 - \frac{9}{4} = 0 ✓

(a) (x+32)2−174;\left(x + \frac{3}{2}\right)^2 - \frac{17}{4}\text{;} (b) (x−52)2−94\left(x - \frac{5}{2}\right)^2 - \frac{9}{4}

Question 6

Write each expression in descending powers of xx, then express it in the form (x+a)2+b(x + a)^2 + b. (a) 10−6x+x210 - 6x + x^2 (b) x(x+4)−1x(x + 4) - 1

ShowHide solution

(a) 10−6x+x2=x2−6x+10.10 - 6x + x^2 = x^2 - 6x + 10\text{.} Half of −6-6 is −3-3, and (−3)2=9(-3)^2 = 9: x2−6x+10=(x−3)2−9+10=(x−3)2+1.x^2 - 6x + 10 = (x - 3)^2 - 9 + 10 = (x - 3)^2 + 1\text{.}

(b) Expand: x(x+4)−1=x2+4x−1.x(x + 4) - 1 = x^2 + 4x - 1\text{.} Half of 44 is 22, and 22=42^2 = 4: x2+4x−1=(x+2)2−4−1=(x+2)2−5.x^2 + 4x - 1 = (x + 2)^2 - 4 - 1 = (x + 2)^2 - 5\text{.}

Check (b) with x=1x = 1: 1×5−1=41 \times 5 - 1 = 4, and 32−5=43^2 - 5 = 4 ✓

(a) (x−3)2+1(x - 3)^2 + 1; (b) (x+2)2−5(x + 2)^2 - 5

Question 7

Given that x2+hx+20=(x−3)2+kx^2 + hx + 20 = (x - 3)^2 + k for all values of xx, find hh and kk.

ShowHide solution

Expand the right side: (x−3)2+k=x2−6x+9+k.(x - 3)^2 + k = x^2 - 6x + 9 + k\text{.}

Compare the xx terms: h=−6h = -6.

Compare the number terms: 9+k=209 + k = 20, so k=11k = 11.

Check: x2−6x+20=(x−3)2−9+20=(x−3)2+11x^2 - 6x + 20 = (x - 3)^2 - 9 + 20 = (x - 3)^2 + 11 ✓

h=−6h = -6 and k=11k = 11

Question 8

Find the least value of x2+4x+9x^2 + 4x + 9 and the value of xx at which it occurs.

ShowHide solution

Half of 44 is 22, and 22=42^2 = 4: x2+4x+9=(x+2)2−4+9=(x+2)2+5.x^2 + 4x + 9 = (x + 2)^2 - 4 + 9 = (x + 2)^2 + 5\text{.}

The least value is 55, when x+2=0x + 2 = 0, that is, x=−2x = -2.

Check: (−2)2+4(−2)+9=4−8+9=5(-2)^2 + 4(-2) + 9 = 4 - 8 + 9 = 5 ✓

The least value is 55, when x=−2x = -2.

Question 9

Find the least value of x2−7x+10x^2 - 7x + 10 and the value of xx at which it occurs.

ShowHide solution

Half of −7-7 is −72-\frac{7}{2}, and (−72)2=494:\left(-\frac{7}{2}\right)^2 = \frac{49}{4}\text{:}

x2−7x+10=(x−72)2−494+404=(x−72)2−94x^2 - 7x + 10 = \left(x - \frac{7}{2}\right)^2 - \frac{49}{4} + \frac{40}{4} = \left(x - \frac{7}{2}\right)^2 - \frac{9}{4}

The least value is −94-\frac{9}{4}, when x=72x = \frac{7}{2}.

Check in decimals: 3.52−7(3.5)+10=12.25−24.5+10=−2.253.5^2 - 7(3.5) + 10 = 12.25 - 24.5 + 10 = -2.25 ✓

The least value is −94-\frac{9}{4} (or −2.25-2.25), when x=72x = \frac{7}{2} (or 3.53.5).

Question 10

Show that x2+10x+30x^2 + 10x + 30 is positive for every value of xx, and state its least value.

ShowHide solution

Half of 1010 is 55, and 52=255^2 = 25: x2+10x+30=(x+5)2−25+30=(x+5)2+5.x^2 + 10x + 30 = (x + 5)^2 - 25 + 30 = (x + 5)^2 + 5\text{.}

For every xx, (x+5)2≥0(x + 5)^2 \ge 0, so (x+5)2+5≥5(x + 5)^2 + 5 \ge 5, which is positive.

The least value, 55, occurs when x=−5x = -5.

x2+10x+30=(x+5)2+5x^2 + 10x + 30 = (x + 5)^2 + 5 is 55 or more for every xx, so it is always positive. Its least value is 55.

Question 11

A fish supplier tests a new cold room at Jurong Fishery Port. Part-way through the test, the cooling is switched off for defrosting. The temperature in the room tt hours after it is switched on is TT °C, where T=t2−8t+20T = t^2 - 8t + 20 for 0≤t≤60 \le t \le 6. (a) What is the temperature when the room is switched on? (b) Find the lowest temperature in the room, and when it occurs.

ShowHide solution

(a) When it is switched on, t=0t = 0: T=0−0+20=20T = 0 - 0 + 20 = 20.

(b) Complete the square in tt exactly as in xx. Half of −8-8 is −4-4, and (−4)2=16(-4)^2 = 16: T=(t−4)2−16+20=(t−4)2+4.T = (t - 4)^2 - 16 + 20 = (t - 4)^2 + 4\text{.}

The least value of TT is 44, when t−4=0t - 4 = 0, that is, t=4t = 4, which lies between 00 and 66.

Check: 42−8(4)+20=16−32+20=44^2 - 8(4) + 20 = 16 - 32 + 20 = 4 ✓

(a) 2020 °C; (b) the lowest temperature is 44 °C, 44 hours after the room is switched on.

Question 12

Two numbers differ by 66. The smaller number is xx. (a) Show that their product is x2+6xx^2 + 6x. (b) Find the least possible value of their product, and the two numbers that give it.

ShowHide solution

(a) The larger number is x+6x + 6, so the product is x(x+6)=x2+6xx(x + 6) = x^2 + 6x.

(b) Half of 66 is 33, and 32=93^2 = 9: x2+6x=(x+3)2−9.x^2 + 6x = (x + 3)^2 - 9\text{.}

The least value is −9-9, when x+3=0x + 3 = 0, that is, x=−3x = -3. The larger number is then −3+6=3-3 + 6 = 3.

Check: 3−(−3)=63 - (-3) = 6 ✓ and (−3)×3=−9(-3) \times 3 = -9 ✓

(b) The least product is −9-9, given by the numbers −3-3 and 33.

Key Points

  • To complete the square for x2+pxx^2 + px, add the square of half the coefficient of xx: x2+px+(p2)2=(x+p2)2.x^2 + px + \left(\frac{p}{2}\right)^2 = \left(x + \frac{p}{2}\right)^2\text{.}
  • For an expression, add and subtract it: x2+px+q=(x+p2)2−(p2)2+q.x^2 + px + q = \left(x + \frac{p}{2}\right)^2 - \left(\frac{p}{2}\right)^2 + q\text{.}
  • The bracket takes the sign of the coefficient of xx: x2−8x+3=(x−4)2−13.x^2 - 8x + 3 = (x - 4)^2 - 13\text{.}
  • An odd coefficient gives fractions: x2+5x=(x+52)2−254.x^2 + 5x = \left(x + \frac{5}{2}\right)^2 - \frac{25}{4}\text{.}
  • Check by expanding, or by putting the same number for xx into both forms.
  • The least value of (x+a)2+b(x + a)^2 + b is bb, when x=−ax = -a, because a square is never negative.

Next lesson1.2 Solving Quadratic Equations by Completing the Square

All Secondary 3 (Grade 9) lessons

Home Campus has lessons, practice questions with worked solutions and worksheets for Primary 3 to Secondary 2. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 3 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.