1
$\begingroup$

I am trying to plot the band structure of some quantum mechanics problems, but I am really lost. From the math I get the following relationship between q and k

cos(qL)=cos(KL-phi)/A

A, phi are know quantities. I want to make a plot of KL as a function of qL, with qL real. There is an infinite number of solutions, and some values of KL which are imposible to satisfy (gaps in the graph). I understand it should continually solve the equation, getting only the first n intervals. Any pointers?

Thank you for your time!

$\endgroup$
1
  • $\begingroup$ Implicit plots can be done using ContourPlot $\endgroup$
    – Bob Hanlon
    Commented Mar 5, 2023 at 2:52

1 Answer 1

1
$\begingroup$

This sounds similar to the Dirac comb band-structure, albeit with a slightly different potential. This is typically solved graphically - see e.g. here.

You can shade the valid solutions, i.e. when the RHS of your function has values between -1 and 1, to get the allowed bands. Here's an example with the Dirac comb solution, i.e. $f(z) = \cos(z) - \beta \sin[z]/z$:


Block[{intersectionsTop, intersectionsBottom, pairs, rects, pl, 
  f, \[Beta] = 2},
 f[z_] = Cos[z] - \[Beta] Sin[z]/z;
 {intersectionsTop, intersectionsBottom} = 
  Reap[odsoln = 
        NDSolve[{y'[x] == f'[x], y[-12.5] == f[-12.5] - #, 
          WhenEvent[y[x] == 0, Sow[x]]}, y[x], {x, -12.5, 12.5}];][[2,
      1]] & /@ {1, -1};
 
 pairs = 
  Partition[Sort@Flatten[{intersectionsTop, intersectionsBottom}], 
   2];
 rects = {Opacity[.5], Gray, 
   Rectangle @@ Thread[{#, {-1, 1}}] & /@ pairs};
 
 pl = Plot[Cos[z] - \[Beta] Sin[z]/z, {z, -12.5, 12.5}, Frame -> True,
    FrameStyle -> Thick, 
   GridLines -> {Range[-5 Pi, 5 Pi, Pi], {-1, 1}}, 
   GridLinesStyle -> {{Black, Dashed}, {Thick, Black}}, 
   PlotStyle -> {Thick, Red}, Epilog -> rects, 
   PlotRange -> {{0, 12.5}, Automatic}]
 ]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.