# Method to find the extremal values of $xyz$ subject to $x^2+2y^2+3z^2=a$

This question has been asked before but I want to lay out my method and get feedback on reasoning and process this took me a long to put together as I am new to the formatting:

Let the function $f$ be defined as $f$($x$,$y$,$z$) $=$ $x$$y$$z$

find the maximum and minimum values subject to the constraint: $g$($x$,$y$,$z$) $=$ $x^2$+2$y^2$+3$z^2$

Equation 1 $=$ $\nabla$$f_x = \lambda \nabla$$g_x$ $=$ [ $yz$ $=$ $\lambda$2$x$]

Equation 2 $=$ $\nabla$$f_y = \lambda \nabla$$g_y$ $=$ [ $xz$ $=$ $\lambda$4$y$]

Equation 3 $=$ $\nabla$$f_z = \lambda \nabla$$g_z$ $=$ [ $yx$ $=$ $\lambda$6$z$]

It is my understanding that to solve these equations really just amounts to solving the relationship between values $x,y,z$ (and then plug into constraint) or the values themselves if there is an easy way to do so.

My basic instinct was to solve Equation 1 for $x$, obtaining: $x$ $=$ $\frac{yz}{2\lambda}$

Since Equation 3 consists of $x,y,z$ and I have x in terms of $y$ and $z$, then plugging $x$ into Equation 3 would get me the relationship of $y$ to $z$, giving me:

$\frac{yz}{2\lambda}$$\frac{y}{1} = \frac{\lambda6z}{1} Simplifying I then get: 12z$$\lambda^2$ $=$ $y^2$$z Then Subtracting the right side over to the left and factoring out z gives: z(12\lambda^2-y^2) = 0 Giving me: z = 0 and 12\lambda^2 - y^2 = 0 \lambda \neq 0 because that would imply that x=y=z=0 which does not hold true in the constraint. Now following from the above observation z \neq 0 because that would imply that x=y=z=0 which does not hold true in the constraint. This leaves 12\lambda^2 - y^2 = 0 for me to obtain values from. Solving for y I get: y = \pm 2\lambda$$\sqrt{3}$

I then plugged $y$ into the $x$ value I solved for in my first step: $x$ $=$ $\frac{yz}{2\lambda}$ and obtained:

$x$ $=$ $\pm$ $\sqrt{3}z$

From here I am lost. I can't seem to do anything to get the rest of the values and get numerical values. I would like my process addressed first and then suggestions, and by that I mean answering the question is there a way to proceed down the same route that I am going or was my process flawed from the start? The book gives the answer exactly as follows: maximum $\frac{2}{\sqrt{3}}$, minimum $\frac{-2}{\sqrt{3}}$. What does that even mean when checking my answers I am used to $f$($x,y,z$) $=$ $c$. I'm guessing that in this instance they are just giving me c.

Thank you

• "find the maximum and minimum values subject to the constraint: $g$($x$,$y$,$z$) $=$ $x^2$+2$y^2$+3$z^2$" This is not a constraint, rather a definition of $g$. You might actually mean to ask: for some given $a>0$, find the maximum and minimum values of $f(x,y,z)$ subject to the constraint $g$($x$,$y$,$z$) $=a$, with $g(x,y,z)=$ $x^2$+2$y^2$+3$z^2$.
– Did
May 19, 2016 at 5:54
• This is somewhat similar to finding maximal possible volume of a parallelopiped in an ellipsoid. So looking at this post and other post which are linked there might perhaps help you. May 19, 2016 at 7:43

I have not been able to find the original question and I give you here my approach hoping it will help you.

We want to maiximize $xyz$ subject to the constraint $x^2+2 y^2+3 z^2=a$ with ($x\geq 0$) , ($y\geq 0$) , ($z \geq 0$).

So, let us consider $$F=x y z +\lambda \left(x^2+2 y^2+3 z^2-a\right)$$ Computing derivatives $$F'_x=y z+2 \lambda x=0\tag 1$$ $$F'_y=x z+4 \lambda y=0\tag 2$$ $$F'_z=x y+6 \lambda z=0\tag 3$$ $$F'_\lambda=x^2+2 y^2+3 z^2-a=0\tag 4$$ Now, I should consider equations $(1,2,3)$ and solve them for $x,y,z$ in terms of $\lambda$.

Using $(1)$ gives $x=-\frac{y z}{2 \lambda }$; plugging in $(2)$ leads to $y \left(4 \lambda -\frac{z^2}{2 \lambda }\right)=0$; plugging in $(3)$ leads to $z\left(6 \lambda -\frac{y^2}{2 \lambda }\right)=0$.

Considering all possibilities, the solutions of equations $(1,2,3)$ are then (hoping no mistakes) $$x=0\qquad y= 0\qquad z= 0$$ $$x= -2 \sqrt{6} \lambda \qquad y= -2 \sqrt{3} \lambda \qquad z=-2 \sqrt{2} \lambda$$

$$x= -2 \sqrt{6} \lambda \qquad y= +2 \sqrt{3} \lambda \qquad z=+ 2 \sqrt{2} \lambda$$ $$x= +2 \sqrt{6} \lambda \qquad y= -2 \sqrt{3} \lambda \qquad z= +2 \sqrt{2} \lambda$$

$$x= +2 \sqrt{6} \lambda \qquad y=+2 \sqrt{3} \lambda \qquad z= -2 \sqrt{2} \lambda$$ Using $(4)$, we just get $72 \lambda^2=a$, then $\lambda$ and the remaining follows.

• Hmm your answers don't match the book though as they don't give the answers I stated. Do you know a different approach Claude. Thank you for taking the time to answer May 13, 2016 at 0:26
• @K.Gibson: There is an error in the solution. Multiply (1), (2) and (3) by $x$, $y$ and $z$ respectively to get: $2 x^2=4 y^2=6 z^2$. Use these to substitute for $x^2$ and $y^2$ with the appropriate multiple of $z^2$ in (4) and solve for $z=\pm\sqrt{2/3}$ ... continue from there. May 14, 2016 at 5:41
• Okay thank you that makes sense May 14, 2016 at 5:43
• Okay so I just now got around to trying to work the problem out from what you said. Here is what I did. You said replace $x^2 and y^2$ with the appropriate multiples of z in 4 and solve. I found that $x$ was a multiple of $z$ by 3 and $y$ was a multiple of $z$ by $\frac{3}{2}$. Plugging them in I got 3+$\frac{3}{2}$+$3z^2-6$=0. My algebra lead me to $z$ = $\pm\frac{3}{\sqrt{2}}$ May 18, 2016 at 19:07
• I got this by adding 6 over to the right then subtracted 3 leaving me: May 18, 2016 at 19:11