# Use Lagrange multipliers to find the max and min of the function $f(x,y)=xe^y$ subject to the constraint $x^2+y^2=6$.

Use Lagrange multipliers to find the max and min of the function $$f(x,y)=xe^y$$ subject to the constraint $$x^2+y^2=6$$.

My attempt:

I tried to find both partials and set them equal to $$\lambda$$ times the partial of the constraint and got the following equations

$$e^y=2x(\lambda)$$ $$x(e^y)=2y(\lambda)$$

I then solved for $$x$$ and $$y$$ and got : $$x=\frac{e^y}{2\lambda}$$ $$y=\frac{xe^y}{2\lambda}$$

I then plugged those into the original equation and got

$$\frac{(x^2+1)(e^(2y) )}{4\lambda^2}=6$$

I'm confused where to go from here and any help will be greatly appreciated

• Try to eliminate $\lambda$ from the two equations. – Tito Eliatron Dec 2 '18 at 23:08
• How would I go about doing that? – Emily Dec 2 '18 at 23:10

We have, $$e^y = 2 \lambda x$$ $$x e^y = 2 \lambda y$$ thus, $$x = \frac{2 \lambda y}{e^y} = \frac{2 \lambda y}{2 \lambda x} = \frac{y}{x}$$ finally, $$x^2 = y$$ Now we replace into the original (constraint) equation $$y^2 + y - 6 = 0$$ You have now the constraint in the form of a quadratic equation, you can easily find the value of $$y$$ through solving the equation.

• Thank you so much I just found the roots to be 2 and -3 but I'm confused what to do with those? – Emily Dec 2 '18 at 23:43
• You repalce the values of $y$ that you have found in the constraint equation & you end up getting two points $(x_1,y_1)$ & $(x_2,y_2)$, one of these two points is the local max. while the other is the local min., to verify which one is the local max. & which one is the local min. you calculate the second order partial derivatives of $f(x,y)$ because it's a multivariate function you will calculate the Hessian matrix & its determinant to find out which of the two points is local min. & which is the local max.,more here: analyzemath.com/calculus/multivariable/maxima_minima.html – Blg Khalil Dec 3 '18 at 2:28

Following your calculations: $$2\lambda=e^y/x$$ $$2\lambda=xe^y/y$$ so $$e^y/x=xe^y/y \iff ye^y=x^2e^y \iff y=x^2$$ where in the last equivalency we use that $$e^y\ne0$$.

Now, use this information with your constraint to get a bicuadratic equation on $$x$$ that you can solve alone.

Without Lagrange Multipliers

Calling

$$x = r\cos(\theta)\\ y = r\sin(\theta)$$

we have the equivalent problem

$$\max\min_{\theta}f(\theta) = \sqrt{6}\cos(\theta) e^{\sqrt 6\sin(\theta)}$$

and

$$f'(\theta) = \sqrt{6}e^{\sqrt{6} \sin (\theta )} \left(\sqrt{6} \cos ^2(\theta )-\sin (\theta )\right)\to \sqrt{6} \cos ^2(\theta )-\sin (\theta ) = 0$$

etc.

NOTE

This result is equivalent to the system

$$x^2+y^2=6\\ x^2-y = 0$$