# Optimization of a rectangular box with no top

1. Mar 2, 2009

### Derill03

I am told in the problem that i am to minimize the amount of cardboard needed to make a rectangular box with no top have a volume of 256 in^3? I am to give dimensions of box and amount of cardboard needed.

Can anyone help

2. Mar 2, 2009

### rosh300

let x, y, z be sides of the box. try to maximise the volume first to find the relations between x, y, z

3. Mar 2, 2009

### Staff: Mentor

The OP doesn't need to maximize the volume--it's given as 256 cu. in. Also, I would use l, w, and h as variables, instead of x, y, and z.

Derrill03,
Is your description of the problem exactly as you were given it? The way you wrote it, the area function will be in two variables.

4. Mar 2, 2009

### csprof2000

Let x, y, z be the dimensions of the box.

Then:

V = xyz = 256.
A = xy + 2xz + 2yz (is the function you want to minimize).

Set up a system of equations and solve using calculus. You will need to use the second derivative test with partial derivatives for this.

Answer (to check yourself against):

=> x = 8.
=> y = 8.
=> z = 4.

5. Mar 2, 2009

### Derill03

can you help me find the function i need to apply partials and derivative test too, that is my trouble with this problem?

6. Mar 2, 2009

### csprof2000

It's the "A" function. Typically, when you want to minimize the material to make a thinly-walled box, you are interested in the surface area.

So A = xy + 2xz + 2yz is the function that needs minimizing.

We know that x = 256/yz. So

A = 256/z + 256/y + 2yz

Take the partials with respect to y, z, and set equal to zero. Solve. Yields critical point.

7. Mar 2, 2009

### Derill03

I keep getting A= 256/z + 512/y + 2yz because the 2xz term multiplies the 256*2? Is this correct or how did you get 256/y?

8. Mar 2, 2009

### HallsofIvy

Staff Emeritus
You can also use the "Lagrange multiplier" method. In order to minimize f(x,y,z), while subject to the condition g(x,y,z)= constant, then the gradients must be in the same direction- $\nabla f[\itex] must be a multiple of [itex]\nabla g$ or $\nabla f= \lambda\nabla g$ ($\lambda$ is the "Lagrange multiplier")- so you differentiate both functions.

Here, f(x,y,z)= 2xy+ 2yz+ 2xz and g(x,y,z)= xyz= 256. $\nabla f= (2y+ 2z)\vec{i}+ (2x+2z)\vec{j}+ (2y+ 2x)\vec{k}$ and $\nabla g= yz\vec{i}+ xz\vec{j}+ xy\vec{k}$ so $2y+ 2z= \lambda yz$, $2x+ 2z= \lambda xz$, $2y+ 2x= \lambda xy$. Since we don't really need to determine $\lambda$ one method I like to solve equations like these is to divide one equation by another:
$$\frac{2y+ 2z}{2x+ 2z}= \frac{y}{x}$$
and
$$\frac{2x+ 2y}{2y+ 2x}= \frac{x}{z}$$

Those can be written as $y^2+ zy= xy+ yz$ or y= x and $xz+ yz= xy+ x^2$ or z= x. That is, x= y= z (which is reasonable from symmetry considerations). Putting x= y= z into xyz= 256, we have x3= 256= 28= 43(4) so $x= y= z= 4\sqrt[4]{4}$.

9. Mar 2, 2009

### csprof2000

Derill03: you're right, it should be 512 and not 256.

10. Mar 2, 2009

### csprof2000

HallsOfIvy: You're wrong, just because you didn't read the question carefully enough. It's a box with no top; your f(x) is wrong.

11. Mar 2, 2009

### csprof2000

Derill03:

I actually worked this out without doing a line of math, and I think you hearing it is good for you.

You probably already know that a cube has the lowest A/V ratio of any parallelpiped (box).

You're looking for what is essentially a parallelpiped sliced in half which, were it whole, would have area 512. The best one for you is an 8x8x8 cube.

Cut it in half, and you have an 8x8x4 shape with exactly the characteristics you wanted. If the cube was the best parallelpiped, the half-cube will be the best half-parallelpiped.