HA4, HA11, HA18 - Completing the square

HA4, HA11, HA18 - Completing the square

Can you find a quadratic's lowest value without trying a long list of inputs? HA4 rewrites quadratics as a square plus a constant. HA11 uses that form to locate turning points, and HA18 uses it to solve quadratic equations exactly or approximately.

Monic quadratics

The expression x2+6x+2x^2+6x+2 is monic, meaning its x2x^2 coefficient is one. It contains the first two terms of (x+3)2=x2+6x+9(x+3)^2=x^2+6x+9. Adding and subtracting the missing nine reveals a square without changing the expression's value.

Completing the square

Completing the square rewrites a quadratic as a multiple of a squared bracket plus a constant. For a monic quadratic, halve the coefficient of xx to choose the number inside the bracket, then compensate for the extra constant created by squaring it.

The coefficient is halved because (x+p)2=x2+2px+p2(x+p)^2=x^2+2px+p^2: the two cross terms contribute 2px2px. Merely squaring half the constant term does not match those cross terms.

Worked example 1: an even linear coefficient

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

Plan. Half of six is three; form (x+3)2(x+3)^2, then remove its extra nine.

x2+6x+2=x2+6x+9−9+2=(x+3)2−7\begin{aligned} x^2+6x+2&=x^2+6x+9-9+2\\ &=(x+3)^2-7 \end{aligned}

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. At x=0x=0, both expressions give two.

An odd coefficient produces a fraction inside the square. Keep it exact rather than round it.

Worked example 2: a fractional half-coefficient

Question. Complete the square for x2−5x+1x^2-5x+1.

Plan. Half of −5-5 is −5/2-5/2; subtract the square of that number outside.

x2−5x+1=(x−52)2−254+1=(x−52)2−214\begin{aligned} x^2-5x+1&=\left(x-\frac52\right)^2-\frac{25}{4}+1\\ &=\left(x-\frac52\right)^2-\frac{21}{4} \end{aligned}

Answer. (x−52)2−214\left(x-\frac52\right)^2-\frac{21}{4}.

Check. At x=0x=0, 25/4−21/4=125/4-21/4=1. Expanding the bracket gives the required −5x-5x cross term.

The same identity covers any real constants b,cb,c.

Monic completed-square form

x2+bx+c=(x+b2)2+c−b24.x^2+bx+c=\left(x+\frac b2\right)^2+c-\frac{b^2}{4}.

Not in the formula booklet: learn the method.

You can always expand the right side to verify it.

Watch out

x2+6x+2≠(x+3)2+2x^2+6x+2\ne(x+3)^2+2: the right side has an extra nine. Subtract that nine so the rewriting remains an identity.

Use an odd negative coefficient again.

Nonmonic quadratics

When the coefficient of x2x^2 is not one, factor it from the quadratic and linear terms before completing the square. The outside factor multiplies the compensating constant as well as the squared bracket.

For 2x2+8x+32x^2+8x+3, write 2(x2+4x)+32(x^2+4x)+3. Inside the bracket the linear coefficient is four, so its half is two. Halving the original eight would give the wrong square.

Worked example 3: a positive leading coefficient

Question. Complete the square for 2x2+8x+32x^2+8x+3.

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

2x2+8x+3=2(x2+4x)+3=2((x+2)2−4)+3=2(x+2)2−8+3=2(x+2)2−5\begin{aligned} 2x^2+8x+3&=2(x^2+4x)+3\\ &=2\big((x+2)^2-4\big)+3\\ &=2(x+2)^2-8+3\\ &=2(x+2)^2-5 \end{aligned}

Answer. 2(x+2)2−52(x+2)^2-5.

Check. Expansion gives 2x2+8x+8−5=2x2+8x+32x^2+8x+8-5=2x^2+8x+3. At x=−2x=-2, both forms give −5-5.

Now the leading coefficient is negative. Keep its sign when multiplying the correction.

Worked example 4: a negative leading coefficient

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

Plan. Factor out −3-3 from the first two terms, giving a linear coefficient of −4-4 inside.

−3x2+12x+1=−3(x2−4x)+1=−3((x−2)2−4)+1=−3(x−2)2+12+1=−3(x−2)2+13\begin{aligned} -3x^2+12x+1&=-3(x^2-4x)+1\\ &=-3\big((x-2)^2-4\big)+1\\ &=-3(x-2)^2+12+1\\ &=-3(x-2)^2+13 \end{aligned}

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

Check. Expanding gives −3x2+12x−12+13=−3x2+12x+1-3x^2+12x-12+13=-3x^2+12x+1. At x=2x=2, both give 1313.

The constant left outside at the first step need not be divided by the leading coefficient. If you choose to put it inside, divide it consistently and multiply it back at the end.

Continue this lesson.

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

Create free account