Main content

### Course: Algebra 1 > Unit 14

Lesson 8: More on completing the square- Solve by completing the square: Integer solutions
- Solve by completing the square: Non-integer solutions
- Solve equations by completing the square
- Worked example: completing the square (leading coefficient ≠ 1)
- Completing the square
- Solving quadratics by completing the square: no solution
- Proof of the quadratic formula
- Solving quadratics by completing the square
- Completing the square review
- Quadratic formula proof review

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# 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(27 votes)
- 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!(35 votes)

- Where did the term "coefficient" come from?(21 votes)
- 1655-65; from New Latin coefficiēns, from Latin co- together + efficere to effect.(28 votes)

- 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

My process was this:

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?(28 votes)- 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 :)(6 votes)

- 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?(11 votes)
- Hi Dimitri,

It looks like your are forgetting to multiply the two negatives together. If you have:

40^2 - (4)(4)(-300)

that will give you

1600 - (-4800)

which equals

1600 + 4800 = 6400

Hope that helps!(13 votes)

- The practice questions are not explained well by this video.

How does f(x)=2x^2+3x−2 end up as f(x)=2(x+3/4)^2−25/8 ?

Is there not a simpler answer?(10 votes)- There is no simpler answer. First, factor out a 2 in first 2 terms to get f(x)=2(x^2+3/2 x) - 2. To complete the square, divide 3/2 by 2 to get 3/4, then square to get 9/16. This would give f(x)=2(x^2+3/2 x +9/16-9/16)-2. Taking the -9/16 out, you have to multiply this by 2 to get -9/8, thus ending up with f(x)=2(x^2+3/2x +9/16)-2-9/8, finding common denominator of 8 and combining gives -16/8-9/8=-25/8. This gives your final result.(2 votes)

- 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!(4 votes)
- 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.(7 votes)

- The practice problems all have fractions, and the video doesn't cover them. For example, how do you solve g(x)=2x^2−7x+5(4 votes)
- There are some examples in the questions and answers already posted for this lesson. You can also find some great videos on the internet. The process doesn't change. You just need to work with the fractions.

g(x)=2x^2−7x+5

A) Factor 2 from first 2 terms: g(x)=2(x^2−7/2 x)+5

B) Complete the square: Divide -7/2 by 2 to get -7/4. Square it (-7/4)^2 = 49/16. Note: the -7/4 will be used in the factors later on.

C) Add & subtract 49/16: g(x)=2(x^2−7/2 x +49/16 - 49/16)+5

D) Multiply -49/16 by the 2 in front of the parentheses so it can come out of the parentheses to get: g(x)=2(x^2−7/2 x +49/16) -49/8+5

E) Simplify the constant term by adding using an LCD to get: -49/8+5 = -49/8+40/8 = -9/8

F) Factor the parentheses to show the square:

g(x) = 2(x-7/4)^2 -9/8

Hope this helps.(8 votes)

- Why the 1st coefficient has to be 1?(3 votes)
- The pattern used to Complete the Square only works if the coefficient of X^2 is = 1. If the coefficient is not 1, dividing the middle term by 2 and squaring will not create the correct values.(7 votes)

- 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!(5 votes)
- You can still complete the square. You will just be working with fractions.

There is an example at this link, it starts a little ways down the page: http://www.purplemath.com/modules/sqrquad.htm(2 votes)

- What would you do if you have numbers that weren't divisible by the x squared coefficient?(4 votes)
- The process still works, you just end up working with fractions.(3 votes)

## Video transcript

