0
$\begingroup$

I'm trying to plot the first Brillouin zone from an equation I solved for this case.

This is the code I used:

m1 = 10;
m2 = 150;
g1 = 2;
g2 = 1;
(* A = 2; *)
a = (m1*m2)/(g1 - g2)^2;
b = (2*g1*m1 + g1*m2 + g2*m2)/(g1 - g2)^2;
c = -1/(g1 - g2) * cos[k*A] + 1;
w[k_] = a*w^4 + b*w^2 + c;
sol = Simplify[Solve[w[k] == 0, w]]
Plot[sol, {k, -Pi/A, Pi/A}]

The first Brillouin zone is defined for -π/A≤k≤-π/A, where A is the lattice constant.

I've tried both giving A a value (for example 2) and leaving it as it is, but in both cases I'm getting a blank plot.

Can't I do it this way, using symbols, or is my reasoning at fault?

$\endgroup$
  • 1
    $\begingroup$ try A=2; Plot[Evaluate[ReIm@w /. sol], {k, -Pi/A, Pi/A}]? $\endgroup$ – kglr Jan 11 at 18:41
  • $\begingroup$ The function still didn't plot $\endgroup$ – Plamus1 Jan 11 at 18:54
  • 1
    $\begingroup$ Your function w[k] is not well defined. Check it. $\endgroup$ – Cesareo Jan 11 at 19:04
  • 1
    $\begingroup$ Change cos[]to Cos[] . Function w[k] should be W[k] to avoid conflict with parameter w. $\endgroup$ – Ulrich Neumann Jan 11 at 21:45
  • $\begingroup$ Related: mathematica.stackexchange.com/a/18706/4999 $\endgroup$ – Michael E2 Jan 12 at 2:10

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.