Completing the square

Warmup: Solve: x2+6x+2=0.

Hard or impossible to factor.

Look at x2+6x. (Ignore the 2 for the moment.)

Notice this:

x + 3
x x2 3x
+
3 3x 32

This gives us

(x+3)2 = x2+3x+3x+32 = x2+6x+32

Looking at it another way, (x+3)2 is almost equal to x2+6x except for that pesky 32.

2nd trick: To solve x2+6x+2=0, (i.e. to find the zeros of the function x2+6x+2:

x2+6x+2 = 0 x2+6x+32+2 = 32 x2+6x+32 = 32-2 (x+3)2 = 32-2 x+3 = ±32-2 x = -3±32-2 = -3±7

The thing on the right is messy, but it's just a number (no x).

Check the plus version (minus is similar):

x2+6x+2 = (-3+7)2+6(-3+7)+2 = 9-37-37+7-18+67+2 = 9+7-18+2-67+67 = 0

This can be messy but it always works!

If a1, just divide both sides by a first:

3x2-6x+12 = 0 x2-2x+4 = 0 x2-2x = -4 x2-2x+(-1)2 = -4+(-1)2 (x-1)2 = -3 x-1 = ±-3 x = 1±-3 x = 1±i3

You can get a quadratic function into vertex form by completing the square with the function definition:

y = x2-8x+11 y+(-82)2 = x2-8x+(-82)2+11 y+16 = x2-8x+16+11 y+16 = (x-4)2+11 y = (x-4)2-5

The vertex is (4,5).

The minimum of a quadratic whose a term is positive, or the maximum of a quadratic whose a term is negative, the vertex. So to find the max or min, just find the vertex.