How can I find the criteria for a polynomial to have, and only have, double roots?
You want to have the discriminant vanish and the discriminant of the derivative not vanish.
mat = {{1, 2, -3}, {-1, 4, -3}, {1, a, 5}};
cpoly = CharacteristicPolynomial[mat, x];
disc1 = Discriminant[cpoly, x]
disc2 = Discriminant[D[cpoly, x], x]
(* Out[616]= -288 - 720 a - 504 a^2 - 108 a^3
Out[617]= -4 (2 + 9 a) *)
Now sort these out.
Reduce[disc1 == 0 && disc2 != 0]
(* Out[618]= a == -2 || a == -(2/3) *)
Making use of the definition of a root of multiplicity 2, one obtains
A = {{1, 2, -3},{-1, 4, -3},{1, a, 5}};f[\[Lambda]_]:= CharacteristicPolynomial[A,\[Lambda]]
Reduce[Exists[x, f[x] == 0 && f'[x] == 0 && f''[x] != 0], a, Reals]
(*a == -2 || a == -(2/3)*)
That approach works not only for polynomials.
This is what the discriminant is usable for:
Reduce[Discriminant[CharacteristicPolynomial[{{1, 2, -3},
{-1, 4, -3},
{1, a, 5}}, x], x] == 0, a]
a == -2 || a == -2/3
Check:
With[{a = -2/3}, Eigenvalues[{{1, 2, -3}, {-1, 4, -3}, {1, a, 5}}]]
{4, 4, 2}
With[{a = -2}, Eigenvalues[{{1, 2, -3}, {-1, 4, -3}, {1, a, 5}}]]
{6, 2, 2}