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

Jun 2, 2016

Local maximum located at $\left(x = - 4.89184 , y = - 0.613266\right)$

#### Explanation:

We will be looking for stationary points with posterior qualification.
This technique consists in finding points such that the normal vector to the objective function

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

and the restriction function

$g \left(x , y\right) = x y - 3 = 0$

are aligned. Formally speaking, there exists $\lambda$ such that

$\nabla f \left(x , y\right) + \lambda \nabla g \left(x , y\right) = \vec{0}$

proceeding this way we obtain the equation set

{ (-((2 + x - 2 y)/((x-2)^3 (y-4))) +lambda y=0),( ( 4 - x)/((x-2)^2 (y-4)^2) + lambda x=0), (x y-3=0) :}

Without much effort can be obtained the unique real solution

$\left(x = - 4.89184 , y = - 0.613266 , \lambda = 0.00179817\right)$

Qualifying this point must be done considering the restriction so the easiest way to do that is substituting the restriction $g \left(x , y\right)$ into the
objective function $f \left(x , y\right)$ obtaining

$\left({f}_{g}\right) \left(x\right) = \frac{3 - {x}^{2}}{{\left(x - 2\right)}^{2} \left(4 x - 3\right)}$

then we can verify that $\frac{d}{\mathrm{dx}} \left({f}_{g}\right) \left(- 4.89184\right) = 0$
and

${d}^{2} / \left({\mathrm{dx}}^{2}\right) \left({f}_{g}\right) \left(- 4.89184\right) = - 0.000965087$

qualifying this point as a local maximum.

Attached are two figures. One representing the surface intersection of $f \left(x , y\right)$ and $g \left(x , y\right)$ and the other showing the function $\left({f}_{g}\right) \left(x\right)$