Lesson 16: Completing the square for ax2+bx+c

Introduction

As with factorising to double brackets, completing the square also has to be able to deal with a coefficient of \(~x^2~\) greater than 1. The completed square form is then \(~a(x+p)^2+q~\).

In Section A, you'll get the opportunity to practise the method with nice numbers (I've made them artificially nice by ensuring \(~b~\) is always a multiple of \(~2a~\)). In Section B, it's back to reality!

SECTION A

Let's say you're asked to write \(~2x^2+12x+7~\) in the form \(~a(x+p)^2+q~\).

Step 1

Factorise the first two terms to a single bracket by taking out a factor of \(~a\). Here, \(~a~\) is 2 so we take out a factor of 2.

\(~2[x^2+6x]+7~\)

Step 2

Now complete the square on the bit in the square brackets. That's \(~x^2+6x~\). You should know how to do this from Lesson 15.

Half the coefficient of \(~x~\) is \(~+3~\)

\(~(+3)^2=9~\)

The constant term is \(~0~\). In other words, there isn't one!

So we have \(~(x+3)^2-9~\)

Step 3

Put this in the square brackets instead of \(~x^2+6x\).

\(~2[(x+3)^2-9]+7~\)

Step 4

Now expand the square brackets back out by multiplying by \(~a~\).

\(~2(x+3)^2-18+7~\)

Step 5

Simplify and relax!

\(~2(x+3)^2-11~\)

As always, to master this you will have to practise it! Check the worked solutions as you go. They will keep you on track!

Practise to master

SECTION A

Write these expressions in the form \(~a(x+p)^2+q~\).

01) \(~2x^2+4x+5~\)

Factorise (two terms): \(~2[x^2+2x]+5~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+1~\)
 ⇒ \(~(+1)^2=1~\)
 ⇒ So we have \(~(x+1)^2-1~\)
Substitute into square brackets: \(~2[(x+1)^2-1]+5~\)
Expand square brackets: \(~2(x+1)^2-2+5~\)
Simplify: \(~2(x+1)^2+3~\)

02) \(~2x^2+12x-3~\)

Factorise (two terms): \(~2[x^2+6x]-3~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+3~\)
 ⇒ \(~(+3)^2=9~\)
 ⇒ So we have \(~(x+3)^2-9~\)
Substitute into square brackets: \(~2[(x+3)^2-9]-3~\)
Expand square brackets: \(~2(x+3)^2-18-3~\)
Simplify: \(~2(x+3)^2-21~\)

03) \(~2x^2-8x+1~\)

Factorise (two terms): \(~2[x^2-4x]+1~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-2~\)
 ⇒ \(~(-2)^2=4~\)
 ⇒ So we have \(~(x-2)^2-4~\)
Substitute into square brackets: \(~2[(x-2)^2-4]+1~\)
Expand square brackets: \(~2(x-2)^2-8+1~\)
Simplify: \(~2(x-2)^2-7~\)

04) \(~3x^2-6x-7~\)

Factorise (two terms): \(~3[x^2-2x]-7~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-1~\)
 ⇒ \(~(-1)^2=1~\)
 ⇒ So we have \(~(x-1)^2-1~\)
Substitute into square brackets: \(~3[(x-1)^2-1]-7~\)
Expand square brackets: \(~3(x-1)^2-3-7~\)
Simplify: \(~3(x-1)^2-10~\)

05) \(~3x^2+18x+4~\)

Factorise (two terms): \(~3[x^2+6x]+4~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+3~\)
 ⇒ \(~(+3)^2=9~\)
 ⇒ So we have \(~(x+3)^2-9~\)
Substitute into square brackets: \(~3[(x+3)^2-9]+4~\)
Expand square brackets: \(~3(x+3)^2-27+4~\)
Simplify: \(~3(x+3)^2-23~\)

06) \(~3x^2+12x-2~\)

Factorise (two terms): \(~3[x^2+4x]-2~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+2~\)
 ⇒ \(~(+2)^2=4~\)
 ⇒ So we have \(~(x+2)^2-4~\)
Substitute into square brackets: \(~3[(x+2)^2-4]-2~\)
Expand square brackets: \(~3(x+2)^2-12-2~\)
Simplify: \(~3(x+2)^2-14~\)

07) \(~2x^2-16x+9~\)

