I have the following matrix:
M = {{En + 2 Cos[k a] t, t1 + t2 Cos [k a]},{t1 + t2 Cos [k a], En + 2 Cos[k a] t}};
I want the eigen value to be function of t,t1 and t2 so that they can be manipulated: So I do the following:
eig=Eigenvalues[M];
eg[t1_, t_, t2_] := eig[[1]];
But in the information of eg, it shows:
Global`eg
eg[t1_,t_,t2_]:=eig[[1]]
But if I print out eig and copy the expression in
eg[t1_,t_,t2_]:=En - t1 + 2 t Cos[a k] - t2 Cos[a k];(*The expression of eig[[1]]*)
I get what I want. Could someone explain me where I am going wrong and how to get it correct without the copy pasting.