<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] WLOG $a=\sin^2t,b=\cos^2t$
$$ax^2+by^2-(ax+by)^2=\sin^2t\cos^2t(x^2+y^2-2xy)=?$$
Alternatively, $$a(1-a)+b(1-b)=a+b-((a+b)^2-2ab)=\cdots=2ab$$
</s>