Factorise (two terms): \(~2[x^2-8x]+9~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-4~\)
 ⇒ \(~(-4)^2=16~\)
 ⇒ So we have \(~(x-4)^2-16~\)
Substitute into square brackets: \(~2[(x-4)^2-16]+9~\)
Expand square brackets: \(~2(x-4)^2-32+9~\)
Simplify: \(~2(x-4)^2-23~\)

08) \(~3x^2-24x-8~\)

Factorise (two terms): \(~3[x^2-8x]-8~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-4~\)
 ⇒ \(~(-4)^2=16~\)
 ⇒ So we have \(~(x-4)^2-16~\)
Substitute into square brackets: \(~3[(x-4)^2-16]-8~\)
Expand square brackets: \(~3(x-4)^2-48-8~\)
Simplify: \(~3(x-4)^2-56~\)

09) \(~4x^2+8x+5~\)

Factorise (two terms): \(~4[x^2+2x]+5~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+1~\)
 ⇒ \(~(+1)^2=1~\)
 ⇒ So we have \(~(x+1)^2-1~\)
Substitute into square brackets: \(~4[(x+1)^2-1]+5~\)
Expand square brackets: \(~4(x+1)^2-4+5~\)
Simplify: \(~4(x+1)^2+1~\)

10) \(~5x^2+20x-6~\)

Factorise (two terms): \(~5[x^2+4x]-6~\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+2~\)
 ⇒ \(~(+2)^2=4~\)
 ⇒ So we have \(~(x+2)^2-4~\)
Substitute into square brackets: \(~5[(x+2)^2-4]-6~\)
Expand square brackets: \(~5(x+2)^2-20-6~\)
Simplify: \(~5(x+2)^2-26~\)

SECTION B

Again, the only thing that makes this section harder is the presence of fractions. Your most valuable assets here will be concentration and patience.

Example

Express \(~2x^2+11x-5~\) in the form \(~a(x+p)^2+q~\)

Step 1

Factorise the first two terms to a single bracket by taking out a factor of \(~a~\). Here, \(~a~\) (the coefficient of \(~x^2~\)) is 2 so we take out a factor of 2. Normally, we'd say these two terms can't be factorised to a single bracket because there is no common factor of 2 and 11. But when it comes to completing the square, we'll settle for a fraction!

\(~2\Big[x^2+\frac{11}{2}~x\Big]-5~\)

Step 2

Now complete the square on the bit in the square brackets.

Half the coefficient of \(~x~\) is \(~+\frac{11}{4}~\)

\(~\Big(+\frac{11}{4}~\Big)^2=\frac{121}{16}~\)

So we have \(~\Big(x+\frac{11}{4}~\Big)^2-\frac{121}{16}\)

Step 3

Put this in the square brackets instead of \(~x^2+\frac{11}{2}~x\).

\(~2\Big[\Big(x+\frac{11}{4}~\Big)^2-\frac{121}{16}\Big]-5~\)

Step 4

Now expand the square brackets back out by multiplying by \(~a~\).

\(~2\Big(x+\frac{11}{4}~\Big)^2-\frac{121}{8}-5~\)

Step 5

Simplify and relax!

\(~2\Big(x+\frac{11}{4}~\Big)^2-\frac{121}{8}-\frac{40}{8}~\)

\(~2\Big(x+\frac{11}{4}~\Big)^2-\frac{161}{8}~\)

Tip!

To multiply a fraction by 2, divide the denominator by 2 (if possible); your answer will then be a fraction in its simplest form. If the denominator is not divisible by 2, you will have to multiply the numerator by 2 instead.

To divide a fraction by 2, divide the numerator by 2 (if possible); your answer will then be a fraction in its simplest form. If the numerator is not divisible by 2, you will have to multiply the denominator by 2 instead.

The same goes for multiplying and dividing a fraction by 3, 4, 5, etc.

Good luck! You'll get there!

Practise to master

SECTION B

Write these expressions in the form \(~a(x+p)^2+q~\).

01) \(~2x^2+6x+5\)

Factorise (two terms): \(~2[x^2+3x]+5\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+\frac{3}{2}\)
 ⇒\(~\Big(+\frac{3}{2}~~\Big)^2=\frac{9}{4}\)
 ⇒ So we have \(~\Big(x+\frac{3}{2}~\Big)^2-\frac{9}{4}\)
