Identifying factors of higher order in a determinant

Consider a $n\times n$ matrix $A$ whose elements are some polynomials in the indeterminates $x_1, x_2,\ldots,x_m$. To calculate the determinant of such a matrix, one of the usual ways is to treat the determinant as a polynomial in $x_1,\ldots,x_m$ and identify its factors. The usual idea being if $x = y$ makes the determinant vanish then $x -y$ is one of the factors. What I however do not understand is how to identify its order, that is to identify the exact $k$ such that $(x - y)^k$ is the factor.

-

If setting $x=y$ makes the rank go down by $k$, then $(x-y)^k$ is a factor. Harald Helfgott and I used this idea in evaluating a determinant http://www.combinatorics.org/Volume_6/Abstracts/v6i1r16.html); actually the determinant was evaluated earlier by this method by Zavrotsky. The reference we gave for the fact relating the rank of the matrix and the multiplicity of $x-y$ as a factor is R. A. Frazer, W. J. Duncan, and A. R. Collar, Elementary Matrices and Some Applications to Dynamics and Differential Equations, Cambridge University Press, 1947, page 17.
I do not seem to have understood your idea of rank going down. For example, consider the matrix $\left( \begin{array}{ccc} (x + a_1)^2 & (x + a_1)*(y + a_1) & (y + a_1) \\ (x + a_2)^2 & (x + a_2)*(y + a_2) & (y + a_2) \\ (x + a_3)^2 & (x + a_1)*(y + a_3) & (y + a_3) \\ \end{array} \right)$. The determinant of this matrix is given by $(x - y)^2 * (a_1 - a_2) * (a_1 - a_3) * (a_2 - a_3).$ The rank initially is $3$. After substituting $x= y$, the rank becomes $2$. Am i missing something? The idea of derivatives given in the book that you suggested, however, is something I could work with. – Harish Jan 30 '12 at 3:06
It seems that this theorem does not always give the exact power of $x-y$ dividing the determinant: if setting $x=y$ makes the rank go down by $k$ then $(x-y)^k$ is a factor of the determinant, but the highest power of $x-y$ dividing the determinant could be greater than $k$. I don't know of a stronger result that gives the exact power of $x-y$ – Ira Gessel Jan 30 '12 at 3:25