# Completing the square with negative x coefficients

I know how to complete the square with positive $x$ coefficients but how do you complete the square with negative $x$ coefficients?

For example: \begin{align*} f(x) & = x^2 + 6x + 11 \\ & = (x^2 + 6x) + 11 \\ & = (x^2 + 6x + \mathbf{9}) + 11 - \mathbf{9} \\ & = (x+3)^2 + 2. \end{align*} For positive you would add 9 inside the parenthesis and subtract 9 outside. However, I get the wrong answer when I do it with a negative coefficient. Do you do the same thing when there is a negative coefficient in front of $x^2$ or is it the other way around? (subtract inside parenthesis and add outside of parenthesis).

Here is an example of a negative coefficient: $$f(x) = -3x^2 + 5x + 1.$$ I tried to solve this and entered in my answer online but it was wrong.

-
I hope I'm right in saying this (and correct me if I'm wrong), but you can always negate the expression: $$f(x) = -(3x-5x-1)$$ And do the same steps as you mentioned above. –  David Sep 20 '12 at 22:25
Oops @David, you omitted an exponent of 2 in the $3x$ term. –  Rick Decker Sep 21 '12 at 1:24
$\begin{split} f(x) &= -3(x^2-5x/3 - 1/3)\\ &= -3( x^2 - 5x/3 + (5/6)^2 - (5/6)^2 - 1/3)\\ &= -3( (x - 5/6)^2 - 25/36 - 12/36) \\ &= -3(x - 5/6)^2 -3(- 25/36 - 12/36) \\ &= -3(x - 5/6)^2 + 37/12. \end{split}$