<s>[INST] If $x$ and $y$ are real numbers such that $4x^2 + y^2 = 4x - 2y + 7$, find the maximum value of $5x+6y$. If $x$ and $y$ are real numbers such that $4x^2 + y^2 = 4x - 2y + 7$, find the maximum value of $5x+6y$.
I did a little bit of manipulation and got $4(x+1)(x-2) + (y+1)^2=0$. I then got $x=2$ and $y=-1$ which means the maximum must be $4$, but the answer key says it's $16$. How come?
 [/INST] Let $5x+6y=k$.
Thus, $y=\frac{k-5x}{6}$ and the following equation has real roots:
$$4x^2+\left(\frac{k-5x}{6}\right)^2=7+4x-2\cdot\frac{k-5x}{6}$$ or
$$165x^2-2(5k+102)x+k^2+12k-252=0,$$ which gives
$$(5k+102)^2-169(k^2+12k-252)\geq0$$ or
$$(k-16)(k+23)\leq0$$ or
$$-23\leq k\leq16.$$
For $k=16$ the equality occurs for
$$x=\frac{5\cdot16+102}{169}=\frac{14}{13}$$ and from here $$y=\frac{23}{13},$$ which says that we got a maximal value.
</s>