WEBVTT

00:00:02.000 --> 00:00:11.301
Topic 14. Optimization- Minimizing Cost and Inventory Control. We turn our attention here now to 

00:00:11.303 --> 00:00:20.500
two optimization problems where we deal with construction costs and also with inventory control. 

00:00:20.502 --> 00:00:29.900
We need to take a look at a model of each one and then an example. We'll start with cost. The cost function 

00:00:29.902 --> 00:00:39.800
represents the total cost of enclosing a geometric figure. It could be a circle. It could be a rectangle.

00:00:39.802 --> 00:00:47.101
Our example is going to be a rectangle. We have to represent all the quantities in terms of one quantity,

00:00:47.103 --> 00:00:54.600
which we will use as x, our independent variable. This is an example of what a cost function could look like.

00:00:54.602 --> 00:01:01.301
We'll get into the example more, and you will see why it looks like it does, but you can see here that 

00:01:01.303 --> 00:01:07.000
x is going to represent one of the quantities. If this is a rectangle, this would be the width, and then 

00:01:07.002 --> 00:01:15.201
5,000 divided by x is going to be the length. So let's take a look. A lady wants to build a flower garden

00:01:15.203 --> 00:01:23.100
surrounded by a fence along part of her driveway. So here are the flowers. Kind of get in the mood here.

00:01:23.102 --> 00:01:30.700
You're thinking she wants to grow flowers. Ok, she wants the garden to be 5,000 square feet. So what we

00:01:30.702 --> 00:01:40.800
have here is a fixed area. She wants an attractive picket fence along the driveway side, and then she 

00:01:40.802 --> 00:01:47.798
wants chain link around the rest of it. Now before we go any further, why would anybody want that? Well,

00:01:47.800 --> 00:01:54.700
because building chain link fence is a lot cheaper than a picket fence. So there's a cost involved here.

00:01:54.702 --> 00:02:02.300
And before we go to the next one let's remember that she wants it to be 5,000 square feet. So this is 

00:02:02.302 --> 00:02:09.401
an idea of a visual. This is a picture of what we have in mind. The picket fence is 6 dollars a foot, 

00:02:09.403 --> 00:02:16.901
and the chain link fence is 2 dollars a foot. The question is find the dimensions that will minimize the

00:02:16.903 --> 00:02:25.600
cost and then find the minimum cost. Alright, let's start with some type of picture of how this would

00:02:25.602 --> 00:02:37.798
be laid out. Ok so imagine here is maybe her driveway. So here's the street, and this is the driveway.

00:02:37.800 --> 00:02:45.101
She wants to build this enclosure along part of the driveway, and she wants the side next to the 

00:02:45.103 --> 00:02:55.301
driveway to be the pretty side, so that's the picket part, and then she's going to use chain link for the 

00:02:55.303 --> 00:03:01.100
rest of it. Now we don't know what the scale is here, so I'm just going to draw something that looks like

00:03:01.102 --> 00:03:18.100
a rectangle. We want this area to be, this area right here, to be 5,000 square feet, and what we 

00:03:18.102 --> 00:03:26.801
want to do is minimize cost. We follow the pattern we've followed all along. We've identified what we

00:03:26.803 --> 00:03:36.997
want to do here. Now we identify the variable x. There is no real reason why this side has to be x or 

00:03:36.999 --> 00:03:45.401
this side has to be x. Generally though, it is more efficient if you make the side that is different 

00:03:45.403 --> 00:03:53.300
have the simpler variable. So I'm going to call this side x. So that's x feet, the length of this side. 

00:03:53.302 --> 00:04:11.500
Of course that forces this side to also be x. So x is the length of the picket fence side, and our 

00:04:11.502 --> 00:04:17.900
diagram here shows it's also the length of the side parallel to the picket fence. Now we have to figure out

00:04:17.902 --> 00:04:29.001
a way to represent these two sides in terms of x. The only quantity we have is area, and if you remember,

00:04:29.003 --> 00:04:40.700
the area of a rectangle is length times width. So it's going to be x times what we represent this as.

00:04:40.702 --> 00:04:51.100
Let's back up here, and let's put A of x because we want... well, let's back up here first of all and say

