I have been using the following NDEigensystem
command to generate the eigenfunctions of the laplacian with a square domain:
𝒟 = Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}]
{vals, funs} =
NDEigensystem[
{-Laplacian[u[x, y], {x, y}], DirichletCondition[u[x, y] == 0, True]},
u[x, y], {x, y} ∈ 𝒟, 4];
However, I am trying to compute the following integral over $D$, where funs[[3]]
is the third eigenfunction given by NDEigensystem
:
$\qquad \int_{𝒟}\mbox{funs[[3]]}\cdot \mbox{funs[[3]]}$
My guess was:
NIntegrate[Dot[funs[[3]], funs[[3]]], {x, y} ∈ 𝒟]
but this doesn't return a numerical value for me. I would be grateful if somebody could give me a working code for the integral.
funs[[3]]
is a scalar value and thusDot
is not the correct call. You may just be looking to multiplyfuns[[3]]*funs[[3]]
inside the argument ofNIntegrate
$\endgroup$ – leibs Mar 11 '16 at 21:04NIntegrate
could probably give you some options to set. I tend to prefer, for simple functions like this, using my own numerical integration scheme. See my post here: mathematica.stackexchange.com/questions/41212/… $\endgroup$ – leibs Mar 11 '16 at 22:23