6.01f - Completing the square

6.01f - Completing the square

The same quadratic can be written as an expanded expression or as a shifted square plus a constant. You will complete the square for monic and non-monic quadratics, keep fractional values exact and check each result by expansion. This form will later make important features of quadratic graphs easier to see.

Completing a monic square

Can you rewrite x2+6x+5x^2+6x+5 so that the letter appears inside just one squared bracket?

Higher only. Start with the nearby square: (x+3)2=x2+6x+9(x+3)^2=x^2+6x+9. Its first two terms are exactly right, but its constant is four too large. Subtracting four repairs that difference without changing the expression.

Completing the square

Completing the square means rewriting a quadratic in the form a(x+p)2+qa(x+p)^2+q, where a≠0a\ne0. A monic quadratic has coefficient 11 before x2x^2, so a=1a=1.

The middle term in (x+p)2=x2+2px+p2(x+p)^2=x^2+2px+p^2 is 2px2px. Therefore halve the coefficient of xx to find the number inside the bracket. Add and subtract its square so the overall value stays unchanged:

x2+bx+c=(x+b2)2+c−(b2)2.x^2+bx+c=\left(x+\frac b2\right)^2+c-\left(\frac b2\right)^2.

For positive xx, the area picture shows why adding 99 completes the square. The algebraic identity also holds for zero and negative xx, even though those are not positive side lengths.

[DIAGRAM: asset_name: Completing a square by adding the missing corner; asset_slug: completing-square-area; caption: Two strips of area 3x need a corner of area 9 to make a square of side x + 3.; description: A square is split into a blue x by x square, two sage rectangles each x by 3, and a clay 3 by 3 corner. Side segments are labelled x and 3. The total area is x squared plus 6x plus 9, equal to the square of x plus 3. This is an area model for positive x.]
Two strips of area 3x need a corner of area 9 to make a square of side x + 3.

Worked example 1: repairing the constant

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

Plan. Use 33 inside the bracket, then compensate for the added 99.

x2+6x+5=x2+6x+9−9+5add and subtract 9=(x+3)2−4collect the constants\begin{aligned} x^2+6x+5 &=x^2+6x+9-9+5 && \text{add and subtract 9} \\ &=(x+3)^2-4 && \text{collect the constants} \end{aligned}

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

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

Change only the sign of the linear term. The bracket number becomes negative, but its square is still positive.

Worked example 2: a negative linear coefficient

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

Plan. Halve −6-6 to get −3-3, then compensate for (−3)2=9(-3)^2=9.

x2−6x+5=x2−6x+9−9+5complete the square=(x−3)2−4simplify the constant\begin{aligned} x^2-6x+5 &=x^2-6x+9-9+5 && \text{complete the square} \\ &=(x-3)^2-4 && \text{simplify the constant} \end{aligned}

Answer. (x−3)2−4(x-3)^2-4.

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

The opening expression is therefore a square minus four. Unlike factorising into linear brackets, this method does not depend on finding integer factors of the quadratic.

Watch out

x2−6x+5≠(x−3)2+5x^2-6x+5\ne(x-3)^2+5: that right side has constant 1414. The square has already introduced 99, so subtract it before restoring the original constant.

Use expansion to check your own bracket and constant.

Completing squares with fractions

An odd linear coefficient produces a fraction inside the square, but the method is unchanged.

For example, half of 55 is 5/25/2, and (5/2)2=25/4(5/2)^2=25/4. Keeping these as fractions avoids rounding. Convert the original constant to quarters before combining it with −25/4-25/4.

Worked example 3: an odd linear coefficient

Question. Complete the square in x2+5x+2x^2+5x+2.

Plan. Use 5/25/2 in the bracket and express both constants in quarters.

x2+5x+2=(x+52)2−254+2compensate=(x+52)2−254+84common denominator=(x+52)2−174combine\begin{aligned} x^2+5x+2 &=\left(x+\frac52\right)^2-\frac{25}{4}+2 && \text{compensate} \\ &=\left(x+\frac52\right)^2-\frac{25}{4}+\frac84 && \text{common denominator} \\ &=\left(x+\frac52\right)^2-\frac{17}{4} && \text{combine} \end{aligned}

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

Check. Expansion gives x2+5x+25/4−17/4=x2+5x+2x^2+5x+25/4-17/4=x^2+5x+2.

Continue this lesson.

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

Create free account