I am wondering how to factor a[1],a[2],...,a[4] out of sim so that I can write sim as the form of a matrix times column vector a. (a[1],a[2],...,a[4] are the component of vector a) ?
My ultimate goal is to compute the Omega when the determinant of the matrix is zero.
Nmax = 4;
x[0][t] = 0;
x[Nmax + 1][t] = 0;
T = 1/2 Sum[m[i] x[i]'[t]^2, {i, 1, Nmax}];
U = 1/2 Sum[k[i] (x[i][t] - x[i - 1][t])^2, {i, 1, Nmax + 1}];
L = T - U;
EL[q_] := D[L, q] - D[D[L, D[q, t]], t]
eigen = Table[EL[x[i][t]], {i, 1, Nmax}] // MatrixForm;
x[i_][t_] = a[i] E^(I \[Omega] t);
sim = eigen /. t -> 0

