Given a constraint function to a subject function . Extremize the subject function, finding the maxima and minima using Lagrange multiplier

lagrange multipliermaxima-minimamultivariable-calculus

Question :

Let $$ f(x,y)=x^3y,~~~~~g(x,y)= x^2+2xy+5y^2-10 $$

then seek to maximize and minimize $f$ subject to the constraint $g=0$ by the method of Lagrange multipliers.

My attempt :

Partial-differentiation :

$$\nabla f(x,y) = (3x^2y )~\hat{i} + (x^3) ~\hat{j} $$

$$\nabla g(x,y) = (2x+2y) ~\hat{i}+(2x+10y) ~\hat{j} $$

Using Lagrange multipliers method :

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

$$\begin{pmatrix} ~3x^2y\\ x^3\end{pmatrix}= \lambda \begin{pmatrix} ~2x+2y\\ 2x+10y\end{pmatrix}$$

$$ \tag{1}3x^2y = \lambda\,(2x+2y) $$

$$\tag{2} x^3 = \lambda \,(2x+10y)$$

Making y the subject from equation (1) :

$$ 3x^2y-2 \lambda y= 2 \lambda x$$
$$ \tag{3} y = \frac{2 \lambda x }{3x^2-2 \lambda} $$

Replacing y in equation (2) :

$$ x^3-2 \lambda x = 10 \lambda \left(\frac{2 \lambda x }{3x^2 – 2 \lambda} \right)$$

Rearranging to solve for $\lambda$ :

$$(x^2- 2 \lambda) ~(3x^2-2 \lambda) = 20 \lambda^2$$

$$ 16 \lambda^2 +8x^2 \lambda -3x^4 = 0$$

Solving the quadratic equation for $\lambda$ :

$$ \lambda =\frac{-8x^2\pm \sqrt{(8x^2)^2 – 4(16)(-3x^4)}}{2(16)}$$

$$ \lambda = \frac{-8x^2\pm \sqrt{256x^4}}{2(16)} $$

$$ \lambda = \frac{x^2}{4}, ~-\frac{3x^2}{4}$$

Replacing $\lambda$ in (3) :

For $ \lambda = \frac{x^2}{4}$ :

$$ y = \frac{x}{5} $$

For $\lambda = -\frac{3x^2}{4}$ :

$$ y = -\frac{x}{3}$$

One of the options of the Q which nearly matches my solution states :
The maximum and minimum are attained at points on the lines $y = x/3$ and $y = -x/5$

But :
The solution I got is $ y = -x/3 $ and $y = x/5$

I am not sure what went wrong and wheather my steps are correct or not. Could you guys please help me out.

Edit :

Other options to the question :

1.) The maximum is $125/16$; the minimum is $-675/16$

2.) The maximum is $675/16$; the minimum is $-675/16$

3.) the equation $g = 0 $ gives a hyperbola, so there is no maximum for $f$.

4.) at the maximum and minimum $(x,y)$, the Lagrange multiplier $\lambda$ satisfies

$$\begin{pmatrix} ~3x^2\\ x^3\end{pmatrix}= \lambda \begin{pmatrix} ~2x+2y\\ 2x+10y\end{pmatrix}$$

Best Answer

Applying the method of Lagrange multipliers, you get the system$$\left\{\begin{array}{l}3x^2y=2\lambda x+2\lambda y\\x^3=2\lambda x+10\lambda y\\x^2+2xy+5y^2=10.\end{array}\right.\tag1$$So, we have$$15x^2y-x^3=5(2\lambda x+2\lambda y)-(2\lambda x+10\lambda y)=8\lambda x.\tag2$$Is there a solution of the system $(1)$ with $x=0$? Yes; it's easy to see that there are actually two of them: $\left(0,\pm\sqrt2\right)$.

If $x\ne0$, then it follows from $(2)$ that $15xy-x^2=8\lambda$, or $\lambda=\frac18x(15y-x)$. This leads to the system$$\left\{\begin{array}{l}x^3=\frac14(x+5y)x(15y-x)\\x^2+2xy+5y^2=10.\end{array}\right.\tag3$$Since we are assuming that $x\ne0$, the first equation of $(3)$ can be simplified into $x^2-2xy-15y^2=0$. It is now easy to see that the solutions of $(3)$ are $\pm\left(\frac52,\frac12\right)$ and $\pm\left(\frac{3\sqrt5}2,-\frac{\sqrt5}2\right)$. Now, computing the value of $f$ at the six solutions of $(1)$ that were found above, we get that the maximum is $\frac{125}{16}$ (attained at $\pm\left(\frac52,\frac12\right)$) and that the minimum is $-\frac{675}{16}$ (attained at $\pm\left(\frac{3\sqrt5}2,-\frac{\sqrt5}2\right)$). So, the first option is correct.

Related Question