The discriminant of a polynomial over a field is a "universal"* polynomial function of its coefficients, which is zero if and only if the polynomial has a multiple root in some field extension.
Now, let's limit the discussion to polynomials $p(x) \in \mathbb{R}[X]$ with real coefficients, with all their roots real and non-negative.
Is there a "universal"* polynomial in the coefficients of such $p(x)$, which is zero if and only if the two smallest roots of $p(x)$ are equal?
(equivalently, the smallest root of $p$ has multiplicity greater than $1$).
If not, is there such a universal real-analytic function of the coefficients?
*By "universal", I mean that the coefficients of the discriminant are independent of $p$.
No, not for any degree of polynomials greater than $2$ (I will consider cubics but the general case is similar). Indeed, suppose you had such a universal real-analytic function $q$ for cubics; we will write $q(p)$ for $q$ applied to the coefficients of a cubic $p$. Let $f(t)=q((x-t)^2(x-1))$. Then $f$ is real-analytic. However, $f(t)=0$ for all $t\in(0,1]$ and $f(t)\neq 0$ for all $t>1$, which is not possible for a real-analytic function.