For example, to prove that the function $x^8+x-1=0$ has exactly two roots, we first prove that $f$ has at most $2$ real roots by using differentiation. $f'(x)=8x^7+1=0$, by using that the function has two roots and therefore it should have at least one point such that $f '(c)=0$ and then we use IVT to prove that it has exactly two roots. First of all, Are these correct? If yes, when I'm given a function such as $5x^4-9x^2-1=g(x)$ to prove that it has exactly $2$ roots, because its derivative has $3$ roots, I cannot first prove that it has at most $2$ roots and cannot solve it.
So as you see, my question is how we can prove that $5x^4-9x^2-1=0$ has exactly two roots.