Substitute into square brackets: \(~2\Big[\Big(x+\frac{3}{2}~\Big)^2-\frac{9}{4}~\Big]+5\)
Expand square brackets: \(~2\Big(x+\frac{3}{2}~\Big)^2-\frac{9}{2}~+~5\)
Simplify:
\(~2\Big(x+\frac{3}{2}~\Big)^2-\frac{9}{2}~+\frac{10}{2}\)
\(~2\Big(x+\frac{3}{2}~\Big)^2+\frac{1}{2}\)

02) \(~2x^2+2x-1\)

Factorise (two terms): \(~2[x^2+x]-1\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+\frac{1}{2}\)
 ⇒\(~\Big(+\frac{1}{2}~~\Big)^2=\frac{1}{4}\)
 ⇒ So we have \(~\Big(x+\frac{1}{2}~\Big)^2-\frac{1}{4}\)
Substitute into square brackets: \(~2\Big[\Big(x+\frac{1}{2}~\Big)^2-\frac{1}{4}~\Big]-1\)
Expand square brackets: \(~2\Big(x+\frac{1}{2}~\Big)^2-\frac{1}{2}~-~1\)
Simplify:
\(~2\Big(x+\frac{1}{2}~\Big)^2-\frac{1}{2}~-\frac{2}{2}\)
\(~2\Big(x+\frac{1}{2}~\Big)^2-\frac{3}{2}\)

03) \(~2x^2-10x+3\)

Factorise (two terms): \(~2[x^2-5x]+3\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-\frac{5}{2}\)
 ⇒\(~\Big(-\frac{5}{2}~~\Big)^2=\frac{25}{4}\)
 ⇒ So we have \(~\Big(x-\frac{5}{2}~\Big)^2-\frac{25}{4}\)
Substitute into square brackets: \(~2\Big[\Big(x-\frac{5}{2}~\Big)^2-\frac{25}{4}~\Big]+3\)
Expand square brackets: \(~2\Big(x-\frac{5}{2}~\Big)^2-\frac{25}{2}~+~3\)
Simplify:
\(~2\Big(x-\frac{5}{2}~\Big)^2-\frac{25}{2}~+\frac{6}{2}\)
\(~2\Big(x-\frac{5}{2}~\Big)^2-\frac{19}{2}\)

04) \(~2x^2-5x-6\)

Factorise (two terms): \(~2[x^2-\frac{5}{2}~x]-6\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-\frac{5}{4}\)
 ⇒\(~\Big(-\frac{5}{4}~~\Big)^2=\frac{25}{16}\)
 ⇒ So we have \(~\Big(x-\frac{5}{4}~\Big)^2-\frac{25}{16}\)
Substitute into square brackets: \(~2\Big[\Big(x-\frac{5}{4}~\Big)^2-\frac{25}{16}~\Big]-6\)
Expand square brackets: \(~2\Big(x-\frac{5}{4}~\Big)^2-\frac{25}{8}~-~6\)
Simplify:
\(~2\Big(x-\frac{5}{4}~\Big)^2-\frac{25}{8}~-\frac{48}{8}\)
\(~2\Big(x-\frac{5}{4}~\Big)^2-\frac{73}{8}\)

05) \(~2x^2+9x+1\)

Factorise (two terms): \(~2[x^2+\frac{9}{2}~x]+1\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+\frac{9}{4}\)
 ⇒\(~\Big(+\frac{9}{4}~~\Big)^2=\frac{81}{16}\)
 ⇒ So we have \(~\Big(x+\frac{9}{4}~\Big)^2-\frac{81}{16}\)
Substitute into square brackets: \(~2\Big[\Big(x+\frac{9}{4}~\Big)^2-\frac{81}{16}~\Big]+1\)
Expand square brackets: \(~2\Big(x+\frac{9}{4}~\Big)^2-\frac{81}{8}~+~1\)
Simplify:
\(~2\Big(x+\frac{9}{4}~\Big)^2-\frac{81}{8}~+\frac{8}{8}\)
\(~2\Big(x+\frac{9}{4}~\Big)^2-\frac{73}{8}\)

06) \(~2x^2+3x-2\)

Factorise (two terms): \(~2[x^2+\frac{3}{2}~x]-2\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+\frac{3}{4}\)
 ⇒\(~\Big(+\frac{3}{4}~~\Big)^2=\frac{9}{16}\)
 ⇒ So we have \(~\Big(x+\frac{3}{4}~\Big)^2-\frac{9}{16}\)
