I would like to find the roots of a polynomial using its companion matrix.
The polynomial is ${p(x) = x^4-10x^2+9}$
The companion matrix $M$ is
$M={\left[ \begin{array}{cccc} 0 & 0 & 0 & -9 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 10 \\ 0 & 0 & 1 & 0 \end{array} \right]}$
A theorem says that the eigenvalues of $M$ are the roots of $p(x)$. I tried to find the characteristic polynomial of $M$ but it turned out to be $p(x)$. What should I do to obtain the eigenvalues of $M$?
It's no surprise you got the characteristic equation from the companion matrix, because the equation came from that precise matrix.
If you want to find roots of a polynomial using a companion matrix, you would use one of the specialized numerical methods for computing the eigenvalue of a matrix. Such methods do not use the characteristic polynomial and are tailored to the symmetry of the matrix. See, for example, Numerical Recipes (the link goes to the Householder Method, which is not applicable to your matrix, but gives you the general idea of what's involved).
Typically, you would use a package to find eigenvalues numerically because in general, such routines are very complex and not worth trying to figure out on your own. LINPACK, Matlab, Mathematica, etc., all lhave such routines for general matrices.