0
$\begingroup$

Let consider a matrix and evaluate the time dependent eigenvalues

M[t_]:={{Sin[t],Cos[t]},{t,t*t}};
e1[t_]:= Eigenvalues[M[t]]

Now If I evaluate

N@e1[1]

it gives output {1.66005, 0.181422}

But if I evaluate a table for different t

 N@Table[Evaluate[e1[i]], {i, 1, 5}] // FullSimplify

it gives first eigen value {0.181422, 1.66005} and all in form {{0.181422, 1.66005}, {1.20732, 3.70197}, {0.490124, 8.651}, {-0.599291, 15.8425}, {-1.01345, 25.0545}}

$\endgroup$
3
  • 1
    $\begingroup$ Eigenvalues are sorted from largest to smallest when computed numerically. This sorting doesn't happen when working with exact numbers of symbolic expressions. This is mentioned in the documentation. $\endgroup$
    – Szabolcs
    Commented Feb 18, 2015 at 20:05
  • $\begingroup$ Evaluate causes the Eigenvalues to be found symbolically before substituting the numeric i. Try this: Evaluate[e1[i]] /. i -> 1 // N $\endgroup$
    – george2079
    Commented Feb 18, 2015 at 20:08
  • $\begingroup$ george2079@ It also gives me the same result as table. can I evaluate for other eigenvalues? Evaluate[e1[i]] /. i -> {1,2,3,4,5} // N $\endgroup$
    – santosh
    Commented Feb 18, 2015 at 21:50

1 Answer 1

2
$\begingroup$

Please check your definitions. You use e1 and eg.

Here is what I think you're asking:

M[t_] := {{Sin[t], Cos[t]}, {t, t*t}};
e1[t_] := Eigenvalues[M[t]];

e1[0]

(* {0, 0} *)

... a degenerate matrix.

N@Table[e1[i], {i, 1, 5}] // FullSimplify

(* {

{1.66005, 0.181422},

{3.70197, 1.20732},

{8.651, 0.490124},

{15.8425, -0.599291},

{25.0545, -1.01345}

} *)

...a list of the two eigenvalues for five different values of $i$.

If you want to include the "degenerate" example, just change the iterator to {i, 0, 5}.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.