1
$\begingroup$

The following solves the first 3 eigenvalues of the following simple 3D-Schrödinger equation, but I do not know how to use the interpolating eigenfunctions, i.e., funs[[2]][0,0,0] does not return a value. This does not happen in 2-Dimensions. What am I doing wrong?

Clear["Global`*"]
Rcube = ImplicitRegion[Abs[x] <= 1 && Abs[y] <= 1 && Abs[z] <= 1, {x, y, z}]; 
F[x_, y_, z_] := If[x + y + z <= -2, 0, 1]; 
{vals, funs} = NDEigensystem[{-Laplacian[u[x, y, z], {x, y, z}] + F[x, y, z]*u[x, y, z],
                              DirichletCondition[u[x, y, z] == 0, True]}, u[x, y, z], 
                             Element[{x, y, z}, Rcube], 3]
$\endgroup$
1
  • 2
    $\begingroup$ The problem is that you had set NDEigensystem[] to return objects of the form ifun[x, y, z] instead of ifun, where ifun is an InterpolatingFunction[]. Try {vals, funs} = NDEigensystem[{-Laplacian[u[x, y, z], {x, y, z}] + Boole[x + y + z > -2] u[x, y, z], DirichletCondition[u[x, y, z] == 0, True]}, u, {x, y, z} ∈ Rcube, 3] and then funs[[2]][0, 0, 0]. (Note the second argument I gave!) $\endgroup$ Mar 19, 2018 at 1:59

0

Your Answer

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

Browse other questions tagged or ask your own question.