00:04:51.102 --> 00:05:08.000
the area is 5,000, and the area is length times width. We've used x in place of the width, so we have

00:05:08.002 --> 00:05:17.600
this relationship, and I'm going to solve now for length, and I'm going to get 5,000 divided by x. 

00:05:17.602 --> 00:05:22.902
This is a standard situation that will come up in a problem like this where you have a fixed area.

00:05:22.904 --> 00:05:36.900
So we actually label this side right here as 5,000 divided by x. Let's check it. If this side is

00:05:36.902 --> 00:05:45.000
5,000 divided by x times x, what is the product? Well 5,000 divided by x, times x, the x cancels and 

00:05:45.002 --> 00:05:52.701
we get 5,000, which is exactly what we want for the area. So we know how to label this side here. 

00:05:52.703 --> 00:06:04.500
I'm going to rewrite it up here, just for space. That's going to be 5,000 divided by x. Now I can remove

00:06:04.502 --> 00:06:18.301
this part of the work. We want to create a model. The model is to minimize cost. So what's the cost? 

00:06:18.303 --> 00:06:33.300
This side has a cost of 6 dollars. The other three have a cost of 2 dollars. So the cost as a function of x

00:06:33.302 --> 00:06:46.201
is 6 dollars times that x side plus, how much is this side? Chain link, so it's 2 dollars. This is dollars.

00:06:46.203 --> 00:06:59.798
That's feet. Dollars, feet. And then we have the length of this side which is 5,000 divided by x. We want

00:06:59.780 --> 00:07:08.500
to add the cost of this. It's 2 dollars a foot, and then there are two of them. So that would be 2 times

00:07:08.502 --> 00:07:17.600
2 times this quantity. Alright, let's check the model. 6 dollars times this number of feet, 2 dollars 

00:07:17.602 --> 00:07:27.601
times this number of feet, and then two sides that are 2 dollars times that length. Let's clean up 

00:07:27.603 --> 00:07:45.300
this cost function. So we get 8x plus 4 times 5, and then so that's 20 thousand over x. You can see right away

00:07:45.302 --> 00:07:50.101
that taking the derivative of this is going to be a little different than the ones we did before.

00:07:50.103 --> 00:07:55.993
All of the ones before this were maximizing profit or revenue or yield, and this one is going to be very 

00:07:55.995 --> 00:08:03.000
different because we've got the x in the denominator. Ok, here we go. Model. Where is it defined? 

00:08:03.002 --> 00:08:10.399
Well, it is clear that x cannot be 0 because then we'd have a denominator 0. So we're going to make this

00:08:10.401 --> 00:08:22.202
an open interval on this end. Now, how long can, if this side has to be anything greater than 0, how long can 

00:08:22.204 --> 00:08:28.300
this side be? Well your first thought is well it can't be more than 5,000, but if you actually look at this,

00:08:28.302 --> 00:08:36.504
theoretically, if this side was like .0001 feet, then this side could be really long. So there's really

00:08:36.506 --> 00:08:43.902
no limit to what this side can actually be. So we end up with an open interval here that means positive reals.

00:08:43.904 --> 00:08:54.104
Alright. We have our model. Let's take the derivative. The derivative of 8x is 8. The derivative of this

00:08:54.106 --> 00:09:02.003
term, this is 20,000. This would be, I could write this as x to the negative 1. So that would be

00:09:02.005 --> 00:09:22.804
minus 20,000 x to the negative 2. So that is 8 minus 20,000 over x squared, and we want to set this equal to 0 

00:09:22.806 --> 00:09:37.603
and solve for x. Let's see. Let's then have 8 equals 20,000 over x squared. We multiply both sides by 

00:09:37.605 --> 00:09:48.003
x squared. Ok, so wait. This is 20,000 divided by x squared. We multiply both sides by x squared,

00:09:48.005 --> 00:09:58.604
divide both sides by 8, and take the square root of both sides. Now we get x is what? 

00:09:58.606 --> 00:10:06.500
Plus or minus 50. I mean that's algebraically what we get. Now what you have to realize is that the 

00:10:06.502 --> 00:10:12.602
negative 50 of course is not in this interval, so we throw that out, and we have one critical value 

00:10:12.604 --> 00:10:20.601
in the interval, and it's 50. Now we have to check the second derivative to make sure that we have 

