How do I complete the square for a quadratic equation? I'm not sure how to do it.

2 answers

eg

x^2 -8x + 7

If the coefficient of the square term is 1 and the middle term is even, they are easy

take 1/2 of the coefficient of the x term, square it, then add and subtract it

x^2 - 8x + 16 - 16 + 7

your first 3 terms are now a perfect square, express it that way

(x-4)^2 - 16 + 7 simplify the constants
for a final answer of

(x-4)^2 - 9

now check your answer by expanding this

the worst kind are this kind

4x^2 + 5x + 1

factor out the 4 from the first 2 terms

4(x^2 + (5/4)x ) + 1 notice I left the +1 alone

now repeat the steps from my first example

4(x^2 + (5/4)x + 25/64 - 25/64) + 1

= 4(x + 5/8)^2 - 25/64) + 1 multiply out the number in front

= 4(x+5/8)^2 - 25/16 + 1 adding up the constants
= 4(x+5/8)^2 - 9/16
Write in in the form
x^2 + bx = -c
where -c is a constant.
Then add b^2/4 to both sides. The left side becomes [x +(b/2)]^2 and the right side becomes (b^2/4) - c
Then take the square root of both sides.