Optimization problem [proof of generalized cauchy schwarz] Could you help me solve this problem please ?

*

*Maximize $x^ty$ with constraint $x^tQx \leq 1$ (where $Q$ is definite positive)

What I tried : I tried using KKT but I don't know why I get $-\sqrt{y^tQ^{-1}y}$ as the maximum instead of $\sqrt{y^tQ^{-1}y}$ (which I believe is the maximum). Also, since $x^ty$ is linear (convex and concave), I don't know how to conclude...


*Conclude that $(x^ty)^2 \leq (x^tQx)(y^tQ^{-1}y)$ $\forall x,y$ (generalized CS)


You might check your KKT calculations again; indeed, you should be getting $\sqrt{y^T Q^{-1} y}$ as the maximum. Now since $x^T y$ is convex, it is good; it means that satisfying the KKT conditions is sufficient for finding your desired global maximum.
For part 2, note that by rearranging, equivalently you want to prove that
$$
(\widetilde{x}^T y)^2 \leq y^T Q^{-1} y ,
$$
where $\widetilde{x} = \frac{x}{\sqrt{x^T Q x}}$. Now how can you use the solution from part 1 to deduce this?
