1
$\begingroup$

I have calculated the solution to the Laplacian eigenvalue problem on the unit square

$\qquad - \Delta u(x,y) = \lambda u(x,y) \text{ on } {[0,1]}^2$

with the Dirichlet's boundary condition ($u = 0$).

My question is as follows:

Is it possible to write a program which calculate $N(t)$, the number of eigenvalues less than or equal to $t$?

Please help me.

$\endgroup$
2
$\begingroup$

Note that you should not name symbols with capital letters, because the is danger to overwrite a system symbol. In your case N is used by the system to coerce a machine number. So let's call the function selEV. As there are an infinity of Eigenvalues, we must restrict the number of Eigenvalues to calculate. You must guess an upper bound of expected eigen values: maxn. For an example I choose maxn=10 :

{ℒ, ℬ} = {-Laplacian[u[x, y], {x, y}],
    DirichletCondition[u[x, y] == 0, True]};

maxn = 10;
selEV[t_] :=  Select[DEigenvalues[{ℒ, ℬ},  u[x, y], {x, 0, π}, {y, 0, π}, maxn], # <= t &] // Length

And e.g. for t==7we get:

selEV[7]

(* 3 *)
$\endgroup$
7
  • $\begingroup$ Can you please tell me what the result is selEV[7] = (2, 5, 5). Please help me. $\endgroup$ – no name Feb 8 at 5:22
  • $\begingroup$ My second question is do I need to choose the "maxh", because I am giving a $t$ and looking for the number of eigenvalues $\leq t$. Please help me. $\endgroup$ – no name Feb 8 at 5:31
  • $\begingroup$ Yes the result for "selEV[7]" is {2,5,5}. And yes, you must specify "nmax". As there are infinite many Eigenvalues, it is impossible to calculate all. Instead, the system calculates "nmax" eigenvalues and returns those that are <= t. $\endgroup$ – Daniel Huber Feb 8 at 9:20
  • $\begingroup$ Thanks for your answer. I want to know what is {2, 5, 5}. Since I am asking for the no. of eigenvalues less than or equal to $t$ for a given number $t$. Please help me. $\endgroup$ – no name Feb 8 at 9:43
  • $\begingroup$ 2,5,5 are the eigenvalues <=7, the number is 3. To get the number of eigenvalues you can write: selEV[t:]:= Select[...] //Length. I change my answer accordingly. $\endgroup$ – Daniel Huber Feb 8 at 9:57

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.