4
$\begingroup$

I want to get the eigenvalue and the eigenfunction of the following partial differential equation: $$ -(\frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2})\psi_n (x,y) + [\frac{1}{4}(x^2+y^2) + 0.1 x^2 y^2 ]\psi_n (x,y) = E_n \psi_n (x,y) $$

The boundary condition is Neumann boundary condition. However, I don't know how to set this boundary condition in NDEigensystem function (I'm new to Mathematica). The following is my code:

B = ImplicitRegion[0.1*x^2 *y^2 + 1/4 (x^2 + y^2) <= 1000, 
                   {{x, -10000, 10000}, {y, -10000, 10000}}];
NDEigensystem[-D[ψ[x, y], {x, 2}] - D[ψ[x, y], {y, 2}] + 
              ((1/4)*(x^2 + y^2) + 0.1*x^2*y^2)*ψ[x, y], 
              ψ[x, y], {x, y} ∈ B, 400]
$\endgroup$

1 Answer 1

5
$\begingroup$

As mentioned in Details section of NeumannValue:

When no boundary condition is specified on a part of the boundary $∂Ω$, then the flux term $∇·(-c ∇u-α u+γ)+…$ over that part is taken to be f = f + 0 = f + NeumannValue[0, …], so not specifying a boundary condition at all is equivalent to specifying a Neumann 0 condition.

So you don't need to explicitly set boundary condition in this case, Neumann 0 condition will be automatically used by NDEigensystem.

"What if I want a Neumann non-zero condition?" Please notice eigenvalue problem is well-defined only for homogeneous b.c., if you're confused about this, check e.g. this note.

$\endgroup$

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.