# How to find the derivatives from Solve after obtaining 6 complex solutions? [closed]

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.

• 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. Dec 8, 2019 at 6:05
• Thank you for the comment! I added it :) Dec 8, 2019 at 10:26
• Do you expect your matrix to be Hermitian? If so, it looks like you have a sign error on element (3,1) Dec 8, 2019 at 10:44
• 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. Dec 8, 2019 at 14:19
• @Melav can you provide the values you used for the constants, please Dec 8, 2019 at 17:27