If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Optimization: cost of materials

AP.CALC:
FUN‑4 (EU)
,
FUN‑4.B (LO)
,
FUN‑4.B.1 (EK)
,
FUN‑4.C (LO)
,
FUN‑4.C.1 (EK)

## Video transcript

a rectangular storage container with an open top needs to have a volume of 10 cubic meters the length of its base is twice the width twice the width material for the base costs \$10 per square meter material for the sides cost \$6 per square meter find the cost of the material for the cheapest container so let's draw this this open storage container this open rectangular storage container so it's going to have an open top so let me draw let me draw its open top as good as I can so it's going to have an open top that's the top of my container and then let me draw the sides let me draw the sides just like that so it might look something like that and then I could draw and since it's open top I can see through I can see the inside of the container as well so the container would look it would look something something like that and so what do they tell us they tell us that the volume needs to be 10 cubic meters let me write that down the volume needs to be equal to 10 meters cubed the length of its base is twice the width so the length let's call well let's call this the width X so the length is going to be twice that it's going to be 2x that's what they tell us right over here they tell us a material for the base cost \$10 per square meter so the base so this this area right over here if so we're Basu if I was transparent I could continue to draw it down here but this right over here that material costs \$10 per square meter let me label that \$10 \$10 per square meter and then they say material for the sides cost \$6 per square meter so the material over here material over here costs \$6 per meter squared so let's see if we can come up with a if we can come up with a value or how much this this this box would cost to make as a function of X but X only gives us the dimensions of the base we also need a dimension for height so it'll be a fun of X and height for now so let's write H as the height right over here so what is the cost of this container going to be so the cost the cost is going to be equal to the cost of the base well the cost of the base is going to be \$10 \$10 times I'll just write 10 it's just going to be 10 times the area of the base well what's the area of the base well it's going to be the width times the length so 10 times x times 2x that is the cost of base cost of the base and now what's going to be the cost of the sides well the different different size are going to have different dimensions you have this side over here and this side over here which have the same dimension they have it they both have an area of x times H you have x times H and then our material is \$6 per square meters so it's 6 times X times H would be the cost of one of these side panels but so for two of them we have to multiply by 2 so plus 2 times 6 times H and then we have these two side panels we have this side panel right over here and we have this side panel right over here the area of each of them is going to be 2x times H so it's going to be 2x 2x times H the cost of the material is going to be 6 so the cost of one of the panels is going to be \$6 per square meters times 2x H meter squared but we have two of these panels one panel and two panels so we have to multiply by 2 and so we will get so this is right over here this is the cost of the sides cost of the sides and so let's see if we can simplify this and I'll write it all in a neutral color so this is going to be equal to 10 let's see 10 times 2 is 20 x times X is x squared and you have 2 times 6 times X H so this is going to be this is going to be plus 12x H and then this is going to be 2 times 6 which is 12 times 2 is 24 X 8 plus 24x H so this is going to be equal to 20 x squared xx x squared plus 36 plus 36 X H so this is going to be my cost but I'm not ready to optimize it yet we don't know how to optimize with respect to two variables we only know how to optimize with respect to one variable and maybe I'll say let's optimize with respect to X but if we want to optimize with respect to X we have to express H as a function of X so how can we do that how can we express H as a function of X well we know that the volume has to be 10 cubic meters so we know that X we know that X the width times the length times 2x times the height times H needs to be equal to 10 or another way of saying that this tells us that 2x squared H - x squared times H needs to be equal to 10 and so if we want H as a function of X we just divide both sides by 2 x squared and we get H we get H is equal to 10 over 2x squared or we could say that H is equal to 5 over 5 over x squared and then we can substitute back right over here H is equal to 5 over x squared so all of this business is going to be equal to 20 times x squared plus 36 times X times 5 over x squared 5 over x squared so our cost as a function of X our cost of a as a function of X is going to be 20 x squared 36 times 5 let's see 30 times 5 is 150 plus another 30 it's going to be 180 so it's going to be plus 180 times and see x times X to the negative 2 180 X to the negative X to the negative 1 power so we finally have cost as a function of X now we're ready to optimize to optimize we just have to figure out what are the critical points here and whether those critical points are our minimum or maximum values so let's see let's see what we can do so to find a critical point we take the derivative figure out where the derivative is undefined or equal to 0 and that those are our candidate critical points and then from the critical points we find they might be minimum or maximum values so the derivative of C of our cost with respect to X is going to be equal to 40 times X minus 180 times X to the negative 2 power now this seems well it's defined for well it's defined for all X except for X equaling 0 but X equaling 0 is not interesting to us as a critical point because then we're going to have a degenerate this is going to have no base at all so we don't want to worry about that critical point we would have no volume at all so it would not work out and actually if x equals 0 then our height is undefined as well so let's see so this was defined for everything else for anything other than x equals 0 so let's see when this derivative is equal to 0 as for 2 in our search for potential critical points so when does I'll do it over here when does 40 40 X minus 180 X to the negative 2 equals 0 well we could add the 180 X to the negative 2 to both sides we get 40 X is equal to 180 and I could write it as 180 over 180 over x squared now we'll see we could multiply both sides of this equation by x squared and we would get 40 X to the third is equal to is equal to 180 divide both sides by 40 you get X to the third is equal to 180 over 40 which is the same thing as 18 over 4 which is the same thing as 9 over 2 and so if we want to solve for X we get that X is equal to X is equal to the critical point we get at a critical point at X is equal to 9 halves to the one-third power the cube root of 9 halves so let's see let's get an approximate value for what that is so if we take if we take nine-halves 9/2 i guess we could take all that 4.5 and we want to raise it to the 1/3 power to the 1/3 power we get one point six five so it's approximately approximately equal to one point six five as our critical point now the way the problem is asked we're only getting one legitimate critical point here so that's probably going to be the X at which we achieve a minimum a minimum value but let's use our second derivative test just in case just to make sure that we're definitely concave upwards over here in which case that this will definitely be the x value at which we achieve a minimum value so the second derivative I'll do it right over here the second derivative of our cost function is just the derivative of this which is going to be equal to 40 minus 40 minus 180 times negative 2 which is which is negative 360 so it's going to be plus 360 over X to the third X to the third the derivative of this is negative two times negative 180 which is positive 360 X to the negative 3 power which is exactly this right over here so when X is equal to one point six five this is going to be positive this is going to be positive so let me write this down C prime prime of one point six five is definitely greater than zero it's so we're definitely concave upwards when X is one point six five concave upwards which means that our graph is going to look something like this and so where the derivative equal to zero which is right over there we are at a minimum point we are minimizing we are minimizing our cost and so if we go back to the question the only thing that we have to do now we know the x value that minimizes our cost we now have to find the cost of the material for the cheapest container so we just have to figure out we just have to figure out what our cost is and we already know what our cost is as a function of X so we just have to put 1.65 into this equation evaluate the function at one point six five so let's do that we get our cost is going to be equal to twenty times one point six five five I should say approximately equal to because I'm using an approximation of this original value one point six five squared one point six five squared plus 180 plus 180 I could say divided by one point six five that's the same thing as multiplying by one point 6 5 to the negative one so divided by one point six five which is equal to 163 I'll just say one hundred sixty three point five dollars so it's approximately so the cost when let me do this in a new color and we deserve a drum roll now are the cost when X is one point six five is approximately equal to approximately equal to one hundred and sixty three point five four dollars so one hundred sixty 3.5 4.0 one hundred sixty three dollars 54 cents which is quite an expensive box so this is this is kind of expensive this is fairly expensive material here although it's a fairly large box 1.65 meters and width is going to be twice that in and it's going to be twice that in length and then you could figure out what its height is going to be although it's not going to be too tall five divided by one point six five squared I don't know it'll be roughly a little under two meters tall so it actually is a quite a large quite a large box made out of quite expensive material the minimum cost to make this box is going to be one hundred sixty three dollars and fifty four cents