E2.2 - Completing the square

E2.2 - Completing the square

A quadratic can be written as a square plus a correction, even when it has no simple integer factors. You will build that form, handle coefficients other than one and verify that your new expression is identical to the original. This lesson is for the Extended route.

Completing a monic square

Can x2+6x+5x^2+6x+5 be written using just one occurrence of xx? Since (x+3)2=x2+6x+9(x+3)^2=x^2+6x+9, the square adds four too much. Subtracting 44 gives exactly the expression we wanted.

Start with an area picture for x>0x>0: an xx-by-xx square and two strips, each xx-by-33, almost fill a square of side x+3x+3. The missing corner has area 99. The picture explains the construction; expansion then proves the identity for every real xx, including negative values that cannot represent lengths.

[DIAGRAM: asset_name: Completing the missing corner; asset_slug: completing_square_corner; caption: Two strips of area 3x need a corner of area 9 to complete the square.; description: A square of side x plus 3 is divided into an x by x region labelled x squared, two strips each labelled 3x, and a pale clay corner labelled 9. Side lengths x and 3 are marked. The diagram assumes x is positive and shows why x squared plus 6x plus 9 equals the square of x plus 3.]
Two strips of area 3x need a corner of area 9 to complete the square.

Completing the square

Completing the square rewrites a quadratic as a(x+h)2+ka(x+h)^2+k, where a≠0a\ne0. It changes the form of the expression, not its value. For a monic quadratic, a=1a=1.

Half the coefficient of xx gives the number inside the bracket, because the cross-term in (x+h)2(x+h)^2 is 2hx2hx. Add and subtract its square to keep the total unchanged.

Worked example 1: an even middle coefficient

Question. Write x2+8x+3x^2+8x+3 in completed-square form.

Plan. Use half of 88, then compensate for the new square term.

x2+8x+3=x2+8x+16−16+3add and subtract 42=(x+4)2−16+3first three terms are a square=(x+4)2−13collect constants\begin{aligned} x^2+8x+3&=x^2+8x+16-16+3 && \text{add and subtract }4^2\\ &=(x+4)^2-16+3 && \text{first three terms are a square}\\ &=(x+4)^2-13 && \text{collect constants} \end{aligned}

Answer. (x+4)2−13(x+4)^2-13.

Check. Expanding gives x2+8x+16−13=x2+8x+3x^2+8x+16-13=x^2+8x+3.

Change only the middle coefficient from 88 to 55. Its half is now a fraction, so keep the arithmetic exact.

Worked example 2: an odd middle coefficient

Question. Write x2+5x+3x^2+5x+3 in completed-square form.

Plan. Use 52\frac52 inside the bracket and subtract 254\frac{25}{4}.

x2+5x+3=(x+52)2−254+3compensate for the square=(x+52)2−134write 3=124\begin{aligned} x^2+5x+3&=\left(x+\frac52\right)^2-\frac{25}{4}+3 && \text{compensate for the square}\\ &=\left(x+\frac52\right)^2-\frac{13}{4} && \text{write }3=\frac{12}{4} \end{aligned}

Answer. (x+52)2−134\left(x+\frac52\right)^2-\frac{13}{4}.

Check. Expansion gives x2+5x+254−134=x2+5x+3x^2+5x+\frac{25}{4}-\frac{13}{4}=x^2+5x+3.

For a negative middle term, half its signed coefficient: x2−6x=(x−3)2−9x^2-6x=(x-3)^2-9. The squared correction is still positive before it is subtracted.

Watch out

x2+5x+3=(x+5)2+3x^2+5x+3=(x+5)^2+3 is wrong: the cross-term becomes 10x10x. Half the middle coefficient, then subtract the square you introduced.

Fractions inside a completed square are exact numbers; a common denominator keeps the correction clear.

A coefficient before the square

When the leading coefficient is 22, the whole completed square and its correction must be multiplied by 22. First factor the leading coefficient out of the quadratic and linear terms. Keep the original constant outside, so you can see the correction clearly.

For example, 2x2+12x+1=2(x2+6x)+12x^2+12x+1=2(x^2+6x)+1. Completing the bracket gives 2[(x+3)2−9]+12[(x+3)^2-9]+1, so the outside correction is −18-18, not −9-9.

General completed-square form

For real a,b,c,xa,b,c,x with a≠0a\ne0,

ax2+bx+c=a(x+b2a)2+c−b24aax^2+bx+c=a\left(x+\frac{b}{2a}\right)^2+c-\frac{b^2}{4a}

The condition a≠0a\ne0 permits division by aa and ensures the expression is quadratic. The method works for positive and negative aa. Not given in the List of formulas: learn the method.

You can use the formula to check your work, but factoring first makes the source of every correction visible.

Worked example 3: a positive leading coefficient

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

Plan. Take out 22 from the first two terms, complete the inner square, then distribute 22.

2x2+12x+7=2(x2+6x)+7factor the first two terms=2[(x+3)2−9]+7complete inside=2(x+3)2−11multiply the correction by 2\begin{aligned} 2x^2+12x+7&=2(x^2+6x)+7 && \text{factor the first two terms}\\ &=2[(x+3)^2-9]+7 && \text{complete inside}\\ &=2(x+3)^2-11 && \text{multiply the correction by }2 \end{aligned}

Answer. 2(x+3)2−112(x+3)^2-11.

Check. Expanding gives 2x2+12x+18−11=2x2+12x+72x^2+12x+18-11=2x^2+12x+7.

Continue this lesson.

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

Create free account