00:10:20.603 --> 00:10:28.000
minimized cost. I mean the last thing you want to do is maximize cost. So we're going to have to go back

00:10:28.002 --> 00:10:34.201
here and take the function. Now let's be smart. Where would you like to take the derivative?

00:10:34.203 --> 00:10:39.299
Would you like to take the derivative of this version or this one? Well obviously this looks like the one

00:10:39.301 --> 00:10:55.102
you want to take the derivative of. So we're going to remove this part, and we check the second derivative.

00:10:55.104 --> 00:11:11.399
The second derivative would be 0, and then plus 40,000 x to the negative 3. Alright, in terms of something

00:11:11.401 --> 00:11:20.903
we can work with, this would be 40,000 over x cubed. We're going to substitute 50 into here. Now remember

00:11:20.905 --> 00:11:27.201
we don't want the actual value. We simply want to know if it's positive or negative. Positive is concave up.

00:11:27.203 --> 00:11:33.204
Negative is going to be concave down. So when you put 50 into this function you're going to find that 

00:11:33.206 --> 00:11:45.202
C double prime of 50 is 40,000 over 50 cubed which is a positive number. So let's just put that this is 

00:11:45.202 --> 00:11:55.498
greater than 0. Therefore, the function is concave up, and right there we have found a min. 

00:11:55.500 --> 00:12:02.602
So we did indeed minimize cost. Now we go to the questions. Find the dimensions that will minimize the cost,

00:12:02.604 --> 00:12:11.901
and find the minimum cost. Well, I still think I'm going to need to do a little more work here. 

00:12:11.903 --> 00:12:26.103
So let's see. I've got the critical value, which was 50. So that means that I want this side to be 50.

00:12:26.105 --> 00:12:41.200
So let's find the dimensions. That's going to be 50 feet on the picket side. Just write a little note here, 

00:12:41.202 --> 00:12:53.999
and so if this one is 50, then the other side is 5,000 divided by 50, which is 100. So it's going to be

00:12:54.001 --> 00:13:04.203
50 feet by 100 feet. Alright, so we're good on the dimensions. That's what our flower garden should be. 

00:13:04.205 --> 00:13:11.599
Picket fence on the 50 foot side. Check it. 50 times 100 is 5,000 square feet, so we're good on the area.

00:13:11.601 --> 00:13:21.003
Next we want the actual minimum cost. We need to go back and pull up our cost function again. So we had

00:13:21.005 --> 00:13:47.099
our cost function was 8x plus 20,000 over x, and with x as 50, we'd have 8 times 50 plus 20,000 over 50. 

00:13:47.101 --> 00:13:55.401
Again you can use a calculator for this or these numbers are so friendly. 8 times 50 would be 400, and 

00:13:55.403 --> 00:14:04.202
this number would be 5 into 2,000 which would be another 400. And so what is it going to cost the lady

00:14:04.204 --> 00:14:12.001
to build her pretty fence and her flower garden? 800 dollars, and that is the minimum cost. 

00:14:12.003 --> 00:14:19.599
So you see we can apply the techniques of optimization to construction or even just home cost. 

00:14:19.601 --> 00:14:28.599
Now let's look at another example where we apply this to inventory control. 

00:14:28.601 --> 00:14:37.799
Let's look at the model for inventory control. When you're trying to control inventory, you have to think

00:14:37.801 --> 00:14:46.800
of two things. The cost function is going to be, yes, it's as always the cost of purchasing the product.

00:14:46.802 --> 00:14:54.097
In this case the example we're going to do is bags of rice. So sure you have to buy the rice. That's called

00:14:54.099 --> 00:15:00.499
the item cost, but you also have to store the rice, and that's expensive too. So you're going to have to

00:15:00.501 --> 00:15:10.000
consider two parts to this cost function. Here's an example of what a typical inventory control cost function

00:15:10.002 --> 00:15:17.099
would look like. You can see that it has lots of complex pieces. The overview here would be that this is

00:15:17.101 --> 00:15:25.900
the cost of the items and this is the cost of the storage. Now I'll stop right here, and explain to you 

00:15:25.902 --> 00:15:35.500
why this is x over 2. Think of something like this. Try to imagine you order bags of rice. Let's say you

