Hello, everyone, and welcome to our lecture on quadratic functions. So first let's define what a quadratic function is. As before, f of x equals ax squared plus bx plus c. This is called a quadratic function, and the reason why it's given a quadratic function, how do you know when something is a quadratic function? The highest term that appears is degree two. So we keep hearing quad, it usually means four, but for our cases here, it's going to be the highest exponent that you see is two and this is the shape normally that you know and love, these are your good old parabolas. They can certainly open upwards, they can open downward and we'll talk about the differences in a second. But the general form is ax squared plus bx plus c. As an example of what you've seen before, you've certainly seen f of x equals x squared, that is just a very specific quadratic function where the leading term a is one and the b and the c are zero, they're both zero. A quadratic function, as it is a polynomial, will always have a domain of all real numbers and the range will vary. It will depend on if the graph goes up or down or where it's located. So the range can change, but the domain will always be real numbers. As another example of a quadratic function, sometimes they come in disguise. You have to be a little careful. Let's look at x plus 2 squared. Some folks look at this and say, x plus 2 is not a line. No, the reason for that is if you foil this out, you'll get x squared plus 4x plus 4 and in that case now the degree two is clearly visible, so this is a quadratic function. But this also gives us a hint of what's to come. If you try to graph x squared plus 4x plus 4, it's a little tricky to see where the min is and where the max is and where this graph lies on the x-y axis. But if you look at it as x plus 2 squared, this is the factored form, there's something about this that helps you see where this parabola lives. Squaring a function leads to a non-negative number. The smallest you can ever get is zero as your output. So if I plug in negative 2, so let's graph negative 2, and I plug in negative 2 to this function, x plus 2 quantity squared, you get zero on your graph, and then since you're always non-negative, the parabola has a minimum at 0, has a minimum at 0. So looking at where the function outputs zero helps define certain properties of this parabola. As another important piece, you can also find the y-intercept. This is when you set the variable x equal to 0, so opposite. So x equals 0 in this case, and you get 0 plus 2 quantity squared, which is of course 4. So the x-intercept is at 0, 4. So look out for parabolas in factored form. So now let's pick a number and let's let it be positive and I want to consider a parabola of the form, something we just saw. Imagine if I saw f of x equals x minus c squared and the other case I want to look at is what if f of x equals x plus c squared? We saw this before as an example. Let's just convert to y. Y equals x minus 3 squared and as a counter, well, let's do x plus 3 squared. Take a second if you can, pause the video, and see if you can graph these parabolas and where they live and what they look like. When you graph these parabolas, again, look for where the function outputs zero, where's the minimum of this function going to be? If I have x minus 3, if I plug in 3 for x, then the function outputs 0, you get 0 squared of 2, 0 and so your parabola gets shifted to the right. Then if I have the same graph with x plus 3, where does this equal 0? Well, I got to go left three spots to get x equals negative three to output 0. I've shifted the entire parabola by three units. So it's a little counterintuitive here and this is sometimes where students get confused but when you have x minus c, this is a shift to the right and when you have x plus c, this is a shift to the left. A little counterintuitive but watch out for that. That helps you imagine where the graph is going to go. Let's add to our quadratic a little bit and let's make it more complicated. What if I had x minus c squared plus 5? Let's start with this one for a second. It's going to be very similar for the x plus ck. If I take my graph, what does this say? This has first shift left, or to the right, I should say minus, means go to the right, counter-intuitive on the inside. Then if you add five, what would happen to the graph of the other one? This says you shift up. So now we're treating this parabola like a magnet and we're moving it around the x, y plane and the goal is when you look at an equation, you'd like to have a general idea in your head where the parabola lives. What is the quadrant is it in? Where's the minimum? Where's the maximum? This is how to do it with these factored forms. The key to remember is that anything inside the parabola is opposite what you'd expect. So if it's a minus c, you're going to the right, if it's plus c, you're going to the left. But then outside the parentheses, that's your normal shifted up or shifted down. So let's do an example here. This is key here, without a calculator, can you gain some visual intuition? Let's do f of x equals x plus 4 minus 2, and we'll do a square root on the x plus 4. So again, you realize that this is a quadratic x plus 4 squared when you factor this out, do your foiling, I should say, you're going to get x squared plus 8x plus 16. But we don't want to do that. I want you to look at this and be able to tell me where, in general, I don't need a perfect sketch, I just want the general ballpark where this lives. In your mind, you should start with, do it in pieces, x plus 4. So that's a shift to the left, four units. So we go 1, 2, 3, 4, and then down two. We pull it down two like a magnet. We grab that vertex, and we shift it, and off we go. It's going to have some positive shape going up, and we have some parabola here. Now, if I wanted the x-intercepts, if I wanted to know exactly where this met, I could go through and find those y-intercepts as well, but I'm just looking for the general shape of the parabola here. An important part of the parabola, one of the important points in the parabola we want to find, is the minimum or maximum. This is called the vertex of the parabola. So we want to find that minimum or that maximum. Again, this is called a vertex. So the idea is how do we find that point? So you can actually do it using a little bit of algebra. It's a little tricky, and I want to go through it. So stay with me if you can, and pause the video if you need to. Some of the moves here are not obvious to make. In particular, we're going to factor an a out of the first two terms only. So we get a, parentheses x squared plus b over ax plus c. Now, why I divided by a? Because there was no a in the first place to factor out, so if I distribute the a's back in, I need the a to cancel. So convince yourself that if you bring the a back in, you actually do get a x squared plus bx plus c. Now, so that's tricky move number 1. Here comes tricky move number 2. I want to introduce a term that's not actually there, so keep everything that I have so far. I want to add and subtract the same term, and so, in effect, I'm adding zero. The term that I want to add is b over 2a quantity squared. But I just added this thing that I can't just put in without cost, so I subtracted off as well. Now, stare at this for a minute. This is another non-obvious algebra move. If you've seen this before, this is called completing the square. If you haven't, this is where this b over 2a comes from. If you haven't seen this before, at least convince yourself that I've added zero. So if I add zero to an expression, I haven't changed the value of the expression. Now, what I want to do is I want to bring in the a, but strategically. I want to bring in the a on the outside strategically. First, I want to leave the three terms alone, the first three that are inside my parentheses here. So I have x squared plus b divided by a times x plus b over 2a squared, and then I want to bring the a in to the negative b over 2a, quantity squared, and that'll give me negative a times parentheses b over 2a quantity squared, and then there's still a little plus c floating around here. So I'm very strategically manipulating the pieces that I want. You'll see where this is going, so bear with me for a second here. Last but not least, these three terms, x squared plus ba over x, they clean up, these three terms inside the parentheses. This turns out to be x plus b over 2a quantity squared. That may be non-obvious to you, so convince yourself this is true. A lot of people foil this out, so they write x plus b over 2a times x plus b over 2a. They foil this out to see this. You will get back x squared plus b over a x plus b divided by 2a squared. So that actually does work out. On the other side, outside the parentheses, the constants, they cancel a little bit, I guess. There's an a squared when you clean this up here. So what do we get? We get minus b squared over 4. There should be an a squared here, but I cancel one of them, so we just have a, and then I add a c. So last but not least, let's rewrite this in a way that's a bit more readable, perhaps more familiar. I'm going to add these fractions. So I'm going to add these fractions at the end. To add fractions, of course, we need a common denominator, so I'm going to multiply and divide by 4a. When I do that, I get 4ac. So I'm going to flip the order that these appear. 4ac minus b squared all over the common denominator of 4a. So this is very specific algebra techniques and even this is difficult for a very relatively simple function like the quadratic. I have to zoom out a little bit and see this function for what it is. It's a times something squared. So here's your shift that's occurring. Whatever this value this number is, this is your horizontal shift and then we're adding some number, maybe it's negative, I don't know, but we're shifting to the right here. What's going to affect the vertex? Where does the vertex get affected? When you shift something to left or the right, the vertex moves with you. But the minimum value or the maximum value, just depending on wherever your vertex is, occurs when the thing inside the parentheses is going to be zero. That occurs exactly when x is negative b over 2a. So that's the takeaway from all of this. So the vertex of the parabola, again, the algebra here is not obvious, so it's okay if you're not sure where things came from, but at least agree, hopefully you follow the algebra and agree that it's correct. But the point is, when x is negative b over 2a, whatever this value is, that is going to be the x coordinate of the vertex. When you plug that in, you get that this is zero inside the parentheses. So whatever your number a is times 0 goes away and the y value is what's left over here, 4ac minus b squared all over 4a. The y value formula, you don't really know the more important one, in all honesty, is the x coordinate formula because this is extremely nice. You can always plug in the value to find y. If I gave you y equals x squared plus x plus 1 and I said to you, "Hey, what's the x coordinate? What's the vertex of the parabola? Where does this max or min occur?" Again, you might imagine, it's pretty important to find maxes or mins, I want to minimize my cost, maximize my revenue, maximize my efficiency. The vertex, the minimum here of this one, is going to be at x is negative b, so a, b, and c are all one. So negative 1, 2 times 1, b is 1 and a is 1. This is negative one-half. Again, you can go graph this. I want you to go graph this. You're going to convince yourselves. Look how fast that happened. Look how efficient that was. I can tell exactly where the x coordinate is. Now, the y value you get, you can definitely plug in and see what you get for f of negative a half, sounds like an an easy function you can plug in. So you get negative a half times negative half, that's positive a fourth minus one-half plus 1. So this is basically a half plus a fourth, which is 0.75 or three-fourths. You can check that's exactly what you get if you plug in for the formula for the y value, 4 times 1 minus 1 is 3 divided by 4 is three-fourths. So they both match, either one is okay. The more important value here is x equals negative b over 2a. You will see that over and over again and you can use this to help you sketch the graph of the parabola. It's impossible to talk about quadratics without talking about the quadratic formula. This is probably sometimes things of nightmares for some folks, but you'd used to after a while, and the idea is you want to solve for x, and you have ax squared plus bx plus c is 0. This is called finding the roots, finding the zeros. You'll see both words used interchangeably, and I'm going to present the formula for you. You don't have to memorize it, but you should know what it is, know when you see it, and then know how to use it. Perhaps more importantly, you can always look it up if you need to. So we have b squared minus 4ac all over 2a. So x equals negative b plus or minus the square root of b squared minus 4ac, all under the square root, divided by 2a, the plus or minus sign here just says you're going to get two answers. You get two answers, one involving a positive, one involving a negative. The thing under the square root, the b squared minus 4ac, this term has a name, sometimes it's called the discriminant, and let's go ahead and do an example to show you how this works. Let's look at y equals, our function equals, 4x squared minus 4x plus 1. The goal is, I want to set equal to 0, find the roots, find the zeros. This also finds the x-intercepts as well, so lots of important numbers to find. I'll just go through this. So sometimes if you're just starting out with this, I will do this once but I won't do this every time, you can list out the a, which is the leading coefficient of 4, you can list off the b, which is the coefficient linear term minus 4, and you can list off the c, which is 1, and then you go ahead and plug it in. You get x is minus b, so minus minus 4 is positive 4 plus or minus the square root of b squared, I like to do this all in one step here. So negative 4 squared is positive 16 minus 4 times a, which is 4 again, times c, which is just 1, you don't have to write it, but I'll write it just to be complete, all over 2a, so that's all over 8. We'll clean this up a little bit. So the square root, usually is the thing that's the most messiest. So we put all our effort into cleaning that up. We get 16 minus 4 times 4,16 all over 8,16 minus 16, of course is 0. The square root of 0 is in fact 0. So you get 4 plus or minus 0. Either way doesn't matter, but you get 4 over 8, which is 1. In this case, there's only one root. We say, we have a repeated root, but there's only one value here. So just because you have a plus-minus, doesn't guarantee that you're always going to get two values. Sometimes you get a zero for your discriminant, and that leaves just one repeated root. Of course, that won't always happen. So let's do another one. How about y equals x squared minus 4x plus 1? In that particular case here, we have a is 1, b is minus 4,, and c is 1 again. So slight change from the first one. Let's see how that matters. So I have x equals negative b. Once again, negative, negative 4 is positive 4 plus or minus the square root of b squared 16 minus 4 times a times c, a and c are both 1, so we just have 16 minus 4, all over 2a, a is once are all over 2. So when you write out as many pieces as you need, I don't like writing 2 times 1. I think it just gets a little cumbersome to do that. So we have 4 plus or minus 16 minus 4 is root 12. Now, root 12 is not a nice square root. It's probably fine, but there isn't too much you can do with it. So what we'll do here, I do see some simplification that can occur. So we'll write root 12 as root 4 times root 3. So root 4 times root 3, and then 4 times 3 is 12. So you could split up the square root and then root 4 is 2, and you get to 2 root 3. Now, this is nice because you could factor out a two and clean this up. So 2 goes into 4 twice, and then you can cancel the 2's on the side after reduce and you get root 3. So this has two answers here, 2 plus root 3 and then 2 minus root 3. You can write it nice and concise as 2 plus or minus root 3. But there's absolutely nothing wrong with writing 2 plus root 3, 2 minus root 3. These are two different answers. If you needed decimals, you can certainly run to a calculator and grab them. It's nice to present these answers in there closed form, so this is not rounding. The reason for that is, once you grab a decimal, you're going to round eventually. You're going to have to cut it off at two decimals, three decimals, four decimals, and you've introduced a rounding error. As these problems get more and more complicated, you try not to round too early because it was rounding errors can compile. So when you're presenting answers, try to present them in their closed form. So quadratics come up all the time. In particular, they come up and trying to find points of intersection. So for example, y equals 2x squared minus 5x minus 6, and y equals 3x plus 4. This is a quadratic degree to some parabola. Then you have a line. So in your head, you can imagine there's some engine graph these if you want, but there is a quadratic. I'm just going to draw a sketch and align and maybe it meets twice on and on, it's possible that a line could never meet at all. Maybe you just misses the quadratic entirely and there's always a perfectly good line. Maybe it just touches once. So I'll just draw three examples here. So there's three possibilities. In the question is, how does it meet? So when you want to find where two things meet, the points that they meet over the graphs are equal to each other. So the corresponding thing you do when graphs are equal to each other, is you set the equation equal to each other. So we have 2x squared minus 5x minus 6 is equal to 3x plus 4. So finding points of intersection with the graphs are equal, means set the equations equal to each other, and then we solve. Alone behold, when I do that. So let's subtract 3x from both sides, you get minus 8x. If I subtract 4 from both sides, you get minus 10 and that equals 0. Now I have 2x squared minus 8x minus 10 is 0. I could go ahead here and do the quadratic formula. But something I see, is that a 2, and 8, and 10, they're all even. So what I we'd like to do, is divide every term by 2 or factor 2 and move it over, just so I work with smaller numbers. When I do that, I get x squared minus 4x minus 5 is 0. Little bit of smaller numbers to work with instead of 2, 8, and 10. So factor out if they had something in common. In this case here, I certainly could do the quadratic formula, absolutely. But I could also factor, I don't need such heavy machinery. In that case, if I did x minus 5 and x plus 1, this will factor, you can check, go off on the side, always go off on the side, it's good practice. X squared plus x minus 5x minus 5. Put it back together, you get negative 4x. So it's all good, it's a good idea to practice checking your work intermediate step, as math builds on itself with the problems get more complicated, you want to have this habit of stopping, checking your work as you go through. Last but not least, you get x minus 5 is equal to 0 or x plus 1 is equal to 0, is called the zero property when two things multiplied together to give you zero, so you get x is 5 or x is equal to the negative 1. These are just the x-coordinates, I didn't quite find the points of intersection but the beautiful thing of this is, I can take this x value and plug it into either the quadratic or the line, it's easier to plug in the line, so if I want the y value, we can plug it in, let's plug it into line, you get 3x plus 4, so it's 15 plus 4, you get y as 19. So there's our first point, 5 comma 19 or x is negative 1, so I'll be like negative 3 plus 4 or 4 minus 3 and you get y as 1. So you're getting two points back here, so the case wherein, again, this doesn't always have to happen, but it does in this example is when the line and the parabola meet at two points. Let's do a more complicated example and then again, this is quadratics in disguise here. So x plus 2 over x minus 6 is equal to 3. This does not look like a quadratic, in fact we call these rational functions when you have like a fraction with x downstairs and the goal is to solve for x. So this is the goal to solve for. It's good practice with fractions either way. So when I see this, I see x plus 2 over x minus 6 but really, since we're working with fractions, I'm going to go ahead and write x over 1. So I see a fraction plus a fraction. When you see a fraction plus a fraction, we should remind ourselves, how do we work with sums of fractions? Let's put it over a common denominator. So we have x over x minus 6 plus 2 over x minus 6, so there's our nice common denominator, it's all still equal to 3. When I have fractions, add it together with a common denominator, I add them up, so let's distribute this x first into both pieces. So we have x squared minus 6x and I add my two all over the common denominator and we don't add the denominators, just keep it the same, and that's all equal to 3. Since I'm working with fractions, I really should see this, you don't have to write it this way, but you should see it as 3 divided by 1. Now I have fraction equal to fraction, the algebraic move is to cross multiply. When you cross-multiply and work this out, you get 1 times x squared minus 6x plus 2. Well, that's nice, x squared minus 6x plus 2 times 1 is itself and that's equal to 3 parentheses, x minus 6. So I get x squared minus 6x plus 2 is equal to 3x minus 18. Clean this up a little bit and lo and behold, as promised, you get a quadratic because we subtract 3x from both sides and if I add 18, you get 20 to be 0. There it is. So there's your quadratic in disguise, so this question is another layer that you have to unwrap to get down to the quadratic and once you have from here you are certainly familiar territory, hopefully, since we didn't do quadratic formula. Last fun, let's do it over here and this case here my a is 1 , my b is negative 9, and my c is 20, they don't have anything in common, so I can't like reduce, so I'm stuck working with these numbers, so here we go. X equals negative b, so negative 9 is positive 9 plus or minus the square root of b squared, that's 81, minus 4 times a times c all over 2a. So 2 times 1. So we have 9 plus or minus the square root of 81, 4 times 20 is 80, so minus 80, well, it's going to be nice, divided by 2 is equal to 9 plus or minus the square root of 1 divided by 2, square root of 1. What number squared gives you 1? That's just one, and get 9 plus or minus 1 over 2. When we have this expression, when it can't simplify anymore, let's fork the road, one is a plus and one is a minus and you get 9 plus 1 over 2 and then 9 minus 1 over 2. So write it out both ways so you can see it. When you have 9 plus 1 over 2, this is of course 10 over 2 better known as 5. Let me subtract 1, you get 8 over 2 better known as 4. So maybe you saw that in the beginning called the factor probably also without doing quadratic formula. The point is what's good practice, if don't see it, you can work it up both ways. But this does factor is x minus 5, x minus 4. Either way you do it factor or quadratic formula, you get x is 5 and x minus 4. So there are two values here. There's one thing you have to check when you have these rational functions. That's to make sure that both of these answers are actually valid. Pretty it's good practice to go back and plug in, does it actually work. Also I want to point one thing here, x minus 6 is downstairs in the denominator. This didn't come up. But if we get a six as our answer, it's not in the domain, you can't plug in six. So if we had it, which we don't, let them just say if we did, you would throw it away call an extraneous solution. Here's a good word for you, we throw it away. In this case here, five works. So 5 plus 2 over 5 minus 6 is minus 1, is like 5 minus 2 is 3. Check. You can notice it's good practice, good habits to check your work. Then 4 plus 2 divided by 4 minus 6 or minus 2. So 4 minus 1 is 3. Absolutely, they both work, they're both valid. So we go back and we check our answers and we get the right answer. So let's do one more example and we're going to look at these breakeven points again, very useful in applications to business. So we have our revenue model. So let's look at a revenue model is 32x minus 0.21x squared. We have our cost model as 195 plus 12x. So x will be the thousands of whatever we make. I would say people when they are working with stuff, pretenders in millions and then it just gives as per context. So we have 32x minus 0.21x squared and 185 plus 12x. The goal is where do we want? Where does this thing break-even? If we're an investor in the company, where does our cost equal to our revenue? So a break-even point is when the revenue is equal to your cost. Another way to say that is that your profit is zero. Profit being your revenue minus your cost. So where does this happen? So we have to do a little bit of algebra here. So we want revenue equal to cost. So we have 32x minus 0.21x squared equal to 195 plus 12x. I want you to go through and do the algebra on this. From here, once you have this setup, it's something that's very familiar. You're going to set up the equation and solve for it. So I leave that as sort of an exercise to you. You're going to need the quadratic formula to do that. But I want you to check, when you do this, you get, you'll need a calculator for this one. When you do this, you get that x is going to equal 47.62 plus or minus 36.59. When you split the road, when you do the plus, when you do the minus, you get 11.03 and you get 84.21. So I want you to fill in the blanks and see if we can get these answers. But once you have the quadratic, this should feel familiar and you could do the quadratic formula again. So the idea is, these are your two values. In terms of graphing and visualizing what this looks like, the parabola that we have. So minus 21x squared plus 32x, this is a downward parabola. The minus sign is telling you this downward. If you plug in zero goes right through the origin. So you have some parabola that's like doing its thing. It's the origin going downward, so I don't know where it crosses. You can always figure that out. But one of the points sworn formerly as the origin, so there's your revenue curve. The cost function is a line, it has positive slope 12. Its y-intercept is at 195, so it has a high y-intercept. Since we have two points of intersection, is going to go through the graph at two points. It's just a sketch of the curve. So your two values of this corresponds to is 11.03 and the other x value is 84.21. The little space above the graph here, this is your profit in here. The difference, your positive profits. So as a company, sub should makes some decisions. To make some money initially, you need to make at least 11.03 of the objects you do. That's when you start making money. But then, and this is where it gets interesting is perhaps the non-trivial one. It's not in your interest to make more than 84.21. It cost too much and they don't sell as much. You don't make as much. So there's a range here where you'll make some profits. More people just assume, if I just keep making stuff, then I'll just keep making more profits maybe, but not with these two models. So there's a point where you want it to be profitable, you stay within this range and that helps drive some business. So keep these examples handy. Keep the formula handy for quadratic formulas. We're going to use it in things to come and go over these problems and make sure you have a good understanding so you can do some practice ones on the course. Great job on this one. I'll see you next time.