Finding the maximum value of a function on an ellipse Let $x$ and $y$ be real numbers such that $x^2 + 9 y^2-4 x+6 y+4=0$. Find the maximum value of $\displaystyle \frac{4x-9y}{2}$.
My solution: the given function represents an ellipse. Rewriting it, we get $\displaystyle (x-2)^2 + 9(y+\frac{1}{3})^2=1$. To find the maximum of $\displaystyle \frac{4x-9y}{2}$, $x$ should be at its maximum and $y$ at its minimum. Solving the equations, I get that $x = 3$ and $\displaystyle y = -\frac{2}{3}$, but the answer i get is wrong. What am I doing wrong?

Using parametric form, $\displaystyle x-2=\cos\phi,3\left(y+\frac13\right)=\sin\phi$
$\displaystyle\implies x=2+\cos\phi, 3y=\sin\phi-1 $
$\displaystyle\implies\frac{4x-9y}2=\frac{4(2+\cos\phi)-3(\sin\phi-1)}2=\frac{11+4\cos\phi-3\sin\phi}2$
Can you prove $$-\sqrt{a^2+b^2}\le a\cos \theta+b\sin\theta\le \sqrt{a^2+b^2}?$$
