# How to get Mathematica to return more accurate symbolic eigenvectors

This code:

Eigenvectors[{{Cos[t], Sin[t]}, {Sin[t], -Cos[t]}}]


returns this output:

{{Cot[t] - Csc[t], 1}, {Cot[t] + Csc[t], 1}}


which is not correct for $$t = 0$$.

Is there a way to get Mathematica to return the "most general" eigenvectors for a symbolic matrix that works for all values of the parameters, instead of making it so that the last component is 1?

• "...which is not correct for $t=0$." - this is once more the issue of a generically correct answer, where the answer returned is correct except at a countable number of values. – J. M.'s ennui Jan 11 at 19:07
• @J.M. explained it very nicely. All I would like to add as a comment, is the potential use of the With command for the special. With[{t = 0}, Eigenvectors[....]] returns {{0, 1}, {1, 0}} – DiSp0sablE_H3r0 Jan 11 at 19:15
• One can compute the discriminant of the characteristic polynomial and set it to zero to find potential bad values, then substitute those in and compute eigenvectors for the explicit cases of interest. – Daniel Lichtblau Jan 12 at 15:05

Maybe FactorList with Trig -> True can help as it does in the given example:

evs = Eigenvectors[{{Cos[t], Sin[t]}, {Sin[t], -Cos[t]}}];
With[{lcd =
Apply@PolynomialLCM /@
Map[1/Times @@ Power @@@
Select[Negative@*Last]@ (* selects denominator *)
FactorList[#, Trig -> True] &,
evs,
{2}]
},
evs*lcd // Simplify
]

(*  {{-Sin[t/2], Cos[t/2]}, {Cos[t/2], Sin[t/2]}}  *)


That expr == Times @@ Power @@@ FactorList[expr] is from the docs.