 Welcome to Episode 6 of our Math 1050 College Algebra class. I'm Dennis Allison of the Math Department at Utah Valley State College. This episode covers two major topics. First of all, we'll talk about quadratic functions, some important formulas related to quadratic functions, and we'll look at some useful applications that I think are rather interesting. Then we'll switch to another topic and talk about the algebra functions, and in particular the composition of two functions that becomes important for our next episode. Well, to begin with, let's look at what I mean by a quadratic function. If I have a function f of x of this form, let's say mx plus b, you remember in a previous episode we referred to this as a linear function. But if I have a function of this form where there's a second power involved, ax squared, I think I'll say plus bx plus c. Now, this is a quadratic expression, and we refer to this as a quadratic function. And quadratic functions have graphs that are, that are parabolas. Now, let's just take an example of a quadratic function that we've actually seen a couple episodes back. Suppose I wanted to graph this function f of x equals x minus two squared minus three. Now, you may recall that this is actually a transformation of the function f of x equals x squared. And f of x equals x squared has three target points. They were at, they were at zero, zero, one, one, and negative one, one. And once I plot those three target points then I can draw the graph by just drawing a parabola that goes through those points. But this is a, this is a transformed, this is a transformation of that fundamental graph. What are the changes that I make if I want to graph this, this function? Steven? You have to go to the right two and down three. Exactly. We're going to go to the right two because I've subtracted two directly from the x. And the minus three on the end says I need to go down three. So if I graph that one right here, let's see what I would do. Let's, let's put our scale on here first of all. This is the x-axis, this is the y-axis. So I'm going to take my origin and move it to a new position. I'm going to go over two, and I'm going to go down three. So over two, down three, this is my new origin right here. So that point corresponds to the original origin. And my target points say go over one and up one to the right. Go to the left one and up one. And so when I draw my graph, it looks like this. Now, you know, before I go too far on this, where will this function cross the y-axis? I'm going to use this space over here to find my y-intercept so that I can complete this graph. You may remember that to find the y-intercept, I let x be zero. So I'm going to let x be zero. That just means calculate f at zero. And when I plug in a zero there, I get negative two squared minus three. That's going to be four minus three or one. So this graph is going to cross the y-axis at one right there. And as it turns, so that's where I'll locate that point. And this is the graph of f. Now, while we're at it, where does it cross the x-axis? Who can tell us how to find the x-intercepts? In fact, first of all, let me ask you, how many x-intercepts does this seem to have? Two. Looks like it has two. You know, I bet there's one that's very small but positive. And there's another one over here that looks like it's bigger than three the way I've labeled it. But we don't know if my graph is perfectly accurate. Well, you remember, to find the y-intercept, we let x be zero. To find the x-intercepts, I'm going to let y be zero. Now, I'm going to need a little more space for that. So let me just erase all of this on the right-hand side. And I'm going to let y be zero. And y is the same thing as the f of x, so I'm going to let f of x be zero. x minus two squared minus three. Now, one way to solve that would be to multiply this out and then either factor it or use the quadratic formula. I'll think I'll use the idea of completing the square. I'm going to add three to both sides. Let's see, that should be a minus there. And then take a square root on both sides. And I'll take both the positive and the negative square root of three because I'm looking for every possible solution. That's what x minus two is. It's equal to plus or minus the square root of three. So x is equal to two plus or minus the square root of three. So I actually have two answers. One of them, I'll call it x number one, is two plus the square root of three. And the other one, x number two, is two minus the square root of three. Now, if you find the square root of three on your calculator, I think you'll see that the square root of three is about 1.7. So x one here is about two plus 1.7, which makes that 3.7. So when I said the x-intercept was a little bit larger than three, that's fairly accurate. That's about 3.7 right here. The other number we said should be positive, but pretty close to zero. Let's just see. If I substitute in 1.7, an approximation of the square root of three, that's two minus 1.7, and that is 0.3. Yes, so that number should be, well, right about there. I didn't draw my graph quite through it, but that's where it should have been. You know, the problem with the numbers like the square root of three is these are irrational numbers, and so as decimals, they extend indefinitely, and they have no pattern to them. So when you find the square root of three on your calculator, you really don't find it exactly. You find it out to maybe eight or ten decimal places, but the last decimal place is rounded off. And this number goes on forever, and there's no pattern. So who knows what would be the next digit after the digit you see on your calculator. So it's a lot easier to just call it the square root of three, and that's considered exact as opposed to using a 1.7, which is an approximation. It's just that when I go to actually plot a number, I need to have something more than this, so I did use the approximation in that case. Okay, well, with that idea, let's consider a quadratic function, and let's see if we can just guess where its vertex lies without actually drawing the graph. Oh, by the way, the word vertex, I'm using the word vertex here, in the graph that I just drew, you remember we said we went over two, and we went down to negative three, and I located that lowest point before I drew this parabola. This lowest point, this point where the parabola turns round, that's the vertex. It comes from Greek, it has a Greek origin. So finding the vertex means to find the lowest or the highest point on a parabola. If the parabola is inverted, it would be the highest point. Okay, let's take this function. I'm going to call this function p of x, because it's a polynomial, a quadratic function is a polynomial. p of x is equal to two times x plus four squared minus one. Now, if I were going to graph this, I would shift it four units to the left, and I would shift it one unit down, and what does the two do to the graph? Stretches it vertically. That's going to be a stretch. Yes, we're going to stretch the target points up above the horizontal line through the new origin. So that says that if I were to move, let me draw that a little better, if I were to move from the origin over four to the left, and down one, what would be the coordinates of the vertex? Susan? I actually have a question. Oh, okay. Why are you moving it four to the left and not four to the right? You see, if you add a four directly on the x, then you move it in a negative direction. Now, if I had added four on the outside, I would move it straight up. I'd move it in a positive direction vertically, but it's a little tricky when you add a four directly to a variable. It moves it in the opposite direction, so I go in the negative direction. Well, I guess the question is, where's the vertex? What are the coordinates of the vertex? Negative four and negative one. Negative four and negative one. So the vertex, I'll call it point V, is at negative four, negative one. And you know, I really didn't have to draw this graph over here. I could have gotten that information directly from the equation. So I'll do one more like this. Suppose I have the quadratic function f of x equals negative one-half times x plus two squared plus five. Where's the vertex of this quadratic function, of this parabola? Sam, what would you say? I'm not sure. Okay, Matt, what would you say? Where's the vertex? Let's see, vertex would be at negative two. Negative two, yeah. And positive five. Positive five, because see, that's a shifted up five units. So if I go to the left two units, that puts me at negative two. And if I go up five units, that puts me at positive five. You notice this coefficient had nothing to do with the location of the vertex. But it does have an effect on the graph. The negative flips the parabola over and the one-half compresses it. So if I were going to move from this new origin where the vertex lies, I would go out one on either side and I would go down one-half because it's been compressed and it's been inverted. Okay, so if the quadratic function is given in this form where I have a binomial squared and a constant, this is sometimes called the standard form. I can just pick out what the coordinates of the vertex are. But suppose I have this situation. Let's say I have the quadratic function f of x equals x squared minus 6x plus, let's say plus eight. Well, this is a quadratic function. You notice it's in the form. It's in the standard form that I gave you earlier, ax squared plus bx plus c. It looks like a is equal to one, b is equal to negative six, and c is equal to eight. What's the vertex of this parabola? Well, I can't tell in this form, but if I complete the square and get it into that form, I think I could name the vertex. So I'm going to complete the square by separating the x's from the eight. Now, what number would I add right here to complete the square of that trinomial? Stephen, what would you put? 36. Wait, nine. Yeah, tell us the rule for deciding how to get a nine there. You take half of the middle coefficient and square it. Exactly. First of all, you have to have a one on the x squared. If there's a two on the x squared, I'd factor out a two, or somehow move it away from these terms. But there's a one there, so everything's fine. I take half of the coefficient of the middle term, half of negative six is negative three, and then Stephen said he squared it and then he got nine. Now, you may ask, well, gee, Dennis, can you just add a nine in the middle of a problem? Well, you can if you subtract the nine over there so that these two nines would cancel if you wanted to go back to the original problem. Of course, we don't want to go back there. I want to go forward because I want to write this as a binomial squared, and on the outside, I have a minus one. Well, now you notice this looks a lot like what I had up here. So I think I can name the vertex for the function little f. And the vertex is, let's say it's an ordered pair. What would you say it is, Lene? Three negative one. Three negative one, exactly, three negative one. So I found the vertex by completing the square. Let me do just one more of those since I think maybe a couple examples have to make that clear. This time I'm going to put a coefficient on the x squared. Let's call this function capital P of x, P for polynomial. And let's say this is 2x squared minus 14x plus 5. Okay, the question is, what's the vertex? So I'm going to complete the square. And first of all, I have to get my variables separated from the constant term 5 over here. And I'm not ready to take half the middle coefficient and square it because I have a coefficient on the x squared other than a 1. So I'm going to factor out a 2 right there. And that says x squared minus 7 in parentheses. There's a plus 5 over here. I'm not factoring a 2 out of the 5. The 2 is only being factored out of the 2 terms with x's in it. Now, I'll take half this coefficient and square it. Let's see, half of negative 7 is negative 7 over 2. And then I have to square it. And when I square it, I get 49 over 4. So the number I need to add on here is 49 over 4. So I have to counterbalance that by putting something on the other side, on the other side of the 5. Well, you know, I'm putting in not 49 over 4, I'm putting in 2 times 49 over 4. And if I double 49 over 4, I get 49 over 2. So what I've actually added in here is 49 over 2. So on the other side, I'm going to subtract 49 over 2. And if I factor this trinomial, this will be x. There's a minus in the middle. And if I take the square root of 49 over 4, I get 7 over 2. And the square of this binomial is the trinomial that you see right above it. Plus. Now, I need to simplify the two constants over here. Let's get them both over 2. 10 over 2 minus 49 over 2. So this is 2 times x minus 7 halves squared minus 39 over 2. Well, this is a little messier than the last problem because I have fractions in it, but we can still name the vertex. The vertex lies at, oh, let's see. This tells me I have to shift the graph to the right, 7 halves. This says I have to shift the graph down, 39 halves. So the vertex is at 7 over 2, negative 39 over 2. If you want, you could say 3 and a half, comma, negative 19 and a half. But I think it's more compact to write. These is what they call improper fractions right here. That's the vertex. Well, I've done two problems basically the same way. This one was a little bit longer because I had to contend with the coefficient of 2 there and also because I had fractions involved, makes it look a little bit more complicated. There's a shortcut to this process. Let's start over again, and I'm going to go through this procedure one more time, but I'm going to use variable coefficients. And I'll end up with a formula that'll save me all that work. Suppose we have the function f of x equals ax squared plus bx plus c. The only difference is now I'm using variables for the coefficients rather than particular coefficients. I'm going to complete the square in this expression. And so I have f of x equals the quantity ax squared plus bx and the c. I'll move to the outside, just like I did in the last example with the plus 5. What am I going to have to do before I decide what goes in this position? Factor out the a. Have to factor out the a, right. So if I factor out the a, just like in the previous example I factored out a 2, this will be x squared plus b over ax, and over here is plus c. You see, when you say factor out the a, that means you have to divide by a inside. So I get a 1x squared and I get b over a times x. Well, this is looking a little nasty, but actually it works out rather nicely. If I take half of the b over a, I'll do that over here on the side, if I take half of b over a, I'm going to square that to put in the third position. Let's see, half of b over a is b over 2a, and when I square that, I get b squared over 4a squared. b squared over 4a squared. So I have to decide what to put on the right-hand side of c to balance that. Well, I'm not putting in just b squared over 4a squared, I'm putting in a times that, and a times that is, let's see, that a would cancel, that's b squared over 4a. So what I've actually added here is the product a times this rational expression, so I need to subtract that off, subtract off b squared over 4a. You notice that doesn't look exactly the same as what I put here, but it's because I'm replacing this product. Okay, let's use this space now to factor our trinomial. I have a times a quantity plus over here, c minus b squared over 4a. Let's see, can anyone tell me how you'd factor the trinomial? Stephen. x plus b over 2a. Yeah, x plus b over 2a. And I'm going to write this one more time, and I'm going to put this over a common denominator over here, a times x plus b over 2a squared plus 4ac minus b squared all over 4a. You know, this looks a little bit like the quadratic formula, except in the quadratic formula, the discriminant under the square root is b squared minus 4ac, this is 4ac minus b squared, so it's similar. And also in the quadratic formula, everything's over 2a, this has everything over 4a. Well, my point is this, if I want to find the vertex, the vertex has first coordinate negative b over 2a. That's because this says in the opposite direction of the number b over 2a, because I have a plus right here, so I shift it to negative b over 2a. And to find the y-coordinate of the vertex, it would be the number, it would be the number over here. Now, rather than remembering that if you want, you can remember that formula, that's fine with me, but rather than remembering that formula, if I want to find the y-coordinate of the vertex, I just take the number that comes up here and substitute it back in for x, and I evaluate this expression at whatever that number is. So if you choose to remember this formula for the y-coordinate, that's fine, but I think it's easier personally to just take this, substitute it back into f. Let's work an example using this. I'm going to write down my formula right here, and I'll also write down this formula just in case somebody wants to use that at home. Let's see, the very first example I worked I think looked like this. I had the function f of x equals x squared minus 6x plus 8, and the formulas I'm using is that for the vertex there are two coordinates, an x and a y-coordinate. The x-coordinate is negative b over 2a. And the y-coordinate, what I suggested is you go back to the original function and you evaluate it at negative b over 2a. Now in a lot of textbooks the x-coordinate of the vertex is called h, so I'm going to put an h there, and the y-coordinate of the vertex is called k, so I'm going to put a k there. But as an alternative I said you could calculate a using the formula 4ac minus b squared over 4a, but somehow that seems sort of complicated but if you want to use that, you certainly can. Okay, let's draw a little line here and let's see how this works out. I need a value for a, I need a value for b, and I need a value for c. Let's see, Susan, what are the values of a, b and c in this problem? A is 1, b is negative 6, negative 6, and c is 8. C is 8. Yeah, you know my b looks a lot like a 6, so I hope you can see the difference there. If I calculate h, let's see, that's negative b over 2a, that's going to be negative, negative 6, which is 6, all over 2a, 2a is 2, and so I get a 3. h is 3. Now to get k, what I would do would be to take 3, substitute it into the original function, just plug in a 3, and I get 9 minus 18 plus 8. And that's 17 minus 18 is negative 1. So the vertex is at the point 3, negative 1, and I believe that's the same answer we got just a moment ago when we completed the square to find the vertex. Someone may say, could you work that to calculate k using your formula over here? Well, let's just try that and see. And I'm going to erase this space right here and see if I come up with a value for k. Okay, the formula says k is equal to 4ac minus b squared over 4a. So if I substitute in our numbers, so I have 4 times 1 times 8 minus negative 6 squared all over 4. And that's 32 minus 36 over 4. Let's see, that's negative 4 over 4 is negative 1, and that's exactly what we got over here was negative 1. So if you would like to remember that formula, that's fine. Or, the alternative is to substitute the h value into the function, and just calculate the function value there. Okay, now there are applications for this. You know, we're not just finding vertices just because we think they're fun to find, but there are actually applications for this in the real world. So let's go to the next graphic. This is a... Let's see, let's go to the next graphic for the garden problem. Yeah, this is a problem that we talked about last time when we were using a function to model a real-life situation. You remember in the last episode we described a property owner who planned to use 120 feet of fencing to construct a rectangular garden beside a garage. What would be the largest enclosed area if she enclosed all four sides? Now that's not exactly the way the problem was stated before. Imagine that I have 120 feet of fencing and let's say the fencing comes on a spool like this and let's say we're going to make a rectangular garden so that I have to fence all four sides. Then let's say I put x here and I put x here. How much fencing would be left over for the other two sides? I think it would be 120 minus 2x feet because I've used up 2x. Now I need to divide that by 2 because I'm going to put half there and half there so if I divide that by 2 then the length of each one of these sides is 60 minus x. So I'll put 60 minus x up here and 60 minus x down here. So the area of the garden we'll call it A of x is length times width. The length is 60 minus x and the width is x. And so the area is 60x minus x squared. Now let's see, for example, what if we said x was 10? Can anyone tell me what is the area of the garden when x is 10 if you plug in a 10 right there? 500? I think it would be 500. 10 here says 600 10 here says subtract off 100. It will be 500 square feet. But on the other hand, what if we say that we made this side 20? What would be the area of the garden? Well, if I put in a 20 there 60 times 20 is 1200 and 20 squared is 400. So we get a larger garden. It's 800 square feet. Well, this presents the question of what should I choose for x if I want to make the area of the garden as large as possible? What's the largest garden I can make? Well, to do that, I need to find where this quadratic function reaches its highest point. You say, does that reach a highest point? Well, this is a quadratic function and I have a negative on the square. So this is, if I graph this, it would be a parabola that opens down and that parabola has a highest point. Let's just see how that would go. Let's see the function that we had there was 60x minus x squared. Now I'm going to turn that around and call it minus x squared plus 60x and the negative right there this is a parabola that opens down. So if I graph this function the graph would look sort of like this more or less. And there's a highest point and this is the area axis, the vertical axis so there must be a maximum area right there. So if I could just determine that number, that would tell me the largest garden I could make. But that means I need to locate the vertex and see what is its y-coordinate. So what is the vertex of this parabola? Well quickly the way I could find the vertex is to take negative b over 2a to get h and then afterwards I'll calculate k. Negative b, that'll be negative 60 over 2a 2 times a, a is negative 1 that'll be a negative 2 so I get 30. Now that tells me the x-coordinate of the vertex. That says we should let x be 30 up here and we should let x be 30 to get the maximum area. And what is the maximum area? Well that would be the k-coordinate of the vertex, which is a at 30. And that, if I plug in a 30 over here that's minus 900 plus 1800 is 900 square feet. So if you want to make the largest possible rectangular garden the largest garden you can make is 900 square feet and you make this side be 30. By the way, what would be the length of the other side? If this is 30 what would this length be? 30. It would be 30 also. Yeah, because if x is 30 60 minus 30 is 30. In other words this is a square is what it is. Now you might say, Dennis you went all the way around the world to tell us something that we probably would have guessed intuitively that you make a square garden to get the biggest area. I agree, we did go a lot of trouble to verify that. Now let's change the problem and I think we get an answer that you wouldn't normally expect. And this is the problem that was actually posed in the last episode. The landowner is going to put the garden up next to the garage. You may remember this illustration. I'm going to, let's go to the next graphic and I think we'll see this on the screen. I'll be drawing this on my board at the same time. There's the garage. I make a rectangular garden and I come out x on top and I come out x on bottom to figure out what's the biggest possible garden we could make. Okay, let's come back to the green board and this time I'm going to put all the extra fencing on this side. And that was 120 minus 2x feet. Now the area of this garden is x times 120 minus 2x which is 120x minus 2x squared. Which is minus 2x squared plus 120x. Now I've arranged the terms in this form so I can pick out the a, the b and the c. C is zero. So to calculate the vertex h is negative b over 2a which is negative 120 over 2 times a which is negative 4, h is 30. It's the same number I had in the last problem. This should be 30 feet. This should be 30 feet. Now I could calculate k by substituting in 30 into the original function. I'll find a at 30 and let's use this form up here. If I plug in a 30, that'll be 30 times 120 minus 20 which is 30 times 60 which is 1,800 square feet. Let's see what was the answer before when we did the square? 900 square feet. Now we get 1,800 square feet. We actually double the area of the maximum area if we put the garden up against the garage wall. You see basically the reason for that is rather than having to fence from this side I could put all the fencing over here and now I'm making this twice as long. This ends up being 60 over here and 30 times 60 is 1,800. So I think now it comes in sort of holes and it says just put all the fencing on one side you can make it twice as long and so you get twice the area. Okay, another problem that we introduced last time was Galileo's problem of the projectile being thrown into a building. Let's go to the next graphic and we'll see that problem stated again. It says in the last episode a ball was tossed upward from the edge of a 240 foot building with a speed of 32 feet per second. How high will it go before it strikes the ground? Okay, let me illustrate that again. You probably remember me drawing something just like this. This building is 240 feet tall and right here we throw a ball up in the air we throw something up in the air so that it goes up, it reaches a maximum height and then it comes back down toward the ground. The question I ask now is how high will the ball go? When I first heard this problem when I was taking a mathematics course I thought that would be impossible. How can anyone know how high it'll go? I mean the thing is moving nobody's up there to see how high it'll go but we can actually do this with the fundamental formula that we introduced last time from Galileo that said h of t is minus 16 t squared plus v sub zero t plus h sub zero. If you take a course in physics you'll hear a lot more about this formula and you'll hear a lot more about Galileo. In this problem what was v sub zero? That was the initial speed. 32? 32 feet per second and what is h sub zero? 240. So this says h of t is minus 16 t squared plus 32 t plus 240. This is a quadratic function and I'm looking for the maximum height. It's a maximum because if I were to graph this this is a parabola that opens down because there's a negative on the square term. It opens down so it has a maximum height. So to find the maximum height I'll allocate the vertex. First I'll calculate h negative b over 2a which is negative 32 over 2 times negative 16. Let's see now that's negative 32 over negative 32 that's 1. Now h is the first coordinate so this represents time that would be 1 second. So after 1 second it's at the maximum height. Now what is the maximum height? I'll calculate k because k is the function value the function values give heights. I'll find h at 1. If you'd prefer to use that formula that we created 4ac minus b squared over 4a be my guest go ahead and use it but I think this is quicker. I'll substitute in a 1 here and here so that I get minus 16 over 240. Let's see this gives me 16 plus 240 is 256 feet that's how high the object goes. Now you might say Dennis if I go out get on top of a building 240 feet tall and if I can actually throw an object straight up with the initial speed of 32 feet per second will it actually go 256 feet high? Well you remember this function is a model and we haven't taken into account distance, wind, things like that so in a vacuum this is how high it should go in real life it may go just a little bit less than that but this is a fairly close approximation of how high it'll go if we could do this in a vacuum for example there's a vacuum on the moon there's no atmosphere on the moon then this should be accurate but on the moon I would change that negative 16 to a different negative number because the acceleration of gravity on the moon is different and that constant on the earth. Okay let's see let's go to the next topic here and that is the algebra of functions so we're going to shift gears we're going to leave quadratic functions now you know how to find the vertex of a quadratic function two ways you know that you can complete the square and write the quadratic function in standard form and pick out the h and the k or you can use the formula for each negative b over 2a and then calculate the k coordinate okay well the other topic today is the algebra of functions I'll just write that up here the algebra of functions and this is how you combine functions in various ways and this is related to sort of a preview of what's coming up in the next episode now suppose I have two functions let's say I have a function f of x equals two x minus three and I have a function g of x which is three x plus one and suppose I want to add these two functions together well if I add the two functions together I would get how many x's there I'd get five x and minus two exactly now this is this is a new function and if I wanted I suppose I could call it h of x although if I give a name like h that tells me nothing about where the function came from so instead of h I'm going to give this function a little bit more complicated name I'm going to call it the function f plus g I'll say that really fast because I'm thinking of this as a single symbol this is the function f plus g and it is the sum of f and g so it's sort of a natural name for it now the reason that's an improvement over saying h of x is because when I see h of x equals five x minus two this doesn't tell me anything about the history of the function it doesn't tell me how I arrived at it it just says it is this tells me about the moment whereas this statement tells me about how I got this function that I added two other functions this doesn't tell me what f and g are but it tells me that I added two functions to get it take for example your own name let's see we have here matt sievers matt sievers now matt is his is his given name but sievers is his family name that says that sort of in a historical context he comes from the sievers shall we say the tribe or the clan called sievers so it says a little bit about his history so matt's his own person but he belongs to a certain clan or tribe called the siever tribe probably the clan of his father because that's sort of the tradition in American culture anyway is to take your father's last name so this tells me a little bit about the history of the function that I've created here it was formed by taking f and g together suppose I were to say I'm thinking of a function I'm going to call it the function f minus g of x now this is a single function but it's name is f minus g it's a hyphenated name no actually it's not hyphenated that's a subtraction but sort of like people today have hyphenated names kind of think of it this way it's a single name what would you guess would be the rule for the function f minus g? negative x minus 4 negative x minus 4 yeah I think what steven was doing is he was subtracting those two in fact let me just fill in some details for that I think he was taking x minus 3 and he was subtracting 3x plus 1 and then he reduced that so he had 2x take away 3x is negative x and minus 3 minus 1 is minus 4 now you know sometimes I have students who say oh Dennis I see what you did you just distributed the x across the f minus g like f times x minus g times x well that's not really true because this isn't multiplication it's the function of x and we just define f minus g of x we define it to be f of x minus g of x but this was not multiplication because this is one function I'm taking a function of x and it just happens to look like multiplication but it's not that's not actually what's happening okay another situation I'm thinking of yet another function this function I'm going to call fg of x fg of x what do you think that means fg the product of the two functions it's the product yeah see when I write fg I'm thinking of multiplication so the new function I'm calling fg but it's basically f of x times g of x and if I multiply those together that would be 2x minus 3 times 3x plus 1 and that would be 6x squared minus 7x minus 3 so in this case I have the product of two linear functions as a quadratic function we could find the vertex for this but we don't want to do it so we'll leave it at the quadratic function would that be any different than if I had found f or rather gf of x the same thing by definition this would be g of x times f of x but when you multiply these in the reverse order you get the very same answer so it would still get 6x squared minus 7x minus 3 so technically I'm talking about two different functions that happen to have the same rule you can probably guess what's coming next we've just done the sum of two functions the difference of two functions the product of two functions f slash g of x yes I'm afraid you're right this is the ratio of the two functions this is going to be f of x on top and g of x on bottom so if I see f slash g it just means take the ratio of those two and that's going to be 2x minus 3 over 3x plus 1 what was the domain of the original function f all real numbers what was the domain of the original function g all real numbers but what's the domain of the function f slash g all numbers except for negative one third exactly because we can't divide by zero and this is zero if you put in a negative one third for x you get negative one plus one is zero so sometimes when you combine two functions and other functions you can have a domain that changes a restricted domain the domain of f slash g is all real numbers except negative one third in that case let's see here I'm going to draw a graph of a function that I hope will be fairly easy to read and I'm going to ask you some questions about it the graph of the function looks like this here's the x-axis here's three here's negative three I'm running out of room so I'll say that's two and this is negative two now suppose this function looks like this it goes diagonally up to this point that's the point negative two one then it goes diagonally down to this point that's it negative one and then it goes horizontally over to here and then it goes diagonally up right there okay that's that function I'm going to call f now I'm going to draw another function on top of this I'm going to make it dotted so we can tell the difference that function starts right here at negative three and it's dotted all the way over to there and then that function comes down at a 45 degree angle to two and then it goes horizontally so it's supposed to be right on the x-axis but I'll put it just above it so you can see it and it goes over to three I'm going to call that function g now just looking at that graph what would you say is f at one let's see now here's f at one f at one should be what number? negative one just looking at that graph what would you say at negative one I'm just picking negative one at random what is g? it looks like at negative one if I go up to g g at negative one is two does everyone agree? looking at that graph what would you say is f plus g at zero you say well Dennis you don't have the graph of f plus g here well f plus g is defined to be f at zero plus g at zero you remember that was the definition of f plus g at zero I'll take f at zero plus g at zero what is f at zero? negative one looks like that's negative one and what is g at zero? two g at zero is two so the answer is one f plus g at zero is one what would be g minus f at negative two let's see that would be g at negative two minus f at negative two one minus two let's see g at negative two g at negative two is how much did you say Eleni? two this one is two minus what is f at negative two f at negative two is one so I get one there also both these answers turned out to be one I didn't know that was going to happen let me ask you one more question what would be f slash g at at three f slash g at three undefined very good it's undefined it's kind of a trick question you see this is actually f at three divided by g at three f at three f at three is one g at three is zero and that's undefined what that says is three is not in the domain of f slash g this is undefined it has no value on the other hand I think I could have turned it around and said what is g slash f at three and there would be an answer because that would be g at three divided by f at three and that would be zero divided by one let's see now can you divide into zero we can't divide by zero can you divide into zero sure and one goes into zero zero times so the answer is zero in that case okay you'll see problems like this on the website when you look at episode six on the website you'll see not this particular graph it's something like it and I'll ask questions about function values let's see I guess we've talked about four ways of combining functions we could add, subtract, multiply and divide functions but now what if we take one more way to combine functions let's see the two functions I had here were help me out I think it was two x plus three and the other function was three x minus one is that what I just had two x minus three, three x plus one two x minus three thank you and three x plus one okay so here's the fourth way of combining functions it's called the composition of two functions the composition of two functions now what I'm going to do is I'm going to start off by taking g of x and then I'm going to take f of that so I'm actually taking a function of a function and this is abbreviated by putting f with a little circle dot g of x circle dot there is elevated right in the middle between the g and the f the f and the g now because g is closest to x it's the one on the inside because f is on the outside or f is further out that's why it's on the outside now the way I would evaluate this is I would work from the inside out I would substitute for g of x three x plus one and then I would take f of that let's see now f of that what would it be over here it says whatever you plug in for x you're supposed to double it and subtract three so I'm going to double this and subtract three and it looks like we're going to get six x plus two minus three I think is a negative one six x minus one now compare that with the composition g dot f of x generally when you reverse the order of a composition you don't get the same answer so I get g of this time f of x goes on the inside because it's the one closest to the x and I work from the inside out so this is g of two x minus three and now what does g do to that well g takes any number and it triples it and it adds one so I'm going to have to triple this and then add one and this time I get six x who can tell me what the constant is minus nine plus one minus eight minus eight, yeah six x minus eight they look similar but they're not the same thing so we don't get the same function it's rather unusual when the composition of two functions gives the same answer in the reverse order let's go to our last graphic well let's go to the composition f dot g of two functions f and g is defined by the rule f dot g of x f of g of x I'll work one more example here and then I think we'll have to stop this time rather than picking linear functions I'm going to pick something a bit more more involved let's say that f of x is equal to x squared plus two and let's say that g of x is equal to x over x plus one the first function is a quadratic function the second function is called a rational function because it's a ratio of two polynomials I want to calculate f dot g of x this means by definition f of g of x and now from there I just substitute for g f of x over x plus one so now f goes to work on this rational expression what does f do to any number x that I plug in? what do I do to the number I plug in? square it and add two square it and add two, okay now this time I have a rather complicated thing I'm going to have to square it and add two so that'll be x over x plus one squared and then I add two that's going to be x squared over x plus one squared plus two times x plus one squared x plus one squared you see I'm getting a common denominator here and now if I combine those and put it over one denominator let's see if I multiply that out that's going to be x squared plus two times the quantity got a square of the x plus one x squared plus two x plus one and when I combine those can anyone tell me how many x squares I'll have all together on top? three x squared, yeah three x squared and then I'll have plus four x and then I'll have plus two you may or may not want to square this denominator for this purpose it doesn't really matter if you squared, if I do square that it would be x squared plus two x plus one now that's a rather complicated looking thing isn't it and that's the composition of these two functions if I reverse the order I'll try working this in the order g dot f of x and down here in the corner I'm going to leave that answer so I can look at it in a minute this was f dot g of x I'm going to reverse the order and see how different my answer is when I put it in this order it's very rare but it can happen that in the reverse order you get the same result but I don't think it'll happen here I'm going to take g of f of x and that's g of x squared plus two now what does g do to any number inside of g well it puts that number in the numerator it puts that number in the denominator plus one so if I put this in the numerator x squared plus two and if I put this in the denominator and add one what I get is x squared plus two over what x squared plus three over x squared plus three totally different now not nearly as complicated as what I had down here so when you have a composition of two functions you have to be very careful about the order that you put them in let me just give you an example that's sort of ludicrous but it pertains to this when I got up this morning I put on my shoes and socks but no wait a minute actually that's not what I did is it because I put on my socks and then my shoes makes a difference technically if you put on your shoes and socks your socks would be on the outside so if you reverse the order of those two operations the operation of putting on your shoes putting on your socks you get a totally different outcome and the same thing holds true for compositions now the order of the functions in addition makes no difference the order of the two functions in multiplication makes no difference but it does make a difference in subtraction it does make a difference in the quotient f slash g, g slash f and it makes a difference in the composition well if I could summarize what we've done today we first looked at quadratic functions and we found how to find the vertex of a quadratic function now that's very important because that tells you the extreme value of the function the lowest or the highest then we did the algebra of functions I'll see you next time yeah we got Matt Sievers right I told him about that