We're asked to
complete the square to solve 4x squared plus
40x minus 300 is equal to 0. So let me just rewrite it. So 4x squared plus 40x
minus 300 is equal to 0. So just as a first
step here, I don't like having this 4 out
front as a coefficient on the x squared term. I'd prefer if that was a 1. So let's just divide both
sides of this equation by 4. So let's just divide
everything by 4. So this divided
by 4, this divided by 4, that divided by 4,
and the 0 divided by 4. Just dividing both sides by 4. So this will simplify
to x squared plus 10x. And I can obviously
do that, because as long as whatever I do
to the left hand side, I also do the right
hand side, that will make the equality
continue to be valid. So that's why I can do that. So 40 divided by 4 is 10x. And then 300 divided
by 4 is what? That is 75. Let me verify that. 4 goes into 30 seven times. 7 times 4 is 28. You subtract, you
get a remainder of 2. Bring down the 0. 4 goes into 20 five times. 5 times 4 is 20. Subtract zero. So it goes 75 times. This is minus 75 is equal to 0. And right when you look at
this, just the way it's written, you might try to factor
this in some way. But it's pretty clear this
is not a complete square, or this is not a perfect
square trinomial. Because if you look at
this term right here, this 10, half of this 10 is 5. And 5 squared is not 75. So this is not a perfect square. So what we want to
do is somehow turn whatever we have on
the left hand side into a perfect square. And I'm going to start out by
kind of getting this 75 out of the way. You'll sometimes
see it where people leave the 75 on
the left hand side. I'm going to put on
the right hand side just so it kind of clears
things up a little bit. So let's add 75 to both
sides to get rid of the 75 from the left hand
side of the equation. And so we get x squared plus
10x, and then negative 75 plus 75. Those guys cancel out. And I'm going to
leave some space here, because we're going
to add something here to complete the square
that is equal to 75. So all I did is add 75 to
both sides of this equation. Now, in this step,
this is really the meat of
completing the square. I want to add something to
both sides of this equation. I can't add to only one
side of the equation. So I want to add something to
both sides of this equation so that this left hand side
becomes a perfect square. And the way we can do that,
and saw this in the last video where we constructed a
perfect square trinomial, is that this last
term-- or I should say, what we see on
the left hand side, not the last term, this expression
on the left hand side, it will be a perfect square if
we have a constant term that is the square of half of the
coefficient on the first degree term. So the coefficient here is 10. Half of 10 is 5. 5 squared is 25. So I'm going to add 25
to the left hand side. And of course, in order to
maintain the equality, anything I do the left hand
side, I also have to do to the right hand side. And now we see that this
is a perfect square. We say, hey, what two numbers
if I add them I get 10 and when I multiply
them I get 25? Well, that's 5 and 5. So when we factor this, what
we see on the left hand side simplifies to, this
is x plus 5 squared. x plus 5 times x plus 5. And you can look at
the videos on factoring if you find that confusing. Or you could look
at the last video on constructing perfect
square trinomials. I encourage you to
square this and see that you get exactly this. And this will be equal to 75
plus 25, which is equal to 100. And so now we're saying
that something squared is equal to 100. So really, this is
something right over here-- if I say something squared
is equal to 100, that means that that something is
one of the square roots of 100. And we know that 100
has two square roots. It has positive 10 and
it has negative 10. So we could say that x
plus 5, the something that we were
squaring, that must be one of the square roots of 100. So that must be equal to the
plus or minus square root of 100, or plus or minus 10. Or we could separate it out. We could say that x
plus 5 is equal to 10, or x plus 5 is equal
to negative 10. On this side right
here, I can just subtract 5 from both
sides of this equation and I would get-- I'll
just write it out. Subtracting 5 from both
sides, I get x is equal to 5. And over here, I
could subtract 5 from both sides again-- I
subtracted 5 in both cases-- subtract 5 again and I can
get x is equal to negative 15. So those are my two
solutions that I got to solve this equation. We can verify that they actually
work, and I'll do that in blue. So let's try with 5. I'll just do one of them. I'll leave the
other one for you. I'll leave the other one for
you to verify that it works. So 4 times x squared. So 4 times 25 plus
40 times 5 minus 300 needs to be equal to 0. 4 times 25 is 100. 40 times 5 is 200. We're going to
subtract that 300. 100 plus 200 minus 300,
that definitely equals 0. So x equals 5 worked. And I think you'll find that
x equals negative 15 will also work when you substitute it
into this right over here.