I have a 3x3 matrix. By setting the determinant to 0, I find the values of w in terms of ka and graphed the complex solutions. m, M, k, l are constants:
mat = {{m*w^2 - 2*k, k, k*Exp[-3 I*ka]}, {k, M*w^2 - (l + k),
l}, {-k*Exp[-3 I*ka], l, M*w^2 - (k - l)}};
mydet = ExpToTrig[Det[mat]]
sol = Solve[mydet == 0, w]
funcs = w /. sol
ReImPlot[funcs, {ka, 0, Pi}, PlotLabel -> "w(ka)", PlotLegends -> {{"w1", "w2", "w3" ,"w4", "w5" ,"w6"}, "ReIm"}, ReImLabels -> {"Re", "Im"}, Frame -> True}
I need to find the derivatives of all 6 complex solutions with respect to ka to find the density of states. I thought that I needed to rewrite the solutions in an array, but that did not work when I tried it.
mydet
? If you don't, people can't easily test the solution they propose. If it is complicated, you could invent a simpler matrix that has the same problem. $\endgroup$D[funcs,ka]
returned an expression different fromfuncs
for me. $\endgroup$