<s>[INST] Maximum value of $4x-9y$ Suppose xand y are real numbers and that $x^2 +9y^2 -4x +6y+4=0$ then we have to find the maximum vale of 4x-9y
I found that the equation given is that of ellipse .
I can consider a line $4x-9y=0$ which cut the ellipe .
bt by doing this its getting very comlicated .
 [/INST] We'll use Lagrange's multiples:
$$f(x,y) = 4x-9y , \phi(x,y) = (x-2)^2 + (3y+1)^2 $$
$$F(x,y) = 4x-9y - \lambda(x-2)^2 - \lambda (3y+1)^2 $$
And so:
$$\frac{\partial F}{\partial x} = 4 - 2\lambda (x-2) = 0 \Rightarrow x-2 = \frac{2}{\lambda} $$
$$ \frac{\partial F}{\partial y} = -9 - 6\lambda (3y+1) = 0 \Rightarrow 3y+1=-\frac{3}{2\lambda}$$
Now substitute in $\phi$:
$$(x-2)^2+(3y+1)^2=1 \Rightarrow \frac{4}{\lambda^2} + \frac{9}{4\lambda^2}=1 $$
$$ \lambda^2 = 4 + \frac94 = \frac{25}4 \Rightarrow \lambda = \pm \frac{5}{2} $$
Substitute $\lambda$ in $x,y$ and get:
$$ x-2 = \frac{2}{\lambda} \Rightarrow x = \frac{14}{5} , \frac{6}{5} $$
$$ 3y + 1 = -\frac{3}{2\lambda} \Rightarrow y = -\frac{8}{15} , -\frac{2}{15} $$
Now we need to solve for $4x-9y$. For $\lambda = \frac{5}{2}$ we get $16$ and for $\lambda = -\frac{5}{2} $ we get $6$. So the maximum is 16!
</s>