I am trying to diagonalize the Bogoliubov-de Gennes Hamiltonian. The problem is that the Hamiltonian contains a Laplacian. This could be solved by using a discretized Laplacian.

How I tried it

If I use a simple Hamiltonian (just the Laplacian) and use eig(l1dd(...,...)) with l1dd the discretized Laplacian (2 and -1's) as in this example from John Burkardt as FSU, then I get: Dispersion of Hamiltonian eigenvalues with respect to k

What I expect

I expect a linear or quadratic dispersion ($\omega \propto k \text{ or } k^2$), but I get neither of the two.

What could be the problem? It seems that eig does a good job, so probably l1dd is the problem?

  • 5
    $\begingroup$ We really can't have the first idea what could be the problem. We don't know your code, and the only graph you show doesn't have axes labels and only shows some curve that looks like a sine. I'm afraid you have to provide more information, along with what you have already tried to figure out what is wrong. $\endgroup$ Feb 22, 2022 at 20:52
  • $\begingroup$ I want to know the eigenvalues of the laplacian operator using discretized methods in MATLAB $\endgroup$
    – MrQ
    Feb 22, 2022 at 21:30
  • $\begingroup$ @WolfgangBangerth: I have given the code and the graph represents the eigenvalues $\endgroup$
    – MrQ
    Feb 22, 2022 at 21:33
  • 1
    $\begingroup$ @MrQ It looks like you are the OP and may have accidentally made a second account. If you want to merge these, contact the CMs at this link. You can include your whole Matlab input that you used to produce that plot in your question so that other users can try/edit it to see if they can find/fix the issue. $\endgroup$
    – Tyberius
    Feb 22, 2022 at 22:33
  • 1
    $\begingroup$ @MrQ It's worth getting in the habit of labeling all axes. "The graph represents the eigenvalues" is not a useful statement. It could be that each point of the curve represents the real and imaginary parts of eigenvalues in the complex plane. Or the x-axis is the index and the y-axis the absolute value of complex eigenvalues. Or so many more possibilities. $\endgroup$ Feb 23, 2022 at 5:12

1 Answer 1


I'd argue that what you've observed is the correct/expected behavior. Something to bear in mind is that any finite-dimensional/finite-resolution discretization of the laplacian is going to do a good job of approximating the smallest eigenvalues, but a poorer job of approximating the large ones. Highly oscillatory eigenvectors / high frequency content simply cannot be resolved by the grid, so the corresponding eigenvalues (ie the right end of the graph) are going to be inaccurate.

I'd say you shouldn't really consider the whole curve but rather just the region near the origin, which does look correct (quadratic behavior).

As I recall, if you run this test at higher and higher resolution, you do get steadily better and better approximations (as in, they track the expected quadratic behavior out to increasingly larger wavenumber, before rolling off of it). A cartoon follows: enter image description here


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.