2.2 - Completing the square

2.2 - Completing the square

Rewrite a quadratic as a multiple of one squared bracket plus a constant. This form reveals values that are hidden in expanded algebra. You will handle positive, negative and fractional numbers inside the bracket and check that every coefficient stays the same.

Completing a monic quadratic (Higher)

How small can x2+6x+2x^2+6x+2 be when xx is any real number? Trying a few values may miss the smallest one. A squared bracket will make the answer visible.

You already know

Expand a squared bracket by multiplying two identical brackets. For example, (x+3)2=x2+6x+9(x+3)^2=x^2+6x+9, because both cross-products contribute 3x3x.

The picture shows why the extra 99 appears. An xx-square and two strips of area 3x3x almost make a larger square; its missing corner has area 99. This area picture uses x>0x>0, but the expanded identity works for every real xx.

[DIAGRAM: asset_slug: m028_completing_square; caption: Adding a corner of area 9 completes a square of side x plus 3; description: An x by x square, two x by 3 strips and a 3 by 3 corner form a square of side x plus 3. The four regions have areas x squared, 3x, 3x and 9. This area model assumes x is positive; file: m028_completing_square.png; recommended_method: matplotlib]
Adding a corner of area 9 completes a square of side x plus 3

Monic quadratic

A quadratic whose squared term has coefficient 11, such as x2+6x+2x^2+6x+2. The expression 2x2+6x+22x^2+6x+2 is quadratic but is not monic.

Completing the square means rewriting without changing the expression's value. Add the missing corner inside a square, then subtract it outside.

Squared bracket

(x+b)2=x2+2bx+b2(x+b)^2=x^2+2bx+b^2

For x2+px+qx^2+px+q, take b=p2b=\frac p2 and write (x+b)2+q−b2(x+b)^2+q-b^2. Higher: Not in the formulae sheet: learn it.

The number bb inside the bracket is half the linear coefficient. Its square is positive even when bb is negative.

Worked example 1: a positive linear coefficient

Question. Write x2+6x+2x^2+6x+2 in the form (x+b)2+c(x+b)^2+c.

Plan. Halve 66, form a squared bracket, then remove its extra constant.

b=6÷2=3halve the coefficientx2+6x+2=(x+3)2−9+2remove the extra 9=(x+3)2−7combine constants\begin{aligned} b&=6\div2=3 &&\text{halve the coefficient}\\ x^2+6x+2&=(x+3)^2-9+2 &&\text{remove the extra }9\\ &=(x+3)^2-7 &&\text{combine constants} \end{aligned}

Why subtract 99? The bracket contributes 323^2, which the original expression did not contain.

Answer. (x+3)2−7(x+3)^2-7.

Check. Expanding gives x2+6x+9−7=x2+6x+2x^2+6x+9-7=x^2+6x+2.

Now change only the sign of the linear term. The number inside the bracket changes sign; its square does not.

Worked example 2: a negative linear coefficient

Question. Write x2−6x+2x^2-6x+2 in the form (x+b)2+c(x+b)^2+c.

Plan. Halve −6-6, then compensate for the constant introduced.

b=−6÷2=−3keep the negative signx2−6x+2=(x−3)2−9+2subtract (−3)2=(x−3)2−7combine constants\begin{aligned} b&=-6\div2=-3 &&\text{keep the negative sign}\\ x^2-6x+2&=(x-3)^2-9+2 &&\text{subtract }(-3)^2\\ &=(x-3)^2-7 &&\text{combine constants} \end{aligned}

Why still subtract 99? Squaring −3-3 gives 99, not −9-9.

Answer. (x−3)2−7(x-3)^2-7, with b=−3b=-3 and c=−7c=-7.

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

A tempting shortcut is to forget the compensation. That changes the expression.

Watch out

Wrong: x2+8x+1=(x+4)2+1x^2+8x+1=(x+4)^2+1. The right side has constant 1717. Correct: (x+4)2−16+1=(x+4)2−15(x+4)^2-16+1=(x+4)^2-15.

Try a different negative linear coefficient. Keep the expression exact throughout.

Other leading coefficients (Higher)

If the squared term has coefficient 22, factor out 22 from the squared and linear terms first. Complete the square inside the bracket. Every constant introduced inside is multiplied by the outside coefficient.

Completed-square form

a(x+b)2+c=ax2+2abx+ab2+ca(x+b)^2+c=ax^2+2abx+ab^2+c

Here a≠0a\ne0. Match the squared coefficient first, then the linear coefficient and constant. Higher: Not in the formulae sheet: learn it.

The target is Pearson's form a(x+b)2+ca(x+b)^2+c. A negative number inside the bracket is written naturally as subtraction.

Worked example 3: factor the leading coefficient

Question. Complete the square for 2x2+12x+12x^2+12x+1.

Plan. Factor 22 from the first two terms, then complete the monic square.

2x2+12x+1=2(x2+6x)+1factor 2=2((x+3)2−9)+1complete inside=2(x+3)2−17use 1−18\begin{aligned} 2x^2+12x+1&=2(x^2+6x)+1 &&\text{factor }2\\ &=2\bigl((x+3)^2-9\bigr)+1 &&\text{complete inside}\\ &=2(x+3)^2-17 &&\text{use }1-18 \end{aligned}

Why subtract 1818 overall? The outside 22 multiplies the compensation −9-9 too.

Answer. 2(x+3)2−172(x+3)^2-17.

Check. 2(x2+6x+9)−17=2x2+12x+12(x^2+6x+9)-17=2x^2+12x+1.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account