Substitute into square brackets: \(~2\Big[\Big(x+\frac{3}{4}~\Big)^2-\frac{9}{16}~\Big]-2\)
Expand square brackets: \(~2\Big(x+\frac{3}{4}~\Big)^2-\frac{9}{8}~-~2\)
Simplify:
\(~2\Big(x+\frac{3}{4}~\Big)^2-\frac{9}{8}~-\frac{16}{8}\)
\(~2\Big(x+\frac{3}{4}~\Big)^2-\frac{25}{8}\)

07) \(~3x^2-4x+5\)

Factorise (two terms): \(~3[x^2-\frac{4}{3}~x]+5\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-\frac{2}{3}\)
 ⇒\(~\Big(-\frac{2}{3}~~\Big)^2=\frac{4}{9}\)
 ⇒ So we have \(~\Big(x-\frac{2}{3}~\Big)^2-\frac{4}{9}\)
Substitute into square brackets: \(~3\Big[\Big(x-\frac{2}{3}~\Big)^2-\frac{4}{9}~\Big]+5\)
Expand square brackets: \(~3\Big(x-\frac{2}{3}~\Big)^2-\frac{4}{3}~+~5\)
Simplify:
\(~3\Big(x-\frac{2}{3}~\Big)^2-\frac{4}{3}~+\frac{15}{3}\)
\(~3\Big(x-\frac{2}{3}~\Big)^2+\frac{11}{3}\)

08) \(~2x^2-7x-4\)

Factorise (two terms): \(~2[x^2-\frac{7}{2}~x]-4\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-\frac{7}{4}\)
 ⇒\(~\Big(-\frac{7}{4}~~\Big)^2=\frac{49}{16}\)
 ⇒ So we have \(~\Big(x-\frac{7}{4}~\Big)^2-\frac{49}{16}\)
Substitute into square brackets: \(~2\Big[\Big(x-\frac{7}{4}~\Big)^2-\frac{49}{16}~\Big]-4\)
Expand square brackets: \(~2\Big(x-\frac{7}{4}~\Big)^2-\frac{49}{8}~-~4\)
Simplify:
\(~2\Big(x-\frac{7}{4}~\Big)^2-\frac{49}{8}~-\frac{32}{8}\)
\(~2\Big(x-\frac{7}{4}~\Big)^2-\frac{81}{8}\)

09) \(~3x^2+8x+7\)

Factorise (two terms): \(~3[x^2+\frac{8}{3}~x]+7\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+\frac{4}{3}\)
 ⇒\(~\Big(+\frac{4}{3}~~\Big)^2=\frac{16}{9}\)
 ⇒ So we have \(~\Big(x+\frac{4}{3}~\Big)^2-\frac{16}{9}\)
Substitute into square brackets: \(~3\Big[\Big(x+\frac{4}{3}~\Big)^2-\frac{16}{9}~\Big]+7\)
Expand square brackets: \(~3\Big(x+\frac{4}{3}~\Big)^2-\frac{16}{3}~+~7\)
Simplify:
\(~3\Big(x+\frac{4}{3}~\Big)^2-\frac{16}{3}~+\frac{21}{3}\)
\(~3\Big(x+\frac{4}{3}~\Big)^2+\frac{5}{3}\)

10) \(~4x^2+6x-5\)

Factorise (two terms): \(~4[x^2+\frac{6}{4}~x]-5\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+\frac{3}{4}\)
 ⇒\(~\Big(+\frac{3}{4}~~\Big)^2=\frac{9}{16}\)
 ⇒ So we have \(~\Big(x+\frac{3}{4}~\Big)^2-\frac{9}{16}\)
Substitute into square brackets: \(~4\Big[\Big(x+\frac{3}{4}~\Big)^2-\frac{9}{16}~\Big]-5\)
Expand square brackets: \(~4\Big(x+\frac{3}{4}~\Big)^2-\frac{9}{4}~-~5\)
Simplify:
\(~4\Big(x+\frac{3}{4}~\Big)^2-\frac{9}{4}~-\frac{20}{4}\)
\(~4\Big(x+\frac{3}{4}~\Big)^2-\frac{29}{4}\)

11) \(~3x^2-8x+9\)

Factorise (two terms): \(~3[x^2-\frac{8}{3}~x]+9\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-\frac{4}{3}\)
 ⇒\(~\Big(-\frac{4}{3}~~\Big)^2=\frac{16}{9}\)
 ⇒ So we have \(~\Big(x-\frac{4}{3}~\Big)^2-\frac{16}{9}\)
