<s>[INST] Prove The following inequality $(ax+by)^2 \le ax^2+by^2$ for $a+b=1$ Prove The following inequality $(ax+by)^2 \le ax^2+by^2$ for $a+b=1, 0 \le a,b \le 1$
I tried expanding the equation and substituting $b=1-a$
\begin{equation}
(ax+by)^2=a^2x^2+2abxy+b^2y^2=a^2x^2+2axy-2a^2xy+b^2y^2
\end{equation}
The middle member $2axy-2a^2xy$ is negative only for $a>1$, so I'm not sure how to proceed from here.
In the hints I was given it was also said that it can be done by proving that the quadratic form $q(x,y)=ax^2+bx^2-(ax+by)^2$ is always positive. I tried finding the eigenvalues but ended up with huge equation I couldn't make sense of.
 [/INST] We can use $\frac{x^2}{p}+\frac{y^2}{q}\geq\frac{(x+y)^2}{p+q}$,
$$ax^2+by^2=\frac{(ax)^2}{a}+\frac{(by)^2}{b}\geq\frac{(ax+by)^2}{a+b}$$
$$\Rightarrow ax^2+by^2\geq{(ax+by)^2}$$
</s>