 Hello, and welcome to a screencast about optimization. So today we're going to look at fencing. All right, we need to enclose a rectangular field that's 800 square meters with fencing. The field has a building on one side, so we only need to fence three sides. Determine the dimensions of the field that will minimize the amount of fencing needed, which will then also cut down on the cost, which is always a good thing to do. OK, so I'm a very visual person, so I think I'm going to draw a picture first. So let's say here's our building, and here's our field, and it says it's rectangular. So that's kind of a rectangle. All right, so we're going to need some variables here, because we don't know what the dimensions are. That's what we're trying to find. So I'm going to call this side x and this side y, which then also makes this side here x. OK, now I definitely need to pick two different variables because it says it's a rectangle. It may end up being a square, but we don't know that for sure. So you do not want to let all three of these sides be x. That's one thing you definitely got to think about. OK, so now what information are we given in the problem? Well, we're given that the rectangular field is 800 meters squared. Well, whenever you see a unit, such as meters squared, you know that that's going to have to represent area. OK, so how do we find the area of a rectangle? Well, that's length times width or base times height or however you want to think about it. So in this case, with my drawing, it's x times y, and we know that that's got to equal 800. So this is considered a constraint on the problem, right? This is something we can't fix. We can't change this. OK, so we'll work on that in a second. Good, all right, what else do we know or what else do we need to find? Well, as you read the problem here, let's see we need to minimize the amount of fencing. OK, so fencing, that would be like going around the outside of the field. So that idea from geometry is perimeter. OK, so how do we find the perimeter of a rectangle or the perimeter of any object? You just add up all the sides. So in this case, that's going to be 2x plus y. Now, if you've memorized a formula for the perimeter of a rectangle, you may think, oh, she's missing a side. It should be 2x plus 2y. But no, we do not have to fence along this building. It said we only need to fence three sides. So this is where it's a good idea to maybe have some formulas in your head, but also know kind of how to tweak them in case the problem is a little bit different than what you're expecting. OK, good, and then this is the function that we need to minimize based on our constraint. OK, so we know to minimize something, that means take the derivative, set it equal to 0. But the problem is, right now we have two variables going on. Well, let me change colors here. That's where you need to use your constraint equation, because what we can do is we can solve this top equation for either x or y. I don't think it's going to matter which one. They're both fairly easy. But solve it for x or y, and then take that value and plug it into your other formula. OK, now looking ahead a little bit, I think it might be easier to solve for y, because then I don't have to multiply by a 2. And not like that's hard or anything, but that may be something that you can easily get confused or get messed up or something. So anyway, I'm going to solve this equation here for y. So right now the x and y are being multiplied, so to undo that I need to divide. So y is going to be 800 divided by x. OK, so now I'm going to take that equation. There's lots of arrows in this stuff. And I'm going to take this, and I'm going to plug that into my other equation for y. All right, let me switch back colors. Now hopefully everybody's with me and see exactly what I'm doing. So I now have a perimeter equation that's going to look like 2x plus 800 over x. And this is the equation that I can now take the derivative of. It's got one variable to it, so I don't have to do anything funny. And then it's actually pretty straightforward, two to do the derivative. But I'm going to do one rewrite here, so 2x plus 800x to the negative 1, just so we can realize that this is a power function. It takes a little bit of the uneasiness away. OK, so our derivative is 2 minus 800x to the negative 2. And again, this is just a power rule. So I can take this and set it equal to 0. I'm also going to do a little bit of algebra here, because 800x to the negative 2 is the same as 800 over x squared. And only because it's going to be a lot easier to solve for x when it doesn't have a negative exponent on it. So instead, I'm going to rewrite it as a fraction. OK, now we've got to do some algebra. So I'm going to go in and scoot this 800 over x squared to the other side. It was negative, so it's now going to become positive. OK, multiply both sides by x squared to get that out of the denominator. So 800 equals 2x squared. Divide both sides by 2. So 400 is x squared. So the next is going to equal technically plus or minus 20. But obviously, we're going to be working with a real world situation here. So how can you have a negative 20 meters? So yeah, so we'll just say this is 20 meters. OK, now that we got our x, we need to go back and figure out what our y is. OK, so then we can use our equation that we solved up here for y. So y is going to be 800 divided by 20. So cancel those 0s. So that gives us 40 meters. OK, so obviously then, if you had made this a square to start with, you would not have the minimum amount of fencing because this is definitely not a square. As it turns out, the y is double the x, but I think that's just a coincidence as it turns out. But have we answered the question? I think so. Determine the dimensions of the field that will minimize the amount of fencing. Absolutely. Now, if you really wanted to then, or if the question asked us about the fencing, we could then plug that back into our perimeter equation. So we do 2 times 20 plus 40. So that would end up saying that we would need 80 meters of fencing. Just in case the problem asked for it. I didn't in this case, but just another little extra there for you. All right, practice these problems. Draw a picture. I think that's the best place to start with these. Like I said, I'm a very visual person, so I need to see what's going on in the problem in order to be able to figure out what my equations are. But that first step is probably going to be the one that's going to take the most practice. And that's where you just got to jump in and try something and make sure that it works. All right, thank you for watching.