00:15:35.502 --> 00:15:43.099
order 200 at a time. They come into the store, and you have 200. You have to store them. At the end of the

00:15:43.101 --> 00:15:52.600
time that all 200 of those are sold, you had anywhere from 200 down to 0 in inventory. So over that time

00:15:52.602 --> 00:16:02.900
period the average would be 200 plus 0, divided by 2. So, in a model, of course that's theoretical. 

00:16:02.902 --> 00:16:11.300
We realize it doesn't always go in perfect continuous motion. But we use the x over 2 as the average 

00:16:11.302 --> 00:16:19.599
number of items in inventory at any time. So that takes care of this part. x is going to be the number

00:16:19.601 --> 00:16:28.900
of items in each order. This would be an example where we have say 5,000 bags for the year, and that represents

00:16:28.902 --> 00:16:40.099
the number of orders. Let's go to the example. A grocery store expects to sell 5,000 bags of rice this year.

00:16:40.501 --> 00:16:44.700
Should they just order all 5,000 bags in the beginning? Well, I don't know. We want to see what's going to

00:16:44.702 --> 00:16:50.901
minimize their cost. It costs 2 dollars to get the bag of rice, to buy it, and then there's a delivery 

00:16:50.903 --> 00:17:00.000
charge of 50 dollars per order. Ok, now that's the item cost. It costs 2 dollars to store a bag for a year.

00:17:00.002 --> 00:17:08.200
So the question is, what should be the order size and how many times a year should the orders be placed

00:17:08.202 --> 00:17:23.099
to minimize cost? Alright, let's set up a model. This is example two. We want to minimize cost. 

00:17:23.101 --> 00:17:32.198
We identify x. Now when you start to set this up you might think well x could be the number of orders 

00:17:32.200 --> 00:17:40.599
or x could be the number of bags per order. It's much more efficient to let x be the number of bags 

00:17:40.601 --> 00:17:57.899
of whatever items you're storing, so number of bags per order. This is called the order size.

00:17:57.901 --> 00:18:04.910
Now, if we're going to get 5,000 bags over the whole year, can you figure out how we would represent the

00:18:04.912 --> 00:18:12.710
number of orders? Well it would be the total number of bags divided by the number of bags in each order.

00:18:12.712 --> 00:18:17.810
Now that's a mouthful of the same words over and over again, but what it turns out is that the total 

00:18:17.812 --> 00:18:27.910
for the year divided by the number of bags per order, and that gives you the number of orders. 

00:18:27.912 --> 00:18:41.811
Alright, let's model cost. The cost will be the item cost plus the inventory cost. Ok, item cost.

00:18:41.813 --> 00:18:54.809
Every time you order rice you pay 2 dollars times the number of bags in the order, plus some kind of 

00:18:54.811 --> 00:19:10.010
delivery charge, 50 dollars. That's the number of bags you order times 2 dollars plus 50.

00:19:10.012 --> 00:19:17.512
Now this is going to be multiplied, or this is going to like happen, every time you place an order. 

00:19:17.514 --> 00:19:28.108
So this is the cost per order, not the cost per bag, but the cost per order, and so you would multiply that 

00:19:28.110 --> 00:19:41.410
by the number of orders, which is 5,000 divided by x. Fine, we got the rice. What do we do with it? 

00:19:41.412 --> 00:19:49.208
We also have to pay to store it, so let's look. It costs 2 dollars to store the bag for a year. 

00:19:49.210 --> 00:19:57.710
It costs 2 dollars to store a bag. That's great. How many bags are we storing? Well we're storing 

00:19:57.712 --> 00:20:05.911
however many bags are in inventory over the space of the whole year. We talked about this earlier. 

00:20:05.913 --> 00:20:12.010
In these problems we will always put here x over 2. And of course I think you can probably see,

00:20:12.012 --> 00:20:17.512
this is where most of the errors come from. It's tempting here to want to put x, or maybe 5,000 over x, 

00:20:17.514 --> 00:20:33.111
or some combination. This is 2 dollars, and then this is the average number of bags in inventory at any one time.

00:20:33.113 --> 00:20:39.812
One more time, why does that work? It works because we're ordering x bags at a time. Remember the example.