Substitute into square brackets: \(~3\Big[\Big(x-\frac{4}{3}~\Big)^2-\frac{16}{9}~\Big]+9\)
Expand square brackets: \(~3\Big(x-\frac{4}{3}~\Big)^2-\frac{16}{3}~+~9\)
Simplify:
\(~3\Big(x-\frac{4}{3}~\Big)^2-\frac{16}{3}~+\frac{27}{3}\)
\(~3\Big(x-\frac{4}{3}~\Big)^2+\frac{11}{3}\)

12) \(~2x^2-3x-2\)

Factorise (two terms): \(~2[x^2-\frac{3}{2}~x]-2\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-\frac{3}{4}\)
 ⇒\(~\Big(-\frac{3}{4}~~\Big)^2=\frac{9}{16}\)
 ⇒ So we have \(~\Big(x-\frac{3}{4}~\Big)^2-\frac{9}{16}\)
Substitute into square brackets: \(~2\Big[\Big(x-\frac{3}{4}~\Big)^2-\frac{9}{16}~\Big]-2\)
Expand square brackets: \(~2\Big(x-\frac{3}{4}~\Big)^2-\frac{9}{8}~-~2\)
Simplify:
\(~2\Big(x-\frac{3}{4}~\Big)^2-\frac{9}{8}~-\frac{16}{8}\)
\(~2\Big(x-\frac{3}{4}~\Big)^2-\frac{25}{8}\)

13) \(~3x^2+5x+1\)

Factorise (two terms): \(~3[x^2+\frac{5}{3}~x]+1\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+\frac{5}{6}\)
 ⇒\(~\Big(+\frac{5}{6}~~\Big)^2=\frac{25}{36}\)
 ⇒ So we have \(~\Big(x+\frac{5}{6}~\Big)^2-\frac{25}{36}\)
Substitute into square brackets: \(~3\Big[\Big(x+\frac{5}{6}~\Big)^2-\frac{25}{36}~\Big]+1\)
Expand square brackets: \(~3\Big(x+\frac{5}{6}~\Big)^2-\frac{25}{12}~+~1\)
Simplify:
\(~3\Big(x+\frac{5}{6}~\Big)^2-\frac{25}{12}~+\frac{12}{12}\)
\(~3\Big(x+\frac{5}{6}~\Big)^2-\frac{13}{12}\)

14) \(~4x^2+7x-6\)

Factorise (two terms): \(~4[x^2+\frac{7}{4}~x]-6\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~+\frac{7}{8}\)
 ⇒\(~\Big(+\frac{7}{8}~~\Big)^2=\frac{49}{64}\)
 ⇒ So we have \(~\Big(x+\frac{7}{8}~\Big)^2-\frac{49}{64}\)
Substitute into square brackets: \(~4\Big[\Big(x+\frac{7}{8}~\Big)^2-\frac{49}{64}~\Big]-6\)
Expand square brackets: \(~4\Big(x+\frac{7}{8}~\Big)^2-\frac{49}{16}~-~6\)
Simplify:
\(~4\Big(x+\frac{7}{8}~\Big)^2-\frac{49}{16}~-\frac{96}{16}\)
\(~4\Big(x+\frac{7}{8}~\Big)^2-\frac{145}{16}\)

15) \(~5x^2-9x+3\)

Factorise (two terms): \(~5[x^2-\frac{9}{5}~x]+3\)
Complete square inside square brackets:
 ⇒ Half the coefficient of \(~x~\) is \(~-\frac{9}{10}\)
 ⇒\(~\Big(-\frac{9}{10}~~\Big)^2=\frac{81}{100}\)
 ⇒ So we have \(~\Big(x-\frac{9}{10}~\Big)^2-\frac{81}{100}\)
Substitute into square brackets: \(~5\Big[\Big(x-\frac{9}{10}~\Big)^2-\frac{81}{100}~\Big]+3\)
Expand square brackets: \(~5\Big(x-\frac{9}{10}~\Big)^2-\frac{81}{20}~+~3\)
Simplify:
\(~5\Big(x-\frac{9}{10}~\Big)^2-\frac{81}{20}~+\frac{60}{20}\)
\(~5\Big(x-\frac{9}{10}~\Big)^2-\frac{21}{20}\)

▲ TOP