What am I doing wrong? (Lagrange multiplier)

472 Views Asked by At

I have been asked to find the critical points of the function:

$$ f(x,y) = e^{xy} $$

with the constraint:

$$ x^3+y^3=16 $$

The first thing i do, is make my constraint into a function, by moving everything to the left side:

$$ g(x,y) = x^3+y^3-16 $$

I now take the partial derivative of both function, with respect to each variable: $$ \frac{\partial f}{\partial x} = e^{xy}y $$ $$ \frac{\partial f}{\partial y} = e^{xy}x $$ $$ \frac{\partial g}{\partial x} = 3x^2 $$ $$ \frac{\partial g}{\partial y} = 3y^2 $$

Now I set up my lagrange multiplier equations:

$$ e^{xy}y = 3x^2 \cdot \lambda $$ $$ e^{xy}x = 3y^2 \cdot \lambda $$

I solve for x in the first equations and for y in the second equations, and get:

$$ x = 0 $$ $$ y = 0 $$

If I put my values into the original constraint, I get:

$$ 0^3 + 0^3 = 16 $$

Which is false. Wolframs lagrange multiplier calculator tells me, that I should get a global maximum, but I haven't found any. Am I missing a step somewhere?

2

There are 2 best solutions below

1
On BEST ANSWER

In problems like this it is customary to define a Lagrangian function

$$L\left(x\right)=f\left(x\right)-\lambda g\left(x\right)$$

where $f\left(x\right)=e^{xy}$ is your function and $g\left(x\right)=x^{3}+y^{3}-16$ is the constraint. Explicitly

$$L\left(x\right)=e^{xy}-\lambda \left(x^{3}+y^{3}-16\right)$$

Then the equations of exterma of $f$ with the constraint $g$ are

$$\begin{cases}0=\frac{\partial L}{\partial x}=ye^{xy}-3\lambda x^2\\0=\frac{\partial L}{\partial y}=xe^{xy}-3\lambda y^2\\0=\frac{\partial L}{\partial \lambda}=x^{3}+y^{3}-16\end{cases}$$

Now, there is no problem with your method. You just noticed that $x=y=0$ can't be a solution. Thus we can divide the first equation by the second to get

$$\frac{y}{x}=\frac{x^{2}}{y^{2}}$$

or

$$x^{3}=y^{3}$$

leading to $x=y$. Plugging this into the third equation gives you

$$x=y=2$$

as a solution.

1
On

You have proven that $x \neq 0$ and $y \neq 0$.

Dividing $$ e^{xy}y = 3x^2 \cdot \lambda $$ $$ e^{xy}x = 3y^2 \cdot \lambda $$

We have $$\frac{y}{x}=\frac{x^2}{y^2}$$

Hence $y^3=x^3$, along with $x^3+y^3=16$, you should be able to solve the problem.