Completing the square is a process that we make use of in a number of ways. First, we can make use of it to find maximum and minimum values of quadratic functions, second we can make use of it to simplify or change algebraic expressions in order to be able to calculate the value that they have. Third, we can use it for solving quadratic equations. In this particular video, we're going to have a look at it for finding max- and min-imum values of functions, quadratic functions. Let's begin by looking at a very specific example. Supposing we've got x squared, plus 5x, minus 2. Now. x squared, it's positive, so one of the things that we do know is that if we were to sketch the graph of this function. It would look something perhaps like that. Question is where's this point down here? Where's the minimum value of this function? What value of x does it have? Does it actually come below the x-axis as I've drawn it, or does it come up here somewhere? At what value of X does that minimum value occur? We could use calculus if we knew calculus, but sometimes we don't know calculus. We might not have reached it yet. At other occasions it might be rather like using a sledgehammer to crack or not, so let's have a look at how we can deal with this kind of function. What we're going to do is a process known as "completing ... the ... square" OK, "completing the square", what does that mean? Well, let's have a look at something that is a "complete square". That is, an exact square. So that's a complete and exact square. If we multiply out the brackets, x plus a times by x plus a, what we end up with is x squared... that's x times by x... a times by x, and of course x times by a, so that gives us 2ax, and then finally a times by a... and that gives us a squared. So this expression is a complete square, a complete and exact square. Because it's "x plus a" all squared. Similarly, we can have "x minus a" all squared. And if we multiply out, these brackets we will end up with the same result, except, we will have minus 2ax plus a squared. And again this is a complete square an exact square because it's equal to x minus a... all squared. So,... we go back to this. Expression here x squared, plus 5x, minus two and what we're going to do is complete the square. In other words we're going to try and make it look like this. We're going to try and complete it. Make it up so it's a full square. In order to do that, what we're going to do is compare that expression directly with that one. And we've chosen this expression here because that's a plus sign plus 5x, and that's a plus sign there plus 2ax. So. x squared, plus 5x, minus 2. And we have x squared plus 2ax plus a squared These two match up Somehow we've got to match these two up. Well,... the x's are the same. So the 5 and the 2a have got to be the same and that would suggest to us that a has got to be 5 / 2. So that x squared plus 5x minus 2... becomes x squared plus 5x... now... plus a squared and now we decided that 5 was to be equal to 2a and so a was equal to 5 over 2. So to complete the square, we've got to add on 5 over 2... and square it. But that isn't equal to that. It's equal, this is equal to that, but not to that well. Clearly we need to put the minus two on. But then it's still not equal, because here we've added on something extra 5 over 2 [squared]. So we've got to take off that five over 2 all squared. We've got to take that away. Now let's look at this bit. This is an exact square. It's that expression there. No, this began life as x plus a all squared, so this bit has got to be the same, x plus (5 over 2) all squared. And now we can play with this. We've got minus 2 minus 25 over 4. We can combine that so we have x plus (5 over 2) all squared... minus... Now we're taking away two, so in terms of quarters, that's 8 quarters were taking away, and we're taking away 25 quarters as well, so altogether, that's 33 quarters that we're taking away. Now let's have a look at this expression... x squared plus 5x minus 2. Remember what we were asking was "what's its minimum value?" Its graph looked like that. We were interested in... "where's this point?" "where is the lowest point?" "what's the x-coordinate?" "and what's the y-coordinate?" Let's have a look at this expression here. This is a square. A square is always positive unless it's equal to 0, so its lowest value that this expression [can take] is 0. So the lowest value of the whole expression... is that "minus 33 over 4". So therefore we can say that the minimum value... of x squared, plus 5x, minus 2 equals... minus 33 over 4. And we need to be able to say when "what's the x-value there?" well, it occurs when this bracket is at its lowest value. When this bracket is at 0. In other words, when x equals... minus 5 over 2. So we found the minimum value and exactly when it happens. Let's take a second example. Our quadratic function this time, f of x, is x squared, minus 6 x, minus 12. We've got a minus sign in here, so let's line this up with the complete square: x squared, minus 2ax, plus a squared. The x squared terms are the same, and we want these two to be the same as well. That clearly means that 2a has got to be the same as 6, so a has got to be 3. So f(x) is equal to x squared, minus 6x, plus... a squared (which is 3 squared), minus 12, and now we added on 3 squared. So we've got to take the 3 squared away in order to make it equal. To keep the value of the original expression that we started with. We can now identify this as being (x minus 3) all squared. And these numbers at the end... minus 12 minus 9, altogether gives us minus 21. Again, we can say does it have a maximum value or a minimum value? Well what we know that we began with a positive x squared term, so the shape of the graph has got to be like that. So we know that we're looking for a minimum value. We know that that minimum value will occur when this bit is 0 because it's a square, it's least value is going to be 0, so therefore we can say the minimum value. of our quadratic function f of x is minus 21, [occurring] when... this bit is 0. In other words, when x equals 3. The two examples we've taken so far have both had a positive x squared and a unit coefficient of x squared, in other words 1 x squared. We'll now look at an example where we've got a number here in front of the x squared. So the example that will take. f of x equals 2x squared, minus 6x, plus one. Our first step is to take out that 2 as a factor. 2, brackets x squared, minus 3x,... we've got to take the 2 out of this as well, so that's a half. And now we do the same as we've done before with this bracket here. We line this one up with x squared, minus 2ax, plus a squared. When making these two terms the same 3 has to be the same as 2a, and so 3 over 2 has to be equal to a. So our function f of x is going to be equal to 2 times... x squared, minus 3x,... now we want plus a squared, so that's plus (3 over 2) all squared Plus the half that was there originally and now we've added on this, so we've got to take it away,... (3 over 2) all squared. And finally we opened a bracket, so we must close it at the end. Equals... 2, bracket,... now this is going to be our complete square (x minus 3 over 2) all squared. And then here we've got some calculation to do. We've plus a half, take away (3 over 2) squared, so that's plus 1/2 take away 9 over 4. The front bit is going to stay the same And now we can juggle with these fractions. At the end, we've got plus 1/2 take away 9 quarters or 1/2 is 2 quarters, so if we're taking away, nine quarters must be ultimately taking away 7 quarters. So again, what's the minimum value of this function? It had a positive 2 in front of the x squared, so again, it looks like that. And again, we're asking the question, "what's this point down here?" What's the lowest point and that lowest point must occur when this is 0. So the min ... value of f of x must be equal to... now that's going to be 0 But we're still multiplying by the 2, so it's 2 times minus 7 over 4. That's minus 14 over 4, which reduces to minus 7 over 2. When? And that will happen when this is zero. In other words, when x equals 3 over 2. So a minimum value of minus 7 over 2 when x equals 3 over 2. Let's take one final example and this time when the coefficient of x squared is actually negative. So for this will take our quadratic function to be f of x equals... 3 plus 8x minus 2(x squared). We operate in just the same way as we did before. We take out the factor that is multiplying the x squared and on this occasion it's minus 2. The "- 2" comes out. Times by x squared, we take a minus 2 out of the 8x, that leaves us minus 4x and the minus 2 out of the 3 is a factor which gives us minus three over 2. We line this one up with X squared minus 2X plus A squared. Those two are the same. We want these two to be the same. 2A is equal to four, so a has got to be equal to two. So our F of X is going to be minus 2. X squared minus 4X plus A squared, so that's +2 squared minus the original 3 over 2, but we've added on a 2 squared, so we need to take it away again to keep the balance to keep the equality. Minus two, this is now our complete square, so that's X minus two all squared. And here we've got minus three over 2 - 4. Well, let's have it all over too. So minus four is minus 8 over 2, so altogether we've got minus 11 over 2. And we can look at this. We can see that when this is zero, we've got. In this case a maximum value, because this is a negative X squared term. So we know that we're looking for a graph like that. So it's this point that we're looking for the maximum point, and so therefore maximum value. Solve F of X. Will occur when this square term is equal to 0 'cause the square term can never be less than 0. And so we have minus two times. Minus 11. And altogether that gives us plus 11. And it will occur when this. Is equal to 0. In other words, when X equals 2.