Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Completing the square among other things

  1. Jun 7, 2004 #1
    I need to know how to complete the square.. every website I go to about this is completely complicated.. my math teacher does it like so:
    y = x^2 + 6x -7
    y = x^2 + 6x + 3^2 - 9 - 7
    y = (x + 3)^2 - 16

    that I understand but..

    if it were to say y = 2x^2 + 6x - 7

    that's where I get confused because of the 2 infront of the x^2

    I appreciate any help... -scaez
  2. jcsd
  3. Jun 7, 2004 #2
    Factor it out.

    y = 2(x^2 + 3x + 7/2)

    Leave the 2 out front and complete the square of x^2 + 3x + 7/2.

  4. Jun 8, 2004 #3


    User Avatar
    Science Advisor

    (x+a)<sup>2</sup>= x<sup>2</sup>+ 2ax+ a<sup>2</sup>.

    To complete a square such as x<sup>2</sup>+ 3x, compare with that: we must have
    2ax= 3x or a= 3/2. That gives a<sup>2</sup>= 9/4. We complete the square in x<sup>2</sup>+ 3x by adding 9/4: x<sup>2</sup>+ 3x+ 9/4= (x+ 3/2)<sup>2</sup>.

    I would be inclined to complete the square in 2x<sup>2</sup>+ 6x+ 7 by factoring the 2 out of the first two terms only: 2(x<sup>2</sup>+ 3x)+ 7. As before, to complete the square, add and subtract 9/4: 2(x<sup>2</sup>+ 3x+ 9/4- 9/4)+ 7/2. Since I ignored the "2", both 9/4s are inside the parentheses. I'll need to take -9/4 out of the parentheses and multiply by 2:
    2x<sup>2</sup>+ 6x+ 7= 2(x<sup>2</sup>+ 3x+ 9/4- 9/4)+ 7= 2(x<sup>2</sup>+ 3x+ 9/4)- 9/2+ 7= (x+ 3/2)<sup>2</sup>+ 5/2.
  5. Jun 8, 2004 #4


    User Avatar
    Science Advisor
    Gold Member

    If yu like you can also put the factor back in the brackets:

    y = 2x^2 + 3x + 7 = 2(x + 3/2)^2 + 5/4 = (sqrt(2)x + 3/sqrt(2))^2 + 5/4
  6. Jun 8, 2004 #5
    You start with a polynomial

    ax^2 + bx + c = 0

    You factor “a” out of any terms with x

    [tex] a(x^2 + \frac{b}{a}x) + c = 0 [/tex]

    Then you divide b/a by ½ and square it.

    So [tex] (\frac{b}{2a}})^2 [/tex]

    Then you add that number inside the parenthesizes and subtract it multiplied by “a” (to keep the equation balanced)

    [tex] a(x^2 + \frac{b}{a} x + (\frac{b}{2a})^2 ) + c -a{\frac{b}{2a}}^2 = 0 [/tex]

    For example if you wanted to do the completing the square method for [tex]2x^2 + 16x +17 = -15[/tex]

    First you factor out a
    [tex] 2(x^2 + 8x) +17 = -15[/tex]

    then divide your b/a term by ½ and square it
    (8/2)^2 = 16

    add it to the inside and subtract it from the outside (multiply the outside one by “a”)

    [tex] 2(x^2 +8x + 16) - 32 + 17 = -15 [/tex]

    factor and simplify

    [tex] 2(x+4)(x+4) = 0 [/tex]

  7. Jun 12, 2004 #6
    Here's another, maybe simpler way to look at it:

    Starting with the general quadratic equation: (note - I lost my superscripts in translation here - I hope this doesn't confuse you!)

    ax2 + bx+ c = 0

    Subtract c from both sides:

    ax2 + bx = -c

    Divide both sides by a (we can do this since we know a does not equal 0. If it did, we wouldn’t have a quadratic equation)

    x2 + (b/a)x = - c/a

    Now comes the part where most people get confused. But, for now we’ll just do this. I’ll explain it in a second. Divide b/a by 2, and add the square of that to the right hand side of the equation. Then, change the left hand side of the equation so that it looks like this:

    (x +b/2a)2 = b2/4a2 – c/a

    Ok, all this comes from examining what happens when we square a binomial:

    (a + d) = 0

    Squaring both sides:

    (a+d)2 = 0

    Which gives us: (Use the FOIL method – First, Outer, Inner, Last)

    a2 + 2ad + d2 = 0

    Notice the factor of 2 in the middle term on the left. So, if we want the middle term in our original equation (x2 + (b/a)x = -c/a) to come out right, the second term in the binomial we want to square has to be b/2a; half of b/a Now also notice that if we square (x+ b/2a) we will get a final term of b2/4a2 which didn’t appear in our original equation. But that’s easily fixed – just add it to the right hand side also.

    So, moving on, we can add the two fractions on the right hand side of our new equation and get:

    (x + b/2a)2 = (b2 – 4ac)/2a

    And you have completed the square!

    Note, that if you solve this for x you get the famous general solution for the quadratic equation.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook