<s>[INST] If x and y are real numbers such that $4x^2+2xy+9y^2=100$ then what are all possible values of $x^2+2xy+3y^2$ If $x$ and $y$ are real numbers and $4x^2+2xy+9y^2=100$ then what are all possible values of $x^2+2xy+3y^2$.
The first thing I did with this equation was to try and factor the first equation, but that didn't work so I tried to simplify it into a standard elliptical equation
$$\left(\frac{x}{5}\right)^2+\frac{xy}{50}+\left(\frac{3y}{10}\right)^2=1$$
Then I noticed that the numerator of the $x$ coefficient and the coefficient lined up but i couldn't get the denominators to cancel out.
Now I'm stuck and don't know how I should progress. Any help would be appreciated.
 [/INST] From $4 x^2 + 2 x y + 9 y^2 = 100 $, by defining $ r= [x, y]^T $ we can write
$ r^T Q r = 100 $
where $ Q = \begin{bmatrix} 4 && 1 \\ 1 && 9 \end{bmatrix} $
Diagonlizing $Q$, we can factor it into $ Q = R D R^T $
We get
$D = \begin{bmatrix} \frac{1}{2} ( 13 - \sqrt{29} ) && 0 \\ 0 && \frac{1}{2} ( 13 + \sqrt{29}) \end{bmatrix} $
And,
$R = \begin{bmatrix} \cos \theta && - \sin \theta \\ \sin \theta && \cos \theta \end{bmatrix}$
where $\theta = \frac{1}{2} \tan^{-1}(- \dfrac{2}{ 5} )$
So now we have the following
$ r^T R D R^T r = 100 $
Define $z = R^T r $ , then $ r = R z $
From which we know that,
$ D_{11} z_1^2 + D_{22} z_2^2= 100 $
Thus,
$ z_1 = \dfrac{10}{\sqrt{D_{11}}} \cos \theta $
$ z_2 = \dfrac{10}{\sqrt{D_{22}}} \sin \theta $
where $\theta \in \mathbb{R}$ is a parameter.
Now, $ r = R z  = 10 R D^{-1/2} u $ where $ u = [ \cos \theta , \sin \theta ] ^T $
And the function that we have is
$ f(x, y) = x^2 + 2 x y + 3 y^2 = r^T Q_f r $
where $Q_f = \begin{bmatrix} 1 && 1 \\ 1 && 3 \end{bmatrix} $
Plugging $r$ from above,
$ f(u) = 100 u^T D^{-1/2} R^T Q_f R D^{-1/2} u $
Since $u$ is a unit vector, the range of values of $f$ is $[100 \lambda_{min}(Q_1), 100 \lambda_{max}(Q_1)] $ , where
$Q_1 = D^{-1/2} R^T Q_f R D^{-1/2} $
</s>