# Thread: Maximize Volume with constraint

1. ## Maximize Volume with constraint

Hello all, I am stuck on a Calc. 3 problem involving maximization. I've got the word problem into equations but I get stuck finding the gradient of the constraint function. We are supposed to be using Lagrange Multipliers to solve.

Problem: The material for constructing the base of an open box costs 1.5 times as much per unit are that of it's sides. For a fixed amount of money C, find the dimensions of the box with the largest volume that can be made.

From that I got:
V(x,y,z) = xyz constrained to: 3xy + 4xz + 4yz = 2C

So $\nabla \$V(x,y,z) = yzi + xzj + yzk

But what is the gradient of the constraining function? Any help is appreciated!

2. Remember when dealing with a constraint function you have to remove the constants and create a new function g(x,y) (basically, the entire left hand side of the equation) that consists of all the variable terms of the function, giving you:

$g(x,y) = 3xy + 4xz + 4yz$

$\nabla g(x,y) = (3y + 4z)\hat{i} + (3x + 4z)\hat{j} + (4x + 4y)\hat{k}$

You know that:

$\nabla f(x,y) = \lambda \nabla g(x,y)$

Which gives you a system of equations:

$f_x = \lambda g_x$
$f_y = \lambda g_y$
$f_z = \lambda g_z$
3xy + 4xz + 4yz = 2C

Solve for lambda first, then get equations in terms of JUST x,y, and z, and solve for each simultaneously (Unless solving for lambda gives you some clue as to the solution of 1 or more variables) and you will get the critical points.

So setting $\nabla f(x,y) = \lambda \nabla g(x,y)$ would look like...

$yz = 7 \lambda$
$xz = 7 \lambda$
$xy = 8 \lambda$

which gives me

$xz=yz \to x=y$ but how to I incorporate z into my system of equations?

4. Originally Posted by CleanSanchez

So setting $\nabla f(x,y) = \lambda \nabla g(x,y)$ would look like...

$yz = 7 \lambda$
$xz = 7 \lambda$
$xy = 8 \lambda$

which gives me

$xz=yz \to x=y$ but how to I incorporate z into my system of equations?
Your system is a little off. You are adding the numbers, but you are not taking the variables into account.

Notice that $g_x = 3y + 4z$

Which means:

$f_x = \lambda g_x$

gives you:

$yz = \lambda (3y + 4z)$

So, doing the same thing for the others, your system of equations becomes:

$yz = \lambda (3y + 4z)$
$xz = \lambda (3x + 4z)$
$xy = \lambda (4x + 4y)$
$3xy + 4xz + 4yz = 2C$

Now, take the first one and solve for lambda:

$\lambda = \frac{yz}{(3y + 4z)}$

This is not a pretty lambda, so try taking the first one and solving for it:

$\lambda = \frac{xz}{(3x + 4z)}$

Now, lets set these equal to each other, since lambda doesn't change:

$\frac{yz}{(3y + 4z)} = \frac{xz}{(3x + 4z)}$

This is a proportion, and you can make this:

$yz(3x + 4z) = xz(3y + 4z)$

Take a z out:

$y(3x + 4z) = x(3y + 4z)$

Now, we distribute on both sides:

$3xy + 4yz = 3xy + 4xz$

We now get that:

$4yz = 4xz$

This simplifies to:

$y = x$, this is the result you got, but using the correct method.

Now, go back to your system of equations and pick one with with just x and y to find an actual lambda, the third one qualifies:

$xy = \lambda (4x + 4y)$

$xy = (8y) \lambda$

$\frac{x}{8} = \lambda$

Now, we find one with x's and z's, the second one qualifies:

$xz = \frac{x}{8} (3x + 4z)$

$z = \frac{(3x + 4z)}{8}$

$z - \frac{1}{2}z = \frac{3}{8}x$

$\frac{1}{2}z = \frac{3}{8}x$

$x = \frac{4}{3}z = y$

This gives you an interesting result:

$3x = 4z = 3y$

Now, we can reorganize the last equation from:

$3xy + 4xz + 4yz = 2C$

to:

$(4z)y + (4z)x + (4z)y = 2C$

We know that x = y, so:

$12yz = 2C$

$6yz = C$

$yz = \frac{C}{6} = xz$

Now, we can go back to the first equation and sub in for yz:

$\frac{C}{6} = \frac{x}{8}(3y + 4z)$

We know that 4z = 3y, so:

$\frac{C}{6} = 6y\frac{x}{8}$

We also know that x = y

$\frac{C}{6} = y^2\frac{3}{4}$

$\frac{2C}{3} = 3y^2$

$\frac{2C}{9} = y^2$

$\frac{\sqrt{2C}}{3} = y = x$

We plug this into the altered equation (6yz = C) and solve for z

$6\left(\frac{\sqrt{2C}}{3}\right)z = C$

$2\sqrt{2C}z = C$

$z = \frac{\sqrt{C}}{2\sqrt{2}} = \frac{\sqrt{2C}}{4}$

So, we have the critical points:

$\left(\frac{\sqrt{2C}}{3}, \frac{\sqrt{2C}}{3}, \frac{\sqrt{2C}}{4}\right)$

and

$\left(-\frac{\sqrt{2C}}{3}, -\frac{\sqrt{2C}}{3}, -\frac{\sqrt{2C}}{4}\right)$

Because of the radicals, and if x is positive, then y and z must be positive, and if x is negative, then y and z must be negative, so any other mixture of signs doesn't follow the equations. But notice, these two points will yield the same result, so by default, it is the maximum.

I'm hoping these are right, if they're not, I missed something within all the algebra and you'll probably be able to figure it out on your own. Good luck.

5. Thanks so much, you're a life saver! I'm pretty sure this is the hardest problem my professor will assign because the system was much more difficult than any of the other examples. Thanks again, this website seems like an excellent resource!

6. It's no problem. And that is a difficult example, I have no idea why a teacher would put people through that without even giving the some kind of head start.