00:20:39.814 --> 00:20:46.709
I had 200 come in. We stored them. At the end of the time when they're sold we have 200 down to 0. The average

00:20:46.711 --> 00:20:55.612
of that would be 200 plus 0, divided by 2. Ok, we have a model. Do we have a restriction here on the domain?

00:20:55.614 --> 00:21:06.909
x cannot be 0. It would make the denominator 0. What is the total number of bags for the year? 

00:21:06.911 --> 00:21:15.109
5,000. So we can't possibly have the number of bags per order be more than 5,000. We could order them all

00:21:15.111 --> 00:21:23.711
at once. So we're going to have this end a closed end. Open here and closed here. We have to order something, 

00:21:23.713 --> 00:21:30.105
otherwise we'd have a 0 denominator here, but we could order all 5,000. So that's our domain. 

00:21:30.107 --> 00:21:37.711
When we get a critical value it has to be in the domain. Let's see what we have. The cost function, now 

00:21:37.713 --> 00:21:48.400
carefully when you multiply this. 2x times 5,000 over x, the x's cancel, so we have 2 times 5,000. We have the

00:21:48.402 --> 00:21:58.608
constant 10,000. On this term, we still have the x in the denominator. So we're going to have 5 times 5

00:21:58.610 --> 00:22:13.811
is 25 and then four zeroes. Ok, that takes care of the item cost, and then here we get x. Alright, there's the model.

00:22:13.813 --> 00:22:23.010
Let's minimize. The derivative would be, the derivative of 10,000 is 0. The derivative of this term,

00:22:23.012 --> 00:22:37.510
think of it as x to the negative 1. The derivative would be negative 250,000 x to the negative 2.

00:22:37.512 --> 00:22:46.708
Don't lose this. I've seen this happen a lot. The derivative here is 1. We set this equal to 0, and we 

00:22:46.710 --> 00:23:01.615
solve for x. We have negative 250,000 all over x squared is negative 1. Negative on both sides, we can 

00:23:01.617 --> 00:23:12.810
do that. Then we have 250,000 is x squared. On these problems it's kind of nice when you get to this point

00:23:12.812 --> 00:23:18.105
and you realize this number is a perfect square you probably think you did it right. In real life, it

00:23:18.107 --> 00:23:25.711
probably wouldn't be that way. You take the square root of both sides. You get x is plus or minus 500,

00:23:25.713 --> 00:23:35.407
but of course the negative is not in our domain, so we exclude that, and so we get our critical value of 

00:23:35.409 --> 00:23:45.608
500, and it is in the domain. Did we minimize or maximize the cost? So we go back here, and we're going to 

00:23:45.610 --> 00:23:57.211
use this little version of the derivative, and we'll take the second derivative. C double prime of x is

00:23:57.213 --> 00:24:10.205
positive 2 times 250 is 500 thousand x to the negative 3. This derivative looks very similar to the one

00:24:10.207 --> 00:24:23.208
we had in example one. So we have 500,000 over x cubed. C double prime at 500 would be a positive number 

00:24:23.210 --> 00:24:29.010
over a positive number cubed, so rather than calculate it, we just say it's greater than 0. That means the 

00:24:29.012 --> 00:24:42.010
function is concave up which means we have a min. Very good. Now we need to go back and answer the questions.

00:24:42.012 --> 00:24:49.911
So we've minimized inventory cost. What do we need to do? What should be the order size? Ok, which one 

00:24:49.913 --> 00:25:04.700
of these is order size? x. So the order size, our critical value is 500. So 500 bags is the order size.

00:25:04.702 --> 00:25:10.506
How many times a year should the orders be placed? Number of orders per year, so that would be 

00:25:10.508 --> 00:25:28.510
5,000 over 500. We just about have it. That would be 10 orders per year. 10 orders a year. 500 bags per order.

00:25:28.512 --> 00:25:36.205
That's 5,000 bags a year, and we have minimized the cost. 

00:25:36.211 --> 00:25:43.111
All of the examples in this topic and the two topics before this give you just a small sense of the 

00:25:43.113 --> 00:25:51.708
power you have once you know how to use the derivative to help you optimize. The next thing we do is

00:25:51.710 --> 00:25:58.330
we move on to other classes of functions and other applications that go with them. 
 















