4
$\begingroup$

I am currently trying to find the eigenfunctions of Hamiltonians of the form $\hat H=\frac12 \hat p^2 +a\hat p +f(\hat x)$, and I thought I would give NDEigensystem a try, since it is easily the most accessible tool in the Mathematica toolbox for this task.

For example, NDEigensystem handles the harmonic oscillator perfectly well,

NDEigensystem[
 -1/2 ψ''[x] + 1/2 x^2 ψ[x]
 , ψ, {x, -15, 15}, 5
 ]

and it also works perfectly fine if I introduce a non-Hermitian first-order derivative into the operator,

NDEigensystem[
 -1/2 ψ''[x] + 0.15 ψ'[x] + 1/2 x^2 ψ[x]
 , ψ, {x, -15, 15}, 5
 ]

but if I try and give that derivative an imaginary coefficient, as

NDEigensystem[
 -1/2 ψ''[x] + 0.15 I ψ'[x] + 1/2 x^2 ψ[x]
 , ψ, {x, -15, 15}, 5
 ]

it goes completely belly-up: it returns nonsense eigenfunctions, and it throws the inscrutable error message

NDEigensystem::femdpop: -- Message text not found -- (NDSolve`FEM`FEMStiffnessElements) >>

Is it possible to use operators like this one with this function? (Ideally, I'd also go up to operators like $\hat x \hat p+\hat p\hat x$.) If so, how can I do it? If not, is there some equivalently simple way with built-in functions or otherwise?

$\endgroup$
3
  • $\begingroup$ What Mathematica version are you using? I do not get the message you posted when I try your code. $\endgroup$ Jul 2 '16 at 18:17
  • $\begingroup$ @Anton I'm on 10.3 on this machine. Maybe that's the cue to update, then. To the eigenfunctions look reasonable there? $\endgroup$ Jul 2 '16 at 18:19
  • $\begingroup$ And you should buy a Mac if you are not using one :). As for the the eigenfunctions check, I have to look into more detail (later...) $\endgroup$ Jul 2 '16 at 18:20
3
$\begingroup$

In version 10.4.1 the support for complex valued PDEs to be solved via FEM has been improved. So this works in 10.4.1:

res = NDEigensystem[-1/2 \[Psi]''[x] + 0.15 I \[Psi]'[x] + 
    1/2 x^2 \[Psi][x], \[Psi], {x, -15, 15}, 5];
res[[1]]
{0.49806057220719635` + 4.192136700091489`*^-15 I, 
 1.494775497407078` + 7.331246737662917`*^-15 I, 
 2.688987707562188` + 3.703438331133301`*^-15 I, 
 3.6133943321857105` - 1.4211236798915415`*^-15 I, 
 4.993737608506491` + 3.284855566663262`*^-15 I}
$\endgroup$
2
  • 1
    $\begingroup$ Indeed, so it seems, and on 10.4.0 also. It's hard to wrap one's head around the surprising amount of stuff that changes on the "point" updates on v10 (e.g. this other example, or ReIm on v10.1). $\endgroup$ Jul 4 '16 at 13:10
  • $\begingroup$ I posted on math.stackexchange a request for an introduction to the underlying mathematics of complex valued PDE's at the undergraduate level, possibly with applications. See math.stackexchange.com/questions/1849283/… for details. Thanks. $\endgroup$ Jul 5 '16 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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