Main content

### Course: Calculus, all content (2017 edition) > Unit 3

Lesson 14: Optimization- Optimization: sum of squares
- Optimization: box volume (Part 1)
- Optimization: box volume (Part 2)
- Optimization: profit
- Optimization: cost of materials
- Optimization: area of triangle & square (Part 1)
- Optimization: area of triangle & square (Part 2)
- Optimization problem: extreme normaline to y=x²
- Optimization

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Optimization: box volume (Part 1)

If you are making a box out of a flat piece of cardboard, how do you maximize the volume of that box? Created by Sal Khan.

## Want to join the conversation?

- How to approach the optimization questions in calculus ? Each question seems to be very different in its approach . Can someone please summarise the steps I have to do in it .(62 votes)
- A quick guide for optimization, may not work for all problems but should get you through most:

1) Find the equation, say f(x), in terms of one variable, say x.

2) Find the derivative of that function.

3) Find the critical points of the derivative where f'(x)=0 or is undefined

4) Test those points with the second derivative to determine how they look on a curve, whether it is concave up or down, and whether the point would then be a minimum or maximum.

That point, x, will be the optimized (min or max) value for x in your initial equation, and from there you can determine how to give the answer based on what's asked of you.

I hope this helps a bit! c:(252 votes)

- why x is greater or EQUAL to zero? if we assume x is zero then the whole volume would become zero right? is that possible?(22 votes)
- It is possible to have 0 volume. In mathematics, a plane is a flat, two-dimensional surface. A plane is the two dimensional analogue of a point (zero-dimensions), a line (one-dimension) and a solid (three-dimensions).(32 votes)

- Why doesn't Sal use 30-2x in his range 0<x<10? Why does he only use x and 20-2x?(14 votes)
- This is because if we solve 30-2x is greater than or equal to x, then we get x is less than or equal to 15. But since x has to be less than or equal to 10 to make the (20-2x) dimension positive, it overrules the condition from the 30-2x. This makes sense in cases where you may have an x value greater than 10 but less than 15, such as 13, which would make the (30-2x) dimension positive, but it would make the (20-2x) dimension negative. Therefore, (x is less than or equal to 10) rules out the condition of x being less than or equal to 15 in order to keep the (30-2x) and (20-2x) dimensions positive, preventing a negative volume.(38 votes)

- At4:27: 30 - 2x is the width, isn't it?(2 votes)
- The width is 20 - 2x, the depth is 30 - 2x. But it doesn't really matter in this case, because if you turned the box 90 degrees, the depth would become 20 - 2x and the width would become 30 - 2x.(19 votes)

- At4:47, how can x be equal to zero ?(6 votes)
- At this point, Sal is merely eliminating as impossible the case where x is negative, so he states that x ≥ 0. A minute or so later in the video he points out that x = 0 is also impossible, and eliminates that case.(10 votes)

- Wouldn't the volume simply get larger the smaller x is?(5 votes)
- If x was really small, like 1/1000 of an inch, you would only be folding the edges of the box up 1/1000 of an inch. So you'd get a very wide, shallow box. The area of the bottom would be very close to 600, but then we multiply that by the height of 1/1000 to get a volume of 0.6 cubic inches.

So for very large x and very small x, we get very small volumes.(9 votes)

- But wouldn't larger X values simply make the function x(20-2x)(30-2x) larger? 500(20-1000)(30-1000)= 475300000.(2 votes)
- That's true, but in this case, we have a domain to x- we don't have 500 units of space to fold on our sheet of cardboard.(5 votes)

- How were we able to determine 0 <= x =< 10. More specifically, how was 10 determined?(1 vote)
- We're cutting x*x squares out of each corner, so x can't possibly be more than half of the width of the piece of cardboard, which is 20.(6 votes)

- shouldn't 0 < x < 10?

