 In the previous video, we learned how we could solve quadratic equations using completing the square. And I also mentioned in that video that it didn't really matter what the coefficients were, A, B, or C. You know, like we see right here, AX squared plus BX equals C. It doesn't really matter what the coefficients are because your decision at each moment, the next step is always going to be the exact same, depending on what those numbers are going to be. As opposed to factoring where what the numbers are have a big difference on how you're going to find a magic pair, even if they do exist. So imagine we wanted to solve this equation AX squared plus BX plus C equals zero, where we didn't know the coefficients, A, B, C. I'm actually going to leave them as unspecified constants so that maybe later on I could specify a constant when I wanted to. If we were to solve this quadratic equation using completing the square in the most general setting possible, what would that look like? Well, step one, I would move the constant term to the other side. So I'd subtract C from both sides and end up with AX squared plus BX. Well, I'm going to leave a blank for my guest of honor and then you're going to get a negative C on the right hand side. So you always move that constant to the side. Now we have to identify who the guest of honor is. Well, the other thing I also mentioned is that whenever the coefficient was something other than one in front of X squared, you factor it out. You factor from the X squared and from the X. So you're going to factor out this coefficient of A. Now, for the first part, it's pretty easy. You factor out the A from AX squared. You're going to be left with an X squared behind. But what happened? How do you factor A away from BX? I don't even know what B is. Now, be aware that factoring, you know, we often think it as, oh, I've undistributed something. But factoring is really just division. That is, when you factor something out, you're unmultiplying it. Unmultiplying means divide. So how do you factor A away from a B? Well, you just means divide by A. And that would give us B over AX. Does B over A simplify? I don't know because I don't know what B, nor do I know what A are. That's okay. So you're going to get this B over A times X. Now, with this number in mind here, we're going to take half of it. Half of that number just means multiply it by one half. So you get B over A, which would just look like B over 2A. That's it. And then once we had this number here, we are, we square it. So that's going to give us B over 2A squared. This will give us B squared over 4A squared. For which we then add into the seat, B squared over 4A squared. Now, what's good for the goose is good for the gander. We have to add it to both sides of the thing that are balanced. So we're going to add B squared over 4A squared to both sides of the equation. But remember, this A would actually distribute on all three of these terms. So really, we added B squared over 4A squared times A. So that we need to make sure we carry it with us. So now the left-hand side, because we've completed the square, is now a perfect square trinomial. So if we factor, we get A times, well, this is going to factor as X plus B over 2A quantity squared. And then the right-hand side, let's see what we can do there. Well, we have this negative C, well, the first thing I've noticed is that there's an A that cancels out right here. So we get this negative C plus B squared over 4A, like so. If I wanted to add these together as a common fraction, I'd have to times the C by 4A over 4A. And that all then gives us negative 4AC over 4A plus B squared over 4A. And thus adding those together, I can then get B squared minus 4AC. I like to put the positive first there. I'm an optimist in that regard. And so now what we have is we have A times X plus B over 2A squared. This piece right here is equal to B squared minus 4AC over 4A. So the next thing to do is then divide both sides by A. That's going to put an A in the denominator right here. So we end up with an X plus B over 2A quantity squared is equal to B squared minus 4AC all over 4A squared. There you go. And so the next step is to take the square root of both sides. We take the square root on the left. We take the square root on the right. Make sure you take plus or minus here. The square root on the left will cancel with the perfect square giving us X plus B over 2A. And this equals plus or minus the square root. We're going to get the square root of B squared minus 4AC on the top. And then I'm going to take the square root of the denominator for A squared. The denominator, of course, is a perfect square. The denominator will look like just a 2A. 4 is a perfect square. It's 2 squared. A squared is clearly a perfect square because it's A times A. In the numerator, though, I don't really know B squared minus 4AC. In general, that might not be a perfect square. So I have to kind of leave it alone. And then the last thing to do is just move the B over 2A to the other side of the equation by subtraction. And this finishes our solution here. We're going to get that X equals negative B over 2A plus or minus the square root of 4AC. And this is also over 2A. And fortunately, hey, these two things have a common denominator. They're both of 2A. That's pretty nice. So we could add these fractions together and this would then give us, voila, the quadratic formula. We get this right here. The quadratic equation AX squared plus BX plus C. If you solve it by the method of completing the square, you get X equals negative B plus or minus the square root of B squared minus 4AC over 2A. And this kind of shows you where did the quadratic formula come from. It's not just some magical formula that we discovered one day in the wilderness, or by looking straight into an eclipse or any other mystic method of finding truth. We found it by completing the square of just a generic quadratic equation. We didn't specify the coefficients A, B, or C. And because we didn't specify, we could still solve it by completing the square. And then we get a formula for which now that the problem has been solved, we can plug in the numbers A, B, and C. And we can solve the quadratic equation just by plugging in those coefficients A, B, and C and simplifying this thing. And this is what's commonly referred to as the quadratic formula. Now, if ever you were in some type of desert island scenario where your plane crashes in the middle of the Pacific, right, and you have to solve a quadratic equation, you know how you could rebuild your quadratic formula from scratch, from coconuts, vines, and volubles and whatever else survives the plane crash. But of course also memorization is a great tool for the quadratic formula. By understanding where it came from, that helps us memorize it a lot. Also, there's fun little mnemonic devices. Some people will read the quadratic formula to the tune Pop Goes the Weasel if you've ever heard that one before. So let the following x equals negative b plus or minus the square root of b squared minus 4ac all over two ways. Mnemonic devices like this can be useful to help us solving, and I should say to help us memorizing formulas of the quadratic formula within our tools to solve quadratic equations. Now, the key thing you should know about the quadratic formula is that the numbers A, B, and C come from the standard form of the quadratic equation. Therefore, to use the quadratic formula, your equation must be in the standard form. It must look like Ax squared plus Bx plus C equals zero. The right-hand side must equal zero. Without that, the quadratic formula would be useless. So if we want to solve the quadratic equation 6x squared plus 8x plus 5 equals x plus 10, it might be tempted to be like, oh, here's a quadratic expression. A equals 6, B equals 8, C equals 5. But since the right-hand side's not zero, that doesn't work. So the first thing we have to do is we just have to move the terms the other side, minus a 5, minus a 10. And this would then give us 6x squared plus 7x. Then, ooh, that's poor pimpship there. Sorry, minus a 10. So we're going to get minus 5 equals zero. So you have to first standardize the quadratic equation. Then we can be like, OK, A equals 6, B equals 7, and C equals negative 5. Make sure you take on the sign here. If it's negative, it needs to be negative in the quadratic formula. And therefore, using the formula from above, I want you to still see it here. Using the formula from above, you get x equals, right, negative 7 plus or minus the square root. If you're not sure how big your square root should be, you know, you can wait to draw the horizontal line there. We're going to get a B squared. Minus 4 times A, which is a 6, times C, which is a negative 5. The sign does matter. Now draw your vinculum to cover the whole thing. I usually like to put a little tick mark at the end here to indicate where it ends, because sometimes you can get ambiguous otherwise. This should also be above 2 times A. A was 6 in this situation. Now this just becomes a chore of kind of plug and chug at this moment. We did the plugging. Now it's time to do the chugging. So we get negative 7 plus doing some arithmetic here. 49 is 7 squared. Since you have a double negative right here, this will become a positive. Right, 4 times 5. That's a 20. 20 times 6. We'll come back to that one in a second, I suppose. In the denominator, you get 2 times 6, which is a 12. So we get negative 7 plus or minus the square root. We'll see 6 times 20 is 120. That's not so bad to do. And then 120 plus 49 is 169. Which 169 is actually a perfect square. It's 13 squared. So you get negative 7 plus or minus 13 over 12. And so then we have two cases to consider. There's negative 7 plus 13 over 12. And then there's negative 7 minus 13 over 12. Which in the first case, you end up with a positive 6 over 12. It's negative 7 plus 13. And in the other case, you're going to get a negative 20. Negative 20 over 12. The first one would simplify to be a 1 half. The second one all, you know, 12 doesn't divide into 20 perfectly, but they do have a common factor of 4. And that would leave behind a negative 5 thirds. And so we are able to solve this quadratic equation. Sorry. Yeah. We're able to solve this quadratic equation using the quadratic formula in this situation. Now there's some things I want to mention that be aware that using the quadratic formula is just completing the square. The two methods are not exactly different methods. When you use the formula, you're completing the square. It's just in the formula that completing the square process is already done. So it's kind of hidden. So when people are like, I can't complete the square, but if you use the quadratic formula, you are completing the square, believe it or not. So the two methods are basically one of the same thing. The other thing I want to mention here is that because our answers turned out to be fractions, 1 half and negative 5 thirds, this does mean we could have solved the original quadratic by using some type of magic pair. We could have factored this thing, right? So taking 6 and negative 5, putting those together, oops, negative 5, that gives us negative 30. So we need factors of negative 30 that have to be 7. You could take 10 times negative 3. And then once you have a magic pair, you can proceed to factor this by groups. Now it's not going to be immediately obvious because the leading coefficient is not 1, right? You do have to factor this by groups. But I wanted to mention that because the answer, because you have this like perfect square inside of the square root, turns out you could have factored this thing. Now, if you've already solved it by the quadratic formula, are we supposed to be like at the end? I could have done this by factoring. No, if you have the answer, you have the answer, right? Going back and being like, we could have done it better. You know, that is a good educational tool it is, but don't beat yourself up too much, right? If you have the answer, you have the answer. There's some people when they come to solving quadratic equations, they always use the quadratic formula. They're like, it'll always work. And that's great to play your trump card on the first play of your card game there. That's an option. Some people are insist upon it. I do like to use factoring because oftentimes I think factoring is much more elementary, much easier and less error prone than people using the quadratic formula. But the quadratic formula is a nice failsafe. Let's look at one more example of this. So this equation is already in the standard form, right? We see that A equals one, that's nice. B equals two and C equals two. If I was approaching this quadratic equation, if I wanted to solve this one, my first inclination would be, let's just see if I can find a quick magic pair, because if that pair is hanging from the magic pear tree, it's a low-hanging fruit, pun intended there, then I'm going to grab that one and gobble it up before I try the quadratic formula. Especially when the leading coefficient here is one. So looking at that, can I find factors of two that have to be two? That doesn't seem possible. Nope, we're going to then choose to use the quadratic formula here, for which case the solutions would look like X equals negative B, which is going to be negative two plus or minus the square root. We're going to get a B squared, which is a four, minus four times one times C, which is a two, and this all sits above two A, which is just going to be a two. So again, the numbers aren't too painful in this situation. Negative two plus or minus the square root, we're going to get four minus eight all over two, which when simplifying this, you can see kind of a situation coming up here. You get four minus eight, which is actually a negative four, all over two. So you can see this is why the polynomial didn't factor using a magic pair, is because in the numerator of the square root isn't exactly a perfect square, you actually get a negative number. The solution to this quadratic equation is going to be a non-real number. Complex number, it's going to have a non-trivial imaginary part. We're still going to solve this for complex numbers, but this is why we couldn't factor it. We can only factor the polynomial if the solutions are rational numbers, that is, whole numbers or fractions. If it's irrational, you know, you have these non-repeating decimal expansions, or in this case, if it has an imaginary component, then you can't factor the quadratic formula or completing the square would be necessary. Now be aware that the square root of negative four is going to be two I. This all sits above two. Now to factor out the two on the bottom, you can't just factor out the two on part of it. You can only cancel out the two if the whole numerator is divisible by two, which it is. You can factor out the two leaving behind negative one plus or minus I all over two, and now these factors are two cancel out, and thus we get the solution X equals negative one plus or minus I, or an expanded form negative one plus I and negative one minus I. You'll notice that these two complex numbers right here are conjugates of each other. You just switch the imaginary part, and that's always what's going to happen if you solve a quadratic equation. Especially if you use the quadratic formula. If there is an imaginary part, it comes from taking the square root of a negative, and notice you'll always have a plus or minus right here. When you solve a quadratic equation, the solutions will always come in the complex conjugate pairs. That is, if you have one non-real solution, the other solution will be its complex conjugate.