Suppose a diagonal matrix $D\in\mathbb{R}^{n\times n}$ is given, with all its entries $d_{ii}\geq0$, for all $i$. Is it possible to prove
$\operatorname{tr}(X^TDX)-2\operatorname{tr}(X^TDY)+\operatorname{tr}(Y^TDY)\geq 0$
for some $X, Y\in\mathbb{R}^{n\times 2}$. The above reminds to $a^2+b^2\geq2ab$, but I would need a proof in matrix terms. Also, if the above is true, for which range of $b$ is the following true
$(2-b)\operatorname{tr}(X^TDX)-2(2-b)\operatorname{tr}(X^TDY)+\operatorname{tr}(2-b)(Y^TDY)\geq 0$