If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Worked example: completing the square (leading coefficient ≠ 1)

Sal solves the equation 4x^2+40x-300=0 by completing the square. Created by Sal Khan and Monterey Institute for Technology and Education.

## Want to join the conversation?

• The process doesn't seem that confusing but if the result is not a perfect square than what's next? an example is x squared +16x+57=0 the result I go was x+8=7 but this doesn't check... I need help please •  1.Subtract 57 from both sides, which will give you x squared+16x=-57.2.Complete the square: x squared+16x+64=7.3.Factor the left side of the equation: (x+8)squared=7.4.Square root both sides of the equation: x+8= positive or negative square root of 7.5. Split the equations into: x+8=positive square root of 7 and x+8=negative square root of 76. Solve both equation!
• So the practice after this video only managed to completely confuse me. Sometimes you divided everything by the leading coefficient, sometimes you don't divide the last term by the leading coefficient, sometimes you multiple the squared middle term by the leading coefficient. The explanations suck as to why you do this and not that, so can someone help me out please?

Example:
2x^2 + 3x - 2 = 0
2 (x^2 +3/2x - 1)

Then divide the middle term to get 3/4, then I subtract that term squared from -1 to get -1 - 9/16, to which I got 25/16 = (x+3/4)^2 or 2(x+3/4)^2 - 25/16

But the hint for the equation showed this process instead:
2(x^2+3/2x) - 2
(x + 3/4)^2 - 2 - 2* 9/16
2(x+3/4)^2 - 25/8

Why didn't they divide the 2 term by 2 in the beginning? And why did they times the added term by 2 at the end? Looking back at it, I'm thinking they multiplied the last term by 2 to make it even with the equation in the paratheses, but I've also seen equations when the term isn't multiplied by the leading coeffiecient. Help? • 5 years late, but I believe I know the answer:
The example question's answer was supposed to be written in vertex form, and the method they used for doing this was by factoring only the first two terms like so:
2x² + 3x -2 = y
2(x² + 3/2x) - 2 = y
Then to make a perfect square, they added 9/16 in the parenthesis to make 2(x + 3/4)². But to retain the exact value of the equation, 9/16 multiplied by 2 (factored from the parenthesis) must be subtracted.
2(x + 3/4)² - 2 - 2 * 9/16 = y
2(x + 3/4)² - 25/8 = y
The process you tried by making y = 0 also could have worked, but there was an error in the last step.
25/16 = (x + 3/4)²
2 * 25/16 = 2(x + 3/4)²
2(x + 3/4)² - 25/8 = 0
Hope this helps :)
• • how can my calculator solve this problem using the quadratic formula? since -b+square root (b²-4ac) would be -40+ square root of (40²-4.4.(-300)) which is equal to -40 + square root of (1600 - 4800). wouldn't that be taking the square root of a negative number? or am I using the wrong order of operations? • I didn't factor out the 4 at the beginning and ended up with a funky answer with a square root of 7. I understand how to do it properly and got the same answer of x=5 or -15 as Sal did when I factored out the 4 first, but just don't fully get why. Help? Thanks! • 4x^2 + 40x - 300 = 0 so we have 4x^2 + 40x = 300
Since (ax +b)^2 = a^2x^2 + 2abx + b^2, that means a = 2, so the middle term is 2 • 2 b = 40, so b = 10 and b^2 = 100
completing the square (2x + 10)^2 = 300 +100
(2x + 10)^2 = 400, take the square root of both sides, adding +/- on right
2x +10 = +/- 20, 2x = 20 -10 or 2x = -20 - 10
2x = 10 or 2x = -30
x = 5 or x = -15
Without factoring, there are a whole lot of places to mess up, probably one of the most common mistakes is getting b incorrect. Find where you messed up.
• • How do you solve it if the middle term doesn't factor by the first term? For example, -4x^2-6x-2. -4 does not factor into -6 but by -2 and when you factor it by -2 you are left with a leading coefficient of 2. Thanks! • What is a complete square/perfect square trinomial? (-)
Also, why a perfect square if we take half of the first degree term and square it? Is it because of 2ax, and a²? Since you have 2ax, you need to divide 10x by 2 to get a, and square a to get the constant?
What's interesting is that when you factor the x²+2ax+a², you get (x+5)², which uses the 5 from the a. But I guess that makes sense because when you factor, you use (x+a)(x+b). • • More questions (though I don't see the end of them...): If I have 2(x^2+13/2x+169/16)+20-2*169/16, why do I have to multiply x^2+13/2x+169/16 by 2 but not the 20? And also, why multiply 169/16 by -2? • x^2+13/2x+169/16 is being multiplied by 2 because it is inside a set of parentheses being multiplied by 2. 2(x^2+13/2x+169/16) is saying 2 times all of x^2+13/2x+169/16. it might help with real numbers.

2*8=16 well 16 is 3+5. so 2*8 = 2(3+5) = 2*3 + 2*5 = 6+10 = 16.

Then 20-2*169/16 is not inside of the parentheses, so it is not multiplied by 2. If you look closely though it says 20 - 2 * 169/16. the last part says -2 * 169/16, so you can just solve that.

Remember the order of operation. Doe verything inside parentheses first, then anything that has an exponent, then multiplicationa dn devision and finally addition and subtraction. so 20-2*169/16 you first solve the multiplication, then subtraction.

Does this make sense?