1
$\begingroup$

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}

enter image description here 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.

$\endgroup$
8
  • 1
    $\begingroup$ Can you include your definition of 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$
    – mikado
    Dec 8, 2019 at 6:05
  • $\begingroup$ Thank you for the comment! I added it :) $\endgroup$
    – Melav
    Dec 8, 2019 at 10:26
  • $\begingroup$ Do you expect your matrix to be Hermitian? If so, it looks like you have a sign error on element (3,1) $\endgroup$
    – mikado
    Dec 8, 2019 at 10:44
  • $\begingroup$ What did you try? What kind of error did you get? I didn't check the answer but D[funcs,ka] returned an expression different from funcs for me. $\endgroup$
    – N.J.Evans
    Dec 8, 2019 at 14:19
  • $\begingroup$ @Melav can you provide the values you used for the constants, please $\endgroup$
    – mikado
    Dec 8, 2019 at 17:27

0