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

Mar 27, 2017

The function:

$f \left(x , y\right) = \frac{x y}{\left(x - 2\right) \left(y - 4\right)}$

constrained by $x y = 2$

has two local maximums for $\left(x , y\right) = \left(- 1 , - 2\right)$ and $\left(x , y\right) = \left(1 , 2\right)$

#### Explanation:

From the constraint equation:

$x y = 2$

we can derive:

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

and substitute it in the original equation:

$g \left(x\right) = f \left(x , y \left(x\right)\right) = \frac{2}{\left(x - 2\right) \left(\frac{2}{x} - 4\right)} = \frac{2 x}{\left(x - 2\right) \left(2 - 4 x\right)}$

We can now find the local extrema for $g \left(x\right)$:

$g \left(x\right) = \frac{2 x}{2 x - 4 - 4 {x}^{2} + 8 x} = - \frac{x}{2 {x}^{2} - 5 x + 2}$

$\frac{\mathrm{dg}}{\mathrm{dx}} = - \frac{2 {x}^{2} - 5 x + 2 - x \left(4 x - 5\right)}{2 {x}^{2} - 5 x + 2}$

$\frac{\mathrm{dg}}{\mathrm{dx}} = - \frac{2 {x}^{2} - 5 x + 2 - 4 {x}^{2} + 5 x}{2 {x}^{2} - 5 x + 2}$

$\frac{\mathrm{dg}}{\mathrm{dx}} = \frac{2 {x}^{2} - 2}{2 {x}^{2} - 5 x + 2} = \frac{2 \left({x}^{2} - 1\right)}{\left(x - 2\right) \left(2 x - 1\right)}$

The critical points are determined by the equation:

$\frac{\mathrm{dg}}{\mathrm{dx}} = 0 \implies x = \pm 1$

Looking at the sign of the derivative we can see that:

$\frac{\mathrm{dg}}{\mathrm{dx}} > 0$ for $x < - 1$

$\frac{\mathrm{dg}}{\mathrm{dx}} < 0$ for $- 1 < x < \frac{1}{2}$

So that $x = - 1$ is a local maximum and:

$\frac{\mathrm{dg}}{\mathrm{dx}} > 0$ for $\frac{1}{2} < x < 1$

$\frac{\mathrm{dg}}{\mathrm{dx}} < 0$ for $1 < x < 2$

so that also $x = 1$ is a local maximum.