# How do you minimize and maximize f(x,y)=ye^x-xe^y constrained to xy=4?

Dec 30, 2017

?

#### Explanation:

$\text{We could use the Lagrange multiplier L :}$

$f \left(x , y , L\right) = y \exp \left(x\right) - x \exp \left(y\right) + L \left(x y - 4\right)$

$\frac{\mathrm{df}}{\mathrm{dx}} = y \exp \left(x\right) - \exp \left(y\right) + L y = 0$
$\frac{\mathrm{df}}{\mathrm{dy}} = \exp \left(x\right) - x \exp \left(y\right) + L x = 0$
$\frac{\mathrm{df}}{\mathrm{dL}} = x y - 4 = 0 \implies y = \frac{4}{x}$

$\implies \left(\frac{4}{x}\right) \exp \left(x\right) - \exp \left(\frac{4}{x}\right) + 4 \frac{L}{x} = 0$
$\implies \exp \left(x\right) - x \exp \left(\frac{4}{x}\right) + L x = 0$

$\text{Multiply the last equation by (4/x) : }$

$\implies \left(\frac{4}{x}\right) \exp \left(x\right) - 4 \exp \left(\frac{4}{x}\right) + 4 L = 0$

$\text{Subtract this equation from the first :}$

$\implies 3 \exp \left(\frac{4}{x}\right) + 4 \frac{L}{x} - 4 L = 0$
$\implies 4 L \left(1 - \frac{1}{x}\right) = 3 \exp \left(\frac{4}{x}\right)$
$\implies L = \left(\frac{3}{4}\right) \exp \frac{\frac{4}{x}}{1 - \frac{1}{x}}$

$\text{Fill in this value for L in the second equation :}$

$\implies \exp \left(x\right) - x \exp \left(\frac{4}{x}\right) + \left(\frac{3}{4}\right) \exp \left(\frac{4}{x}\right) {x}^{2} / \left(x - 1\right) = 0$
$\implies \exp \left(x\right) + \exp \left(\frac{4}{x}\right) \left[\left(\frac{3}{4}\right) {x}^{2} / \left(x - 1\right) - x\right] = 0$
$\implies \exp \left(x\right) = \exp \left(\frac{4}{x}\right) \frac{x \left(x - 1\right) - \left(\frac{3}{4}\right) {x}^{2}}{x - 1}$
$\implies \exp \left(x\right) = \exp \left(\frac{4}{x}\right) x \frac{\left(\frac{1}{4}\right) x - 1}{x - 1}$
$\implies \exp \left(x - \frac{4}{x}\right) = x \frac{\left(\frac{1}{4}\right) x - 1}{x - 1}$

$\text{This looks like a transcendental equation.}$
$\text{I am stopping here, but if one solves this numerically, one gets}$
$\text{x and then L and also y.}$