what is the the point of have 0 < and = x < and = 10?(2 votes)- When you are trying to maximize or minimize a function, it is nice to have a closed interval like 0<=x<=10 for your domain rather than an open one like 0<x<10, because a function takes on its extreme values EITHER at critical points OR MAYBE
**at the endpoints**. But if you choose an open interval, you would have the awkward situation where the endpoints (in this case 0 and 10) are**not actually in the domain**! In this example, you are trying to**maximize**the volume of the box (naturally), and the endpoints are the silly (or "trivial" or "degenerate") cases where you either cut nothing (x = 0) or cut everything (x=10), so that the "box" has**zero**volume. But if, for some crazy reason (like a math teacher giving you a trick question :) ) you wanted to know the**minimum**possible volume, you would want to be able to give the answer 0. But you are only allowed to give the answer 0 if the endpoints are included in your domain.(4 votes)

- How would I go about solving this circle optimization problem? Really need help! My final assignment for college calculus is due this afternoon and includes this problem. Any help or hints at all would be appreciated! Thanks so much. "A sector of a circle has angle theta. Find the value of theta, in radians, for which the ratio of the sector's area to the perimeter (the arc along the circle and the two radial edges) is maximized. Express your answer as a number between 0 and 2pi.(2 votes)
- Just working it in my mind, I'd gather up the formulas for perimeter and area of a sector. Stick these in a ratio (area/perimeter) and take the derivative with respect to theta. Once you've got your derivative, set that function equal to zero and solve for that theta(2 votes)

## Video transcript

Let's say that we have
a sheet of cardboard that is 20 inches by 30 inches. Let me draw the cardboard
as neatly as I can. So it might look
something like that. So that is my
sheet of cardboard. And just to make sure
we know the dimensions, there's 20 inches by 30 inches. And what we're
going to do is cut out the corners
of this cardboard. And all the corners are
going to be squares, and we're going to cut
out an x by x corner from each of the corners of this
piece of cardboard-- x by x. Over here, x by x, and
then over here, x by x. And what we'll do is after
we cut out those corners, we can essentially
fold down the flaps. Let me draw the flap. So you could imagine we
can fold right there, we could fold right there,
we could fold right there, and we would form a box. I guess you could imagine a
box without a bottom to it, or you can view a box
without a top to it. So if we were to
fold everything up, we would get a container that
looks something like this. Let me make my best
attempt to draw it. So it would look like this. This is one flap folded up. You can imagine this
flap right over here, if I were to fold
it up like that, it now would look like this. It would now look like this. The height of the flap is x. So this distance
right over here is x. And then if I were to fold
this flap, if I were-- let me do that a little bit neater. If I were to fold this
flap right over here, if I were to fold that up,
then it would look like this. Let me make my best
attempt to draw it. It would look like that. And then I would fold
that back flap up. So the back flap would
look something like that. That would be the back flap. It would look
something like that. And then this flap
over here would-- if I fold it up would
look something like that. And then of course, my
base of my whole thing, so this whole region right over
here of my piece of cardboard, would be the floor of this
box that I'm constructing. And what I want to do
is I want to maximize the volume of this box. I want to maximize
how much it can hold. And I want to maximize it by
picking my x appropriately. So let's think about what
the volume of this box is as a function of x. Well, in order to
do that, we have to figure out all the dimensions
of this box as a function of x. We already know that this
corner right over here, which is made up of when
this side and this side connect when you fold
these two flaps up, that's going to be the
same height over there. That's going to be the
same height over there. The height of this
box is going to be x. But what's the width? What is the width of
this box going to be? Well, the width of
the box is going to be this distance
right over here. And this distance is going
to be 20 inches minus not 1x, but minus 2 x's. So this is going
to be 20 minus 2x. You see it right over here. This whole distance is 20. You subtract this x,
you subtract this x, and you get this
distance right over here. So it's 20 minus 2x. Now, the same logic, what
is the depth of the box? What is that distance
right over there? Well, that distance is this
distance right over here. We know that this entire
distance is 30 inches. If we subtract out this x
and we subtract out this x, we get the distance
that we care about. So this is going
to be 30 minus 2x. So now we have all
of the dimensions. So what would the volume
be as a function of x? Well, the volume
as a function of x is going to be equal
to the height, which is x, times the width, which
is 20 minus x-- sorry, 20 minus 2x times the depth,
which is 30 minus 2x. Now, what are possible values of
x that give us a valid volume? Well, x can't be less than 0. You can't make a
negative cut here. Somehow we would have to add
cardboard or something there. So we know that x is going to
be greater than or equal to 0. So let me write this down. x is going to be greater
than or equal to 0. And what does it
have to be less than? Well, I can cut at
most-- we can see here the length right over here, this
pink color, this mauve color, is 20 minus 2x. So this has got to
be greater than 0. This is always going to be
shorter than the 30 minus 2x, but the 20 minus 2x has to be
greater than or equal to 0. You can't cut more
cardboard than there is. Or you could say that 20 has to
be greater than or equal to 2x, or you could say
that 10 is going to be greater than
or equal to x, which is another way of saying that
x is going to be less than or equal to 10. That's a different
shade of yellow. x is going to be less
than or equal to 10. So x has got to be
between 0 and 10. Otherwise we've cut too
much, or we're somehow adding cardboard or something. So first let's think about
the volume at the endpoints of our-- essentially of
our domain, of what x can be for our volume. Well, our volume when x is
equal to 0 is equal to what? We can have 0 times
all of this stuff. And it's pretty obvious. You're not going to
have any height here. So you're not going
to have any volume, so our volume would be 0. What is our volume
when x is equal to 10? Well, if x equaled 10,
then the width here that I've drawn in
pink would be 0. So once again, we
would have no volume. And this term right over
here, if we just look at it algebraically would
also be, equal to 0, so this whole thing
would be equal to 0. So someplace in between
x equals 0 and x equals 10 we should achieve
our maximum volume. And before we do it analytically
with a bit of calculus, let's do it graphically. So I'll get my handy TI-85 out. So let me get my TI-85 out. And so first let me set
my range appropriately before I attempt to graph it. So I'll put my graph function. Let me set my range. So my minimum x-value,
let me make that 0. We know that x cannot
be less than 0. My maximum x-value, well,
10 seems pretty good. My minimum y-value,
this is essentially going to be my volume. I'm not going to
have negative volume, so let me set that equal 0. And my maximum
y-value, let's see what would be reasonable here. I'm just going to
pick some a random x and see what type
of a volume I get. So if x were to be 5, it
would be 5 times 20 minus 10, which is 10. So that would be--
did I do that right? Yeah, 20 minus 2
times 5, so that would be 10, and then times
30 minus 2 times 5, which would be 20. So it would be 5
times 10 times 20. So you'd get a volume
of 1,000 cubic inches. And I just randomly
picked the number 5. So let me give my maximum
y-value a little higher than that just in case to
that isn't the maximum value. I just randomly picked that. So let's say yMax is 1,500,
and if for whatever reason our graph doesn't
fit in there, then maybe we can make
our yMax even larger. So I think this is going
to be a decent range. Now let's actually input
the function itself. So our volume is
equal to x times 20 minus 2x minus 2x
times 30 minus 2x. And that looks about right. So now I think we can graph it. So 2nd, and I want to
select that up there, so I'll do Graph. And it looks like we
did get the right range. So this tells us volume is a
function of x between x is 0 and x is 10, and it does look
like we hit a maximum point right around there. So what I'm going
to do is I'm going to use the Trace function
to figure out roughly what that maximum point is. So let me trace this function. So I can still go
higher, higher. OK. So over there my
volume is 1,055.5. Then I can get to 1,056. So let's see, this was
1,056.20, this is 1,056.24, then I go back to 1,055. So at least based
on the level of zoom that I have my
calculator right now, this is a pretty
good approximation for the maximum value that my
function actually takes on. So it looks like my maximum
value is around 1,056, and it happens at
around x equals 3.89. So it looks like
my volume at 3.89 is approximately equal
to 1,056 cubic inches. Or you could say that
we hit a maximum when x is approximately
equal to 3.89. So far, we've just set up
our maximization problem, and we've looked
at it graphically. In the next video, we'll
try to solve it analytically using some of our
calculus tools.