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 thusDotis not the correct call. You may just be looking to multiplyfuns[[3]]*funs[[3]]inside the argument ofNIntegrate– leibs Mar 11 '16 at 21:04"the global error of the strategy GlobalAdaptive has increased more
– Mr S 100 Mar 11 '16 at 21:16than 2000 times. The global error is expected to decrease
monotonically after a number of integrand evaluations. Suspect one of
the following: the working precision is insufficient for the
specified precision goal; the integrand is highly oscillatory or it
is not a (piecewise) smooth function; or the true value of the
integral is 0.
MaxErrorIncreases might lead to a convergent numerical integration.
NIntegrate obtained 1. and 1.16566*10^-6 for the integral and error
estimates." – Mr S 100 Mar 11 '16 at 21:16
NIntegratecould 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: http://mathematica.stackexchange.com/questions/41212/nintegrateslwcon-problem/41216#41216 – leibs Mar 11 '16 at 22:2310^-6acceptable? If so, you can use the result. – Michael E2 Mar 11 '16 at 22:43