<s>[INST] prove that $a^2(p-q)(p-r)+b^2(q-p)(q-r)+c^2(r-p)(r-q)\ge 0$ If $a,b,c$
are the sides of a triangle and $p,q,r$ are positive real numbers then prove that $a^2(p-q)(p-r)+b^2(q-p)(q-r)+c^2(r-p)(r-q)\ge 0$
After modification. I have to prove $(a^2 p^2+b^2 q^2 + c^2 r^2) \ge pr(a^2+c^2-b^2)+qr(b^2+c^2-a^2)+pq(a^2+b^2-c^2)$
 [/INST] Note that substitution $p'=p-t, q'=q-t, r'=r-t$, where $t$ is any real number leads to an equivalent form 
$$a^2(p'-q')(p'-r')+b^2(q'-p')(q'-r')+c^2(r'-p')(r'-q')\ge 0.$$
This, as you proved already, is equivalent to 
$$(a^2 p'^2+b^2 q'^2 + c^2 r'^2) \ge p'r'(a^2+c^2-b^2)+q'r'(b^2+c^2-a^2)+p'q'(a^2+b^2-c^2).$$
However, since the inequality is symmetric with respect to $p,q,r$, we can assume that $r = \min\{p,q,r\}$. Putting $t=r$ we get $r'=0$ and so the inequality reduces to 
$$a^2 p'^2+b^2 q'^2 \ge p'q'(a^2+b^2-c^2),$$
where $p', q'$ are nonnegative (because $p,q\ge r$).
Triangle inequality yieds $c>|a-b|$, so $c^2 > a^2-2ab+b^2$ and therefore 
$$a^2+b^2-c^2 < 2ab.$$
Since $p',q'$ are nonnegative, we have that
$$p'q'(a^2+b^2-c^2) \le 2p'q'ab.$$
Thus it suffices to prove that $$a^2p'^2+b^2q'^2 \ge 2p'q'ab.$$
But this is obvious: $$a^2p'^2 + b^2q'^2 - 2p'q'ab = (ap'-bq')^2 \ge 0.$$
</s>