Find Minimum + Maximum of function with constraints
The goal is to find the min and max values of $$f=x^2+2y^2+3z^2$$ subject to the constraints $$ \begin{cases} x^2+y^2+z^2=1&\;\;\;(\text{eq}1)\\[4pt] x+2y+3z=0&\;\;\;(\text{eq}2)\\ \end{cases} $$ Letting \begin{align*} g&=x^2+y^2+z^21\\[4pt] h&=x+2y+3z\\[4pt] \end{align*} and using the method of Lagrange multipliers, it follows that the critical points $(x,y,z)$ satisfy the vector equation $$\nabla{f} = a(\nabla{g})+b(\nabla{h})$$ for some $a,b \in \mathbb{R}$.
The associated scalar equations are \begin{align*} &2x = 2ax+b&&(\text{eq}3)\\[4pt] &4y = 2ay+2b&&(\text{eq}4)\\[4pt] &6z = 2az+3b&&(\text{eq}5)\\[4pt] \end{align*} With the above $3$ equations, together with $(\text{eq}1)$ and $(\text{eq}2)$, we have a system of $5$ equations in $5$ unknowns.
If two of $x,y,z$ are zero, then by $(\text{eq}2)$, all three of $x,y,z$ sould be zero, but that would contradict $(\text{eq}1)$. Hence no two of $x,y,z$ are zero.
Next we show $a\not\in\{1,2,3\}$.
 If $a=1$, then $(\text{eq}3)$ would yield $b=0$, but then from $(\text{eq}4)$ and $(\text{eq}5)$, we would get $y=0$ and $z=0$, contradiction.$\\[4pt]$
 If $a=2$, then $(\text{eq}4)$ would yield $b=0$, but then from $(\text{eq}3)$ and $(\text{eq}5)$, we would get $x=0$ and $z=0$, contradiction.$\\[4pt]$
 If $a=3$, then $(\text{eq}5)$ would yield $b=0$, but then from $(\text{eq}3)$ and $(\text{eq}4)$, we would get $x=0$ and $y=0$, contradiction.
Hence $a\not\in\{1,2,3\}$, as claimed.
If $b=0$, then since $a\not\in\{1,2,3\}$, $(\text{eq}3)$ would yield $x=0$, $(\text{eq}4)$ would yield $y=0$, and $(\text{eq}5)$ would yield $z=0$, contradiction. Hence $b\ne 0$.
Solving $(\text{eq}3)$ for $x$, $(\text{eq}4)$ for $y$ and $(\text{eq}5)$ for $z$, we get \begin{cases} x={\Large{\frac{b}{2(1a)}}}\\[4pt] y={\Large{\frac{b}{2a}}}\\[4pt] z={\Large{\frac{3b}{2(3a)}}}\\ \end{cases} Replacing $x,y,z$ in $(\text{eq}2)$, we get $$\frac{b(7a^224a+18)}{(1a)(2a)(3a)}=0$$ hence $$7a^224a+18=0$$ which solves as $$ a={\small{\frac{3}{7}}}(4+s) $$ where $s^2=2$ (i.e., $s=\pm\sqrt{2}$).
Replacing $a$ in $x^2,y^2,z^2$, and then rationalizing denominators, we get \begin{cases} x^2={\large{\frac{1}{4}}}b^2(4330s)\\[4pt] y^2={\large{\frac{1}{2}}}b^2(11+6s)\\[4pt] z^2={\large{\frac{1}{4}}}b^2(11+6s)\\ \end{cases} Replacing $x^2,y^2,z^2$ in $(\text{eq}2)$, and then solving for $b^2$, we get $$ b^2={\small{\frac{1}{343}}}(19+3s) $$ Replacing $b^2$ in $x^2,y^2,z^2$, and then rationalizing denominators, we get \begin{cases} x^2={\large{\frac{1}{28}}}(139s)\\[4pt] y^2={\large{\frac{1}{14}}}(5+3s)\\[4pt] z^2={\large{\frac{1}{28}}}(5+3s)\\ \end{cases} Finally, replacing $x^2,y^2,z^2$ in $f$, we get $$f={\small{\frac{3}{7}}}(4+s)={\small{\frac{3}{7}}}(4\pm\sqrt{2})$$ It follows that the maximum value of $f$ subject to the given constraints is $${\small{\frac{3}{7}}}(4+\sqrt{2})\approx 2.320377241$$ and the minimum value of $f$ subject to the given constraints is $${\small{\frac{3}{7}}}(4\sqrt{2})\approx 1.108194187$$
Related videos on Youtube
Eyal Klemm
Updated on December 11, 2022Comments

Eyal Klemm 11 months
homework assignment ask to find Max/Min for $$U(x,y,z) = x^2 + 2y^2 + 3z^2$$ with these constraints:
 $x^2 + y^2 + z^2 = 1$
 $x + 2y + 3z = 0$
Thank you.
First i tried to isolate x from the second constraint and then to put it in the first one .

Matti P. over 4 yearsJudging by the tags, you are aware of Lagrange multipliers. How would you use them in this case? Did you try something?

Eyal Klemm over 4 yearshi, first i tried to isolate x from the second constraint and then to put it in the first one , then tried to use lagarange multipliers but stucked with really ugly equations so i thought there is might be more elegant way of doing it.

lab bhattacharjee over 4 years$$1=x^2+y^2+z^2=(2y+3z)^2+y^2+z^2=5y^2+10z^2+12yz=10\left(z+\dfrac35y\right)^2+y^2\left(5\dfrac{18}5\right)$$ WLOG $\sqrt{10}\left(z+\dfrac35y\right)=\cos t,\sqrt{\dfrac75}y=\sin t$ $$x^2+2y^2+3z^2=1+y^2+2z^2=?$$

Matti P. over 4 yearsThe traditional approach is to take the constraint functions $g_i(x)$, multiply them by $\lambda_i$ and then add to the function that you're trying to maximise/minimise. Did you try that?

Eyal Klemm over 4 yearsyes, i tried that but ended up with a ''messy'' equations.

A.Γ. over 4 yearsElimination a variable is apparently not a point with this exercise, it is supposed to use Lagrange multipliers in a pretty straightforward manner.

Eyal Klemm over 4 yearsThank you for the whole explanation!

quasi over 4 years@Eyal Klemm: You're welcome! But I agree with your initial assessment  solving the system is cumbersome.

quasi over 4 years@Eyal Klemm: Is it an exercise from a book? If so, which one?

Eyal Klemm over 4 yearsI dont know if its from a book . We got it from previous semester exam for practicing.

quasi over 4 years@Eyal Klemm: What textbook are you using for the course?