Suppose $f(x) = x^{2k} + a_{2k-2} x^{2k-2} + \dots + a_2 x^2 + a_0 \in \mathbb R[x]$ with $k \in \mathbb N$. Let us assume $k \ge 2$. What can be said about the number of distinct real roots for $f(x)$?
By Fundamental Theorem of Algebra, it could be at most $2k$. But on the other hand, when I was playing with $x^4 + ax^2 + b$, it seems that if the roots are all real, it must be factored as $(x^2 - c^2)^2$ for some $c$ which would only give us two distinct real roots.
Well, writing $g(x)=x^k+a_{2k-2}x^{k-1}+\dots+a_2x+a_0$, we have $f(x)=g(x^2)$. So, the roots of $f$ are just the square roots of the roots of $g$. This means that $f$ has two real roots for every positive root of $g$, and one more real root if $0$ is a root of $g$.
In particular, $f$ could have any number of distinct real roots from $0$ to $2k$. Indeed, to get any even number $2m$ of real roots ($0\leq m\leq k$), just let $g$ be a polynomial with exactly $m$ positive roots and for which $0$ is not a root. To get an odd number $2m+1$ of real roots ($0\leq m<k$), just let $g$ have $m$ positive roots and also